Merge pull request #14 from forestxieCode/feat/xsl20240807-add-aboutPage

feat: add about page
This commit is contained in:
刘嘉伟 2024-08-11 15:15:12 +08:00 committed by GitHub
commit 0f5fad1a87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 66 additions and 16 deletions

View File

@ -206,7 +206,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,10 @@ 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.6
</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",

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

@ -0,0 +1,52 @@
<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="app-container-breadcrumb">
<div
class="w-full h-full bg-white p-4 rounded drop-shadow-lg overflow-y-auto flex justify-center items-center flex-col"
>
<img src="/logo/only/1024x1024.png" class="w-[95px] h-[95px] mt-[-50px]" 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>
</div>
</template>