@@ -137,6 +167,9 @@ function handleSubmitLogout() {
>
{{ $t('preference.preferences') }}
+
+ {{ altView }} ,
+
{{ $t('common.logout') }}
+
+ {{ altView }} Q
+
diff --git a/packages/business/layouts/src/basic/header/header.vue b/packages/business/layouts/src/basic/header/header.vue
index ec5595cc..3069cc97 100644
--- a/packages/business/layouts/src/basic/header/header.vue
+++ b/packages/business/layouts/src/basic/header/header.vue
@@ -2,6 +2,7 @@
import { VbenFullScreen } from '@vben-core/shadcn-ui';
import { GlobalSearch, LanguageToggle, ThemeToggle } from '@vben/common-ui';
+import { preference } from '@vben/preference';
import { useAccessStore } from '@vben/stores';
interface Props {
@@ -30,7 +31,11 @@ const accessStore = useAccessStore();
-
+
diff --git a/packages/locales/src/langs/en-US.yaml b/packages/locales/src/langs/en-US.yaml
index 1eeb266b..d2f36481 100644
--- a/packages/locales/src/langs/en-US.yaml
+++ b/packages/locales/src/langs/en-US.yaml
@@ -42,6 +42,7 @@ preference:
preferences: Preferences
preferences-subtitle: Customize Preferences & Preview in Real Time
theme: Theme
+ shortcut-key: Shortcut Key
appearance: Appearance
theme-color: Theme Color
layout: Layout
diff --git a/packages/locales/src/langs/zh-CN.yaml b/packages/locales/src/langs/zh-CN.yaml
index d2e2cdc5..a294f3bc 100644
--- a/packages/locales/src/langs/zh-CN.yaml
+++ b/packages/locales/src/langs/zh-CN.yaml
@@ -40,6 +40,7 @@ search:
preference:
preferences: 偏好设置
preferences-subtitle: 自定义偏好设置 & 实时预览
+ shortcut-key: 快捷键
theme: 主题
appearance: 外观
theme-color: 主题色
diff --git a/packages/preference/src/config.ts b/packages/preference/src/config.ts
index 1d8156b9..a11670ea 100644
--- a/packages/preference/src/config.ts
+++ b/packages/preference/src/config.ts
@@ -34,6 +34,7 @@ const defaultPreference: Preference = {
pageTransition: 'fade-slide',
pageTransitionEnable: true,
semiDarkMenu: true,
+ shortcutKeys: true,
showPreference: true,
sideCollapse: false,
sideCollapseShowTitle: true,
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bb4ed93a..852051a1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -609,6 +609,9 @@ importers:
'@vben-core/toolkit':
specifier: workspace:*
version: link:../../@vben-core/shared/toolkit
+ '@vben/constants':
+ specifier: workspace:*
+ version: link:../../constants
'@vben/locales':
specifier: workspace:*
version: link:../../locales
@@ -681,7 +684,11 @@ importers:
specifier: workspace:*
version: link:../../@vben-core/shared/typings
- packages/constants: {}
+ packages/constants:
+ dependencies:
+ '@vben-core/toolkit':
+ specifier: workspace:*
+ version: link:../@vben-core/shared/toolkit
packages/hooks:
dependencies: