(config: NaiveUI.NaiveTabl
page: 1,
pageSize: 10,
showSizePicker: true,
+ itemCount: 0,
pageSizes: [10, 15, 20, 25, 30],
onUpdatePage: async (page: number) => {
pagination.page = page;
diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue
index cd640ba4..c31d67e2 100644
--- a/src/layouts/modules/global-header/index.vue
+++ b/src/layouts/modules/global-header/index.vue
@@ -40,7 +40,12 @@ const { isFullscreen, toggle } = useFullscreen();
-
+
themeStore.layout.scrollMode === 'wra
placeholder="SoybeanAdmin"
/>
+
+
+
diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index 68d43824..2444ddb9 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
breadcrumb: {
visible: 'Breadcrumb Visible',
showIcon: 'Breadcrumb Icon Visible'
+ },
+ multilingual: {
+ visible: 'Display multilingual button'
}
},
tab: {
diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index d7c2346d..ffce4039 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -109,6 +109,9 @@ const local: App.I18n.Schema = {
breadcrumb: {
visible: '显示面包屑',
showIcon: '显示面包屑图标'
+ },
+ multilingual: {
+ visible: '显示多语言按钮'
}
},
tab: {
diff --git a/src/plugins/app.ts b/src/plugins/app.ts
index e59f6160..1a0d8999 100644
--- a/src/plugins/app.ts
+++ b/src/plugins/app.ts
@@ -10,22 +10,18 @@ export function setupAppErrorHandle(app: App) {
};
}
-// Update check interval in milliseconds
-const UPDATE_CHECK_INTERVAL = 3 * 60 * 1000;
-
export function setupAppVersionNotification() {
- const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y';
+ // Update check interval in milliseconds
+ const UPDATE_CHECK_INTERVAL = 3 * 60 * 1000;
+ const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' && import.meta.env.PROD;
if (!canAutoUpdateApp) return;
let isShow = false;
let updateInterval: ReturnType | undefined;
- // Check if updates should be checked
- const shouldCheckForUpdates = [!isShow, document.visibilityState === 'visible', !import.meta.env.DEV].every(Boolean);
-
const checkForUpdates = async () => {
- if (!shouldCheckForUpdates) return;
+ if (isShow) return;
const buildTime = await getHtmlBuildTime();
@@ -47,6 +43,7 @@ export function setupAppVersionNotification() {
{
onClick() {
n?.destroy();
+ isShow = false;
}
},
() => $t('system.updateCancel')
@@ -77,7 +74,7 @@ export function setupAppVersionNotification() {
};
// If updates should be checked, set up the visibility change listener and start the update interval
- if (shouldCheckForUpdates) {
+ if (!isShow && document.visibilityState === 'visible') {
// Check for updates when the document is visible
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
diff --git a/src/store/modules/auth/index.ts b/src/store/modules/auth/index.ts
index 40494884..74e67ccc 100644
--- a/src/store/modules/auth/index.ts
+++ b/src/store/modules/auth/index.ts
@@ -71,13 +71,11 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
if (pass) {
await redirectFromLogin(redirect);
- if (routeStore.isInitAuthRoute) {
- window.$notification?.success({
- title: $t('page.login.common.loginSuccess'),
- content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
- duration: 4500
- });
- }
+ window.$notification?.success({
+ title: $t('page.login.common.loginSuccess'),
+ content: $t('page.login.common.welcomeBack', { userName: userInfo.userName }),
+ duration: 4500
+ });
}
} else {
resetStore();
diff --git a/src/theme/settings.ts b/src/theme/settings.ts
index cf092b36..4cfa185f 100644
--- a/src/theme/settings.ts
+++ b/src/theme/settings.ts
@@ -27,6 +27,9 @@ export const themeSettings: App.Theme.ThemeSetting = {
breadcrumb: {
visible: true,
showIcon: true
+ },
+ multilingual: {
+ visible: true
}
},
tab: {
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index 3e944a52..9fc2f70f 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -53,6 +53,11 @@ declare namespace App {
/** Whether to show the breadcrumb icon */
showIcon: boolean;
};
+ /** Multilingual */
+ multilingual: {
+ /** Whether to show the multilingual */
+ visible: boolean;
+ };
};
/** Tab */
tab: {
@@ -363,6 +368,9 @@ declare namespace App {
visible: string;
showIcon: string;
};
+ multilingual: {
+ visible: string;
+ };
};
tab: {
visible: string;