From 4955f1af890d66aafe214ebbd1cbd08ea7b95046 Mon Sep 17 00:00:00 2001 From: Soybean Date: Thu, 18 Jan 2024 23:51:04 +0800 Subject: [PATCH] feat(projects): add page: about --- src/locales/langs/en-us.ts | 14 ++++++ src/locales/langs/zh-cn.ts | 14 ++++++ src/router/elegant/imports.ts | 1 + src/router/elegant/routes.ts | 11 +++++ src/router/elegant/transform.ts | 1 + src/typings/app.d.ts | 13 ++++++ src/typings/components.d.ts | 3 ++ src/typings/elegant-router.d.ts | 3 ++ src/views/about/index.vue | 79 +++++++++++++++++++++++++++++++++ 9 files changed, 139 insertions(+) create mode 100644 src/views/about/index.vue diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index bdfbb2e1..6080ef5c 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -110,6 +110,7 @@ const local: App.I18n.Schema = { 500: 'Server Error', home: 'Home', 'user-center': 'User Center', + about: 'About', manage: 'System Manage', manage_user: 'User Manage', 'manage_user-detail': 'User Detail', @@ -166,6 +167,19 @@ const local: App.I18n.Schema = { bindWeChat: { title: 'Bind WeChat' } + }, + about: { + title: 'About', + introduction: `Soybean Admin is an elegant and powerful admin template, based on the latest front-end technology stack, including Vue3, Vite5, TypeScript, Pinia and UnoCSS. It has built-in rich theme configuration and components, strict code specifications, and an automated file routing system. In addition, it also uses the online mock data solution based on ApiFox. Soybean Admin provides you with a one-stop admin solution, no additional configuration, and out of the box. It is also a best practice for learning cutting-edge technologies quickly.`, + projectInfo: { + title: 'Project Info', + version: 'Version', + latestBuildTime: 'Latest Build Time', + githubLink: 'Github Link', + previewLink: 'Preview Link' + }, + prdDep: 'Production Dependency', + devDep: 'Development Dependency' } }, form: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 84ecc315..ab9b247e 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -110,6 +110,7 @@ const local: App.I18n.Schema = { 500: '服务器错误', home: '首页', 'user-center': '个人中心', + about: '关于', manage: '系统管理', manage_user: '用户管理', 'manage_user-detail': '用户详情', @@ -166,6 +167,19 @@ const local: App.I18n.Schema = { bindWeChat: { title: '绑定微信' } + }, + about: { + title: '关于', + introduction: `Soybean Admin 是一个优雅且功能强大的后台管理模板,基于最新的前端技术栈,包括 Vue3, Vite5, TypeScript, Pinia 和 UnoCSS。它内置了丰富的主题配置和组件,代码规范严谨,实现了自动化的文件路由系统。此外,它还采用了基于 ApiFox 的在线Mock数据方案。Soybean Admin 为您提供了一站式的后台管理解决方案,无需额外配置,开箱即用。同样是一个快速学习前沿技术的最佳实践。`, + projectInfo: { + title: '项目信息', + version: '版本', + latestBuildTime: '最新构建时间', + githubLink: 'Github 地址', + previewLink: '预览地址' + }, + prdDep: '生产依赖', + devDep: '开发依赖' } }, form: { diff --git a/src/router/elegant/imports.ts b/src/router/elegant/imports.ts index 3d66a06f..7872a431 100644 --- a/src/router/elegant/imports.ts +++ b/src/router/elegant/imports.ts @@ -19,6 +19,7 @@ export const views: Record Promise import("@/views/_builtin/404/index.vue"), 500: () => import("@/views/_builtin/500/index.vue"), login: () => import("@/views/_builtin/login/index.vue"), + about: () => import("@/views/about/index.vue"), home: () => import("@/views/home/index.vue"), manage_role: () => import("@/views/manage/role/index.vue"), manage_route: () => import("@/views/manage/route/index.vue"), diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index ddd078e3..0dbf9804 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -36,6 +36,17 @@ export const generatedRoutes: GeneratedRoute[] = [ constant: true } }, + { + name: 'about', + path: '/about', + component: 'layout.base$view.about', + meta: { + title: 'about', + i18nKey: 'route.about', + icon: 'fluent:book-information-24-regular', + order: 10 + } + }, { name: 'home', path: '/home', diff --git a/src/router/elegant/transform.ts b/src/router/elegant/transform.ts index 1594035f..523faa78 100644 --- a/src/router/elegant/transform.ts +++ b/src/router/elegant/transform.ts @@ -146,6 +146,7 @@ const routeMap: RouteMap = { "403": "/403", "404": "/404", "500": "/500", + "about": "/about", "home": "/home", "login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?", "manage": "/manage", diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 509e610e..e132a825 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -356,6 +356,19 @@ declare namespace App { title: string; }; }; + about: { + title: string; + introduction: string; + projectInfo: { + title: string; + version: string; + latestBuildTime: string; + githubLink: string; + previewLink: string; + }; + prdDep: string; + devDep: string; + }; }; form: { userName: FormMsg; diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index 0841919c..bedd5216 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -27,6 +27,8 @@ declare module 'vue' { NCalendar: typeof import('naive-ui')['NCalendar'] NCard: typeof import('naive-ui')['NCard'] NCheckbox: typeof import('naive-ui')['NCheckbox'] + NDescriptions: typeof import('naive-ui')['NDescriptions'] + NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] NDrawer: typeof import('naive-ui')['NDrawer'] @@ -45,6 +47,7 @@ declare module 'vue' { NSwitch: typeof import('naive-ui')['NSwitch'] NTab: typeof import('naive-ui')['NTab'] NTabs: typeof import('naive-ui')['NTabs'] + NTag: typeof import('naive-ui')['NTag'] NTooltip: typeof import('naive-ui')['NTooltip'] PinToggler: typeof import('./../components/common/pin-toggler.vue')['default'] ReloadButton: typeof import('./../components/common/reload-button.vue')['default'] diff --git a/src/typings/elegant-router.d.ts b/src/typings/elegant-router.d.ts index 02f6c88d..452c85ac 100644 --- a/src/typings/elegant-router.d.ts +++ b/src/typings/elegant-router.d.ts @@ -20,6 +20,7 @@ declare module "@elegant-router/types" { "403": "/403"; "404": "/404"; "500": "/500"; + "about": "/about"; "home": "/home"; "login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"; "manage": "/manage"; @@ -68,6 +69,7 @@ declare module "@elegant-router/types" { | "403" | "404" | "500" + | "about" | "home" | "login" | "manage" @@ -93,6 +95,7 @@ declare module "@elegant-router/types" { | "404" | "500" | "login" + | "about" | "home" | "manage_role" | "manage_route" diff --git a/src/views/about/index.vue b/src/views/about/index.vue new file mode 100644 index 00000000..a0a19fd4 --- /dev/null +++ b/src/views/about/index.vue @@ -0,0 +1,79 @@ + + + + +