From fdf145b58e7bc82b18b16dfe3e397a237be7784a Mon Sep 17 00:00:00 2001 From: 17670756089 Date: Wed, 7 Aug 2024 19:30:10 +0800 Subject: [PATCH] feat: add about page --- electron/api/github.ts | 2 +- src/layout/compoenets/LeftMenu.vue | 17 ---------- src/router/index.ts | 13 +++++++- src/views/about/index.vue | 50 ++++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 19 deletions(-) create mode 100644 src/views/about/index.vue diff --git a/electron/api/github.ts b/electron/api/github.ts index 1209ef3..7954d75 100644 --- a/electron/api/github.ts +++ b/electron/api/github.ts @@ -207,7 +207,7 @@ export const initGitHubApi = () => { * 打开GitHub */ ipcMain.on("github.open", () => { - shell.openExternal("https://github.com/luckjiawei/frpc-desktop"); + shell.openExternal("https://github.com/luckjiawei/frpc-desktop/issues"); }) electron.ipcMain.on("github.openReleases", () => { diff --git a/src/layout/compoenets/LeftMenu.vue b/src/layout/compoenets/LeftMenu.vue index 063c87d..ddbe491 100644 --- a/src/layout/compoenets/LeftMenu.vue +++ b/src/layout/compoenets/LeftMenu.vue @@ -28,14 +28,6 @@ const handleMenuChange = (route: any) => { }); }; -const handleOpenGitHub = () => { - ipcRenderer.send("github.open") -} - -const handleOpenGitHubReleases = () => { - ipcRenderer.send("github.openReleases") -} - onMounted(() => { routes.value = router.options.routes[0].children?.filter( @@ -61,15 +53,6 @@ onMounted(() => { > - -
- v1.0.5 -
diff --git a/src/router/index.ts b/src/router/index.ts index af55e5b..d27bc32 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -59,7 +59,18 @@ const routes: RouteRecordRaw[] = [ hidden: false }, component: () => import("@/views/logger/index.vue") - } + }, + { + path: "/about", + name: "About", + meta: { + title: "关于", + icon: "material-symbols:info-sharp", + keepAlive: true, + hidden: false + }, + component: () => import("@/views/about/index.vue") + }, // { // path: "/comingSoon", // name: "ComingSoon", diff --git a/src/views/about/index.vue b/src/views/about/index.vue new file mode 100644 index 0000000..56c0168 --- /dev/null +++ b/src/views/about/index.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file