Skip to content

Commit 54d1582

Browse files
committed
fix: remove on-load blinking in SettingsView
1 parent 97e2e81 commit 54d1582

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

adminforth/spa/src/views/SettingsView.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="m-4 mt-16 h-full w-full">
2+
<div class="m-4 mt-16 h-full w-full" :class="{ 'hidden': initialTabSet === false }">
33
<div v-if="!coreStore?.config?.settingPages || coreStore?.config?.settingPages.length === 0">
44
<p>No setting pages configured or still loading...</p>
55
</div>
@@ -41,6 +41,7 @@ const loginRedirectCheckIsReady = ref(false);
4141
const dropdownUserButton = ref<HTMLElement | null>(null);
4242
const VerticalTabsRef = ref();
4343
const activeTab = ref('');
44+
const initialTabSet = ref(false);
4445
4546
watch(() => route?.params?.page, (val) => {
4647
handleURLChange(val as string | null);
@@ -128,6 +129,7 @@ function handleURLChange(val: string | null) {
128129
if (isParamInTabs) {
129130
VerticalTabsRef.value.setActiveTab(val);
130131
activeTab.value = val as string;
132+
if (!initialTabSet.value) initialTabSet.value = true;
131133
} else {
132134
if (coreStore.config?.settingPages?.[0]) {
133135
setURL(coreStore.config.settingPages[0]);

adminforth/types/Common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ export interface AdminForthConfigForFrontend {
10981098
icon?: string,
10991099
pageLabel: string,
11001100
slug?: string,
1101-
component?: AdminForthComponentDeclarationFull,
1101+
component: AdminForthComponentDeclarationFull,
11021102
}[],
11031103
}
11041104

0 commit comments

Comments
 (0)