diff --git a/src/App.vue b/src/App.vue
index 0ccf705..297a6e1 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -13,6 +13,7 @@ const appStore = useAppStore();
const themeStore = useThemeStore();
const antdLocale = computed(() => {
+ appStore.changeLocale(appStore.locale);
return antdLocales[appStore.locale];
});
diff --git a/src/hooks/business/auth.ts b/src/hooks/business/auth.ts
index d324223..9baeb0b 100644
--- a/src/hooks/business/auth.ts
+++ b/src/hooks/business/auth.ts
@@ -9,10 +9,10 @@ export function useAuth() {
}
if (typeof codes === 'string') {
- return authStore.userInfo.buttons.includes(codes);
+ return authStore.userInfo.permissions.includes(codes);
}
- return codes.some(code => authStore.userInfo.buttons.includes(code));
+ return codes.some(code => authStore.userInfo.permissions.includes(code));
}
function hasRole(role: string | string[]) {
diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue
index 3a1c753..3fe324e 100644
--- a/src/layouts/modules/global-header/index.vue
+++ b/src/layouts/modules/global-header/index.vue
@@ -57,14 +57,15 @@ const headerMenus = computed(() => {
-
+
-
+
diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index c4e7160..05e629a 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -4,7 +4,7 @@ const viewEn: any = {
"view.endpoint_records": "Historical",
"view.billing": "Billing",
"view.billing_histories": "Historical",
- "view.set-meal": "Set Meal",
+ "view.set-meal": "Package",
"view.userInfo":"User Information",
};
diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts
index 58dc719..c076483 100644
--- a/src/router/elegant/routes.ts
+++ b/src/router/elegant/routes.ts
@@ -224,6 +224,7 @@ export const customRoutes: GeneratedRoute[] = [
i18nKey: 'view.endpoint',
icon: 'icon-park-outline:all-application',
order: 11,
+ hideInMenu: true
},
children: [
{
@@ -259,6 +260,7 @@ export const customRoutes: GeneratedRoute[] = [
i18nKey: 'view.billing',
icon: 'icon-park-outline:all-application',
order: 13,
+ hideInMenu: true
},
children: [
{
@@ -283,6 +285,7 @@ export const customRoutes: GeneratedRoute[] = [
i18nKey: 'view.set-meal',
icon: 'icon-park-outline:all-application',
order: 15,
+ hideInMenu: true
}
},
{
diff --git a/src/store/modules/app/index.ts b/src/store/modules/app/index.ts
index c58cb64..498f82b 100644
--- a/src/store/modules/app/index.ts
+++ b/src/store/modules/app/index.ts
@@ -44,7 +44,7 @@ export const useAppStore = defineStore(SetupStoreId.App, () => {
setReloadFlag(true);
}
- const locale = ref(localStg.get('lang') || 'zh-CN');
+ const locale = ref(localStg.get('lang') || 'en-US');
const localeOptions: App.I18n.LangOption[] = [
{
diff --git a/src/store/modules/auth/shared.ts b/src/store/modules/auth/shared.ts
index bc0ab24..917b208 100644
--- a/src/store/modules/auth/shared.ts
+++ b/src/store/modules/auth/shared.ts
@@ -7,7 +7,6 @@ export function getToken() {
export const emptyInfo: Api.Auth.UserInfo = {
roles: [],
- buttons: [],
permissions: [],
user: null
};
diff --git a/src/theme/settings.ts b/src/theme/settings.ts
index fe659f6..9bae966 100644
--- a/src/theme/settings.ts
+++ b/src/theme/settings.ts
@@ -1,23 +1,16 @@
/** Default theme settings */
export const themeSettings: App.Theme.ThemeSetting = {
- themeScheme: 'light',
- themeColor: '#646cff',
- otherColor: { info: '#2080f0', success: '#52c41a', warning: '#faad14', error: '#f5222d' },
+ themeScheme: "light",
+ themeColor: "#06B6D4",
+ otherColor: {info: "#06B6D4", success: "#52c41a", warning: "#faad14", error: "#f5222d"},
isInfoFollowPrimary: true,
- layout: { mode: 'horizontal-mix', scrollMode: 'content' },
- page: { animate: true, animateMode: 'fade-slide' },
- header: { height: 56, breadcrumb: { visible: true, showIcon: true } },
- tab: { visible: false, cache: true, height: 44, mode: 'chrome' },
+ layout: {mode: "horizontal", scrollMode: "content"},
+ page: {animate: true, animateMode: "fade-slide"},
+ header: {height: 56, breadcrumb: {visible: true, showIcon: true}},
+ tab: {visible: false, cache: true, height: 44, mode: "chrome"},
fixedHeaderAndTab: true,
- sider: {
- inverted: false,
- width: 220,
- collapsedWidth: 64,
- mixWidth: 90,
- mixCollapsedWidth: 64,
- mixChildMenuWidth: 200
- },
- footer: { visible: true, fixed: false, height: 36, right: true }
+ sider: {inverted: false, width: 220, collapsedWidth: 64, mixWidth: 90, mixCollapsedWidth: 64, mixChildMenuWidth: 200},
+ footer: {visible: true, fixed: false, height: 36, right: true}
};
/**
diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts
index 2aa40fe..99554e0 100644
--- a/src/typings/api.d.ts
+++ b/src/typings/api.d.ts
@@ -81,7 +81,6 @@ declare namespace Api {
interface UserInfo {
user: User | null;
roles: string[];
- buttons: string[];
/** permissions */
permissions: string[];
}
diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts
index 10e16c5..0385892 100644
--- a/src/typings/components.d.ts
+++ b/src/typings/components.d.ts
@@ -44,7 +44,6 @@ declare module 'vue' {
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASpace: typeof import('ant-design-vue/es')['Space']
ASpin: typeof import('ant-design-vue/es')['Spin']
- AStatistic: typeof import('ant-design-vue/es')['Statistic']
AStep: typeof import('ant-design-vue/es')['Step']
ASteps: typeof import('ant-design-vue/es')['Steps']
ASwitch: typeof import('ant-design-vue/es')['Switch']
diff --git a/src/views/function/toggle-auth/index.vue b/src/views/function/toggle-auth/index.vue
index a66c85b..cdb966a 100644
--- a/src/views/function/toggle-auth/index.vue
+++ b/src/views/function/toggle-auth/index.vue
@@ -1,56 +1,10 @@
@@ -62,24 +16,11 @@ async function handleToggleAccount(account: Account) {
{{ role }}
-
-
-
- {{ account.label }}
-
-
-
- {{ $t('page.function.toggleAuth.superAdminVisible') }}
+ {{ $t('page.function.toggleAuth.superAdminVisible') }}
{{ $t('page.function.toggleAuth.adminVisible') }}
{{ $t('page.function.toggleAuth.adminOrUserVisible') }}