diff --git a/playground/src/layouts/basic.vue b/playground/src/layouts/basic.vue index 05787651..35f877ff 100644 --- a/playground/src/layouts/basic.vue +++ b/playground/src/layouts/basic.vue @@ -2,6 +2,7 @@ import type { NotificationItem } from '@vben/layouts'; import { computed, onBeforeMount, ref, watch } from 'vue'; +import { useRouter } from 'vue-router'; import { AuthenticationLoginExpiredModal } from '@vben/common-ui'; import { VBEN_DOC_URL, VBEN_GITHUB_URL } from '@vben/constants'; @@ -65,6 +66,7 @@ const notifications = ref([ }, ]); +const router = useRouter(); const userStore = useUserStore(); const authStore = useAuthStore(); const accessStore = useAccessStore(); @@ -74,6 +76,13 @@ const showDot = computed(() => ); const menus = computed(() => [ + { + handler: () => { + router.push({ name: 'Profile' }); + }, + icon: 'lucide:user', + text: $t('page.auth.profile'), + }, { handler: () => { openWindow(VBEN_DOC_URL, { diff --git a/playground/src/locales/langs/en-US/page.json b/playground/src/locales/langs/en-US/page.json index 50f19dc4..32e323c2 100644 --- a/playground/src/locales/langs/en-US/page.json +++ b/playground/src/locales/langs/en-US/page.json @@ -6,7 +6,8 @@ "qrcodeLogin": "Qr Code Login", "forgetPassword": "Forget Password", "sendingCode": "SMS Code is sending...", - "codeSentTo": "Code has been sent to {0}" + "codeSentTo": "Code has been sent to {0}", + "profile": "Profile" }, "dashboard": { "title": "Dashboard", diff --git a/playground/src/locales/langs/zh-CN/page.json b/playground/src/locales/langs/zh-CN/page.json index 666db5b7..437068c9 100644 --- a/playground/src/locales/langs/zh-CN/page.json +++ b/playground/src/locales/langs/zh-CN/page.json @@ -6,7 +6,8 @@ "qrcodeLogin": "二维码登录", "forgetPassword": "忘记密码", "sendingCode": "正在发送验证码", - "codeSentTo": "验证码已发送至{0}" + "codeSentTo": "验证码已发送至{0}", + "profile": "个人中心" }, "dashboard": { "title": "概览", diff --git a/playground/src/router/routes/modules/vben.ts b/playground/src/router/routes/modules/vben.ts index 1c177798..6b621e9e 100644 --- a/playground/src/router/routes/modules/vben.ts +++ b/playground/src/router/routes/modules/vben.ts @@ -101,6 +101,16 @@ const routes: RouteRecordRaw[] = [ name: 'VbenAbout', path: '/vben-admin/about', }, + { + name: 'Profile', + path: '/profile', + component: () => import('#/views/_core/profile/index.vue'), + meta: { + icon: 'lucide:user', + hideInMenu: true, + title: $t('page.auth.profile'), + }, + }, ]; export default routes; diff --git a/playground/src/views/_core/profile/base-setting.vue b/playground/src/views/_core/profile/base-setting.vue new file mode 100644 index 00000000..aa8a4c26 --- /dev/null +++ b/playground/src/views/_core/profile/base-setting.vue @@ -0,0 +1,65 @@ + + diff --git a/playground/src/views/_core/profile/index.vue b/playground/src/views/_core/profile/index.vue new file mode 100644 index 00000000..8740894e --- /dev/null +++ b/playground/src/views/_core/profile/index.vue @@ -0,0 +1,49 @@ + + diff --git a/playground/src/views/_core/profile/notification-setting.vue b/playground/src/views/_core/profile/notification-setting.vue new file mode 100644 index 00000000..324a4b39 --- /dev/null +++ b/playground/src/views/_core/profile/notification-setting.vue @@ -0,0 +1,31 @@ + + diff --git a/playground/src/views/_core/profile/password-setting.vue b/playground/src/views/_core/profile/password-setting.vue new file mode 100644 index 00000000..b246bc37 --- /dev/null +++ b/playground/src/views/_core/profile/password-setting.vue @@ -0,0 +1,66 @@ + + diff --git a/playground/src/views/_core/profile/security-setting.vue b/playground/src/views/_core/profile/security-setting.vue new file mode 100644 index 00000000..be30db58 --- /dev/null +++ b/playground/src/views/_core/profile/security-setting.vue @@ -0,0 +1,43 @@ + +