fix: DISABLE_ADMIN_PASSWORD_CHECK still show admin password modal (#406)

This commit is contained in:
Dream Hunter
2024-08-14 22:52:45 +08:00
committed by GitHub
parent d90f54345d
commit c969c4b082
9 changed files with 1672 additions and 1635 deletions
+6 -1
View File
@@ -27,6 +27,7 @@ export const useGlobalState = createGlobalState(
enableWebhook: false,
isS3Enabled: false,
showGithub: true,
disableAdminPasswordCheck: false,
})
const settings = ref({
fetched: false,
@@ -83,7 +84,11 @@ export const useGlobalState = createGlobalState(
/** @type {null | {domains: string[] | undefined | null, role: string, prefix: string | undefined | null}} */
user_role: null,
});
const showAdminPage = computed(() => !!adminAuth.value || userSettings.value.is_admin);
const showAdminPage = computed(() =>
!!adminAuth.value
|| userSettings.value.is_admin
|| openSettings.value.disableAdminPasswordCheck
);
const telegramApp = ref(window.Telegram?.WebApp || {});
const isTelegram = ref(!!window.Telegram?.WebApp?.initData);
return {