fix: redirect after setup and remove redundant breadcrumbs
Release / release (push) Canceled after 0s
Release / release (push) Canceled after 0s
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
export default {
|
||||
showFooter: false,
|
||||
isSidebarCompact: false,
|
||||
showBreadcrumb: true,
|
||||
menuAutoCollapsed: false,
|
||||
mode: 'light',
|
||||
layout: 'side',
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
</t-tab-panel>
|
||||
</t-tabs>
|
||||
<t-content :class="`${prefix}-content-layout`">
|
||||
<l-breadcrumb v-if="settingStore.showBreadcrumb" />
|
||||
<l-content />
|
||||
</t-content>
|
||||
<t-footer v-if="settingStore.showFooter" :class="`${prefix}-footer-layout`">
|
||||
@@ -81,7 +80,6 @@ import { useLocale } from '@/locales/useLocale';
|
||||
import { useSettingStore, useTabsRouterStore } from '@/store';
|
||||
import type { TRouterInfo, TTabRemoveOptions } from '@/types/interface';
|
||||
|
||||
import LBreadcrumb from './Breadcrumb.vue';
|
||||
import LContent from './Content.vue';
|
||||
import LFooter from './Footer.vue';
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ async function waitForSetupCompletion() {
|
||||
if (unmounted) return false;
|
||||
try {
|
||||
const status = await getSetupStatus();
|
||||
if (status.ready) return true;
|
||||
if (!status.required && (status.ready || status.locked)) return true;
|
||||
} catch {
|
||||
// A short connection failure is expected while systemd restarts the service.
|
||||
}
|
||||
@@ -387,7 +387,7 @@ async function openLogin() {
|
||||
window.clearInterval(countdownTimer);
|
||||
completionMessage.value = '系统正在启动,请稍候。';
|
||||
if (await waitForSetupCompletion()) {
|
||||
window.location.assign('/login');
|
||||
await router.replace('/login');
|
||||
return;
|
||||
}
|
||||
completionMessage.value = '系统启动时间较长,请稍后刷新页面。';
|
||||
|
||||
@@ -17,7 +17,20 @@ const isPublic = (to: RouteLocationNormalized) =>
|
||||
let setupStatusRequest: ReturnType<typeof getSetupStatus> | null = null;
|
||||
|
||||
function loadSetupStatus() {
|
||||
setupStatusRequest ||= getSetupStatus();
|
||||
if (setupStatusRequest) return setupStatusRequest;
|
||||
|
||||
// Share only an in-flight request. Keeping the resolved setup state would
|
||||
// send the user back to /setup after the installation marker is written.
|
||||
const request = getSetupStatus();
|
||||
setupStatusRequest = request;
|
||||
request.then(
|
||||
() => {
|
||||
if (setupStatusRequest === request) setupStatusRequest = null;
|
||||
},
|
||||
() => {
|
||||
if (setupStatusRequest === request) setupStatusRequest = null;
|
||||
},
|
||||
);
|
||||
return setupStatusRequest;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
z-index: 100;
|
||||
}
|
||||
&-tabs-nav + .@{starter-prefix}-content-layout {
|
||||
padding-top: var(--td-comp-paddingTB-xxl);
|
||||
padding-top: var(--td-comp-paddingTB-l);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
|
||||
Reference in New Issue
Block a user