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
|
||||
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) {
|
||||
try {
|
||||
await stateStore.loadPaginated('history', 1, DEFAULT_PAGE_SIZE, 'DESC')
|
||||
|
|
|
|||
|
|
@ -164,6 +164,13 @@ watch(() => route.query.tab, (newTab) => {
|
|||
})
|
||||
|
||||
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()
|
||||
useHead({ title: getTitle() })
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue