refactor: modify the default homepage path loaded from the preference… (#6099)

* refactor: modify the default homepage path loaded from the preferences.ts

Signed-off-by: aonoa <1991849113@qq.com>

* refactor: modify the default homepage path loaded from the preferences.ts

Signed-off-by: aonoa <1991849113@qq.com>

---------

Signed-off-by: aonoa <1991849113@qq.com>
This commit is contained in:
aonoa
2025-05-03 16:03:08 +08:00
committed by GitHub
parent f1af9f8f6e
commit 41152d1722
19 changed files with 63 additions and 42 deletions

View File

@@ -11,6 +11,7 @@ exports[`defaultPreferences immutability test > should not modify the config obj
"compact": false,
"contentCompact": "wide",
"defaultAvatar": "https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp",
"defaultHomePath": "/analytics",
"dynamicTitle": true,
"enableCheckUpdates": true,
"enablePreferences": true,

View File

@@ -11,6 +11,7 @@ const defaultPreferences: Preferences = {
contentCompact: 'wide',
defaultAvatar:
'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
defaultHomePath: '/analytics',
dynamicTitle: true,
enableCheckUpdates: true,
enablePreferences: true,

View File

@@ -35,6 +35,8 @@ interface AppPreferences {
contentCompact: ContentCompactType;
// /** 应用默认头像 */
defaultAvatar: string;
/** 默认首页地址 */
defaultHomePath: string;
// /** 开启动态标题 */
dynamicTitle: boolean;
/** 是否开启检查更新 */

View File

@@ -15,5 +15,5 @@ pnpm add @vben/constants
### 使用
```ts
import { DEFAULT_HOME_PATH } from '@vben/constants';
import { LOGIN_PATH } from '@vben/constants';
```

View File

@@ -3,11 +3,6 @@
*/
export const LOGIN_PATH = '/auth/login';
/**
* @zh_CN 默认首页地址
*/
export const DEFAULT_HOME_PATH = '/analytics';
export interface LanguageOption {
label: string;
value: 'en-US' | 'zh-CN';