Refactor: make it possible to enable/disable simple mode via query param
This commit is contained in:
parent
770d7c71b6
commit
f32bb266bd
2 changed files with 14 additions and 0 deletions
|
|
@ -649,6 +649,13 @@ const connectionStatusColor = computed(() => {
|
||||||
|
|
||||||
// Load history via API on mount
|
// Load history via API on mount
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
if (route.query?.simple !== undefined) {
|
||||||
|
const simpleMode = useStorage<boolean>('simple_mode', configStore.app.simple_mode || false)
|
||||||
|
simpleMode.value = ['true', '1', 'yes', 'on'].includes(route.query.simple as string)
|
||||||
|
}
|
||||||
|
|
||||||
if (socketStore.isConnected && !paginationInfo.value.isLoaded) {
|
if (socketStore.isConnected && !paginationInfo.value.isLoaded) {
|
||||||
try {
|
try {
|
||||||
await stateStore.loadPaginated('history', 1, DEFAULT_PAGE_SIZE, 'DESC')
|
await stateStore.loadPaginated('history', 1, DEFAULT_PAGE_SIZE, 'DESC')
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,13 @@ watch(() => route.query.tab, (newTab) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
if (route.query?.simple !== undefined) {
|
||||||
|
const simpleMode = useStorage<boolean>('simple_mode', config.app.simple_mode || false)
|
||||||
|
simpleMode.value = ['true', '1', 'yes', 'on'].includes(route.query.simple as string)
|
||||||
|
}
|
||||||
|
|
||||||
activeTab.value = getInitialTab()
|
activeTab.value = getInitialTab()
|
||||||
useHead({ title: getTitle() })
|
useHead({ title: getTitle() })
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue