feat: add about page

This commit is contained in:
17670756089 2024-08-07 19:30:10 +08:00
parent 575f536e29
commit fdf145b58e
4 changed files with 63 additions and 19 deletions

View File

@ -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", () => {

View File

@ -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(() => {
>
<Icon class="animate__animated" :icon="r?.meta?.icon as string"/>
</li>
<li
class="menu"
@click="handleOpenGitHub"
>
<Icon icon="mdi:github"/>
</li>
</ul>
<div class="version mb-2 animate__animated" @click="handleOpenGitHubReleases">
v1.0.5
</div>
</div>
</template>

View File

@ -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",

50
src/views/about/index.vue Normal file
View File

@ -0,0 +1,50 @@
<script lang="ts" setup>
import {defineComponent} from "vue";
import {ipcRenderer, clipboard} from "electron";
import {Icon} from "@iconify/vue";
import Breadcrumb from "@/layout/compoenets/Breadcrumb.vue";
import {ElMessage} from "element-plus";
import pkg from '../../../package.json';
const handleOpenGitHub = () => {
ipcRenderer.send("github.open")
}
const handleCopyInfo = () => {
ElMessage({
message: '复制成功',
type: 'success',
})
clipboard.writeText(`
Frpc Desktop
v${pkg.version}
更简单的内网穿透工具免费开源 / 桌面客户端 / 开机启动
`)
}
defineComponent({
name: "About"
});
</script>
<template>
<div class="main">
<breadcrumb/>
<div
class="w-full h-full bg-white p-4 rounded drop-shadow-lg overflow-y-auto flex justify-center items-center"
>
<img src="/logo/only/1024x1024.png" class="w-[95px] h-[95px]" alt="Logo"/>
<div class="mt-[8px] text-2xl">Frpc Desktop</div>
<div class="mt-[8px] text-neutral-400 flex items-center">
v{{pkg.version}}
<Icon class="ml-1.5 cursor-pointer" icon="material-symbols:refresh-rounded"></Icon>
</div>
<div class="mt-[8px] text-sm">更简单的内网穿透工具免费开源 / 桌面客户端 / 开机启动</div>
<div class="mt-[12px]">
<el-button type="primary" @click="handleCopyInfo">复制信息</el-button>
<el-button type="danger" plain @click="handleOpenGitHub">反馈问题</el-button>
</div>
</div>
</div>
</template>