添加帮助中心页面。
parent
447241f393
commit
dae4402850
|
@ -0,0 +1,46 @@
|
||||||
|
<script>
|
||||||
|
import Plugin from '../mixins/plugin'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Help',
|
||||||
|
mixins: [Plugin],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
key: 'help',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ready (config) {
|
||||||
|
},
|
||||||
|
async openLog () {
|
||||||
|
const dir = await this.$api.info.getConfigDir()
|
||||||
|
this.$api.ipc.openPath(`${dir}/logs/`)
|
||||||
|
},
|
||||||
|
async applyBefore () {
|
||||||
|
if (!this.config.app.showHideShortcut) {
|
||||||
|
this.config.app.showHideShortcut = '无'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async applyAfter () {
|
||||||
|
},
|
||||||
|
async openExternal (url) {
|
||||||
|
await this.$api.ipc.openExternal(url)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ds-container>
|
||||||
|
<template slot="header">
|
||||||
|
帮助中心
|
||||||
|
<span>
|
||||||
|
<a-button type="primary" @click="openExternal('https://github.com/docmirror/dev-sidecar/issues/new/choose')">反馈问题</a-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div v-if="config">
|
||||||
|
啊啊啊
|
||||||
|
</div>
|
||||||
|
</ds-container>
|
||||||
|
</template>
|
|
@ -6,6 +6,7 @@ import Pip from '../pages/plugin/pip'
|
||||||
import Proxy from '../pages/proxy'
|
import Proxy from '../pages/proxy'
|
||||||
import Server from '../pages/server'
|
import Server from '../pages/server'
|
||||||
import Setting from '../pages/setting'
|
import Setting from '../pages/setting'
|
||||||
|
import Help from '../pages/help'
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{ path: '/', redirect: '/index' },
|
{ path: '/', redirect: '/index' },
|
||||||
|
@ -13,6 +14,7 @@ const routes = [
|
||||||
{ path: '/server', component: Server },
|
{ path: '/server', component: Server },
|
||||||
{ path: '/proxy', component: Proxy },
|
{ path: '/proxy', component: Proxy },
|
||||||
{ path: '/setting', component: Setting },
|
{ path: '/setting', component: Setting },
|
||||||
|
{ path: '/help', component: Help },
|
||||||
{ path: '/plugin/node', component: Node },
|
{ path: '/plugin/node', component: Node },
|
||||||
{ path: '/plugin/git', component: Git },
|
{ path: '/plugin/git', component: Git },
|
||||||
{ path: '/plugin/pip', component: Pip },
|
{ path: '/plugin/pip', component: Pip },
|
||||||
|
|
|
@ -15,6 +15,7 @@ export default function createMenus (app) {
|
||||||
icon: 'api',
|
icon: 'api',
|
||||||
children: plugins,
|
children: plugins,
|
||||||
},
|
},
|
||||||
|
{ title: '帮助中心', path: '/help', icon: 'help' },
|
||||||
]
|
]
|
||||||
if (app.$global && app.$global.setting && app.$global.setting.overwall) {
|
if (app.$global && app.$global.setting && app.$global.setting.overwall) {
|
||||||
plugins.push({ title: '功能增强', path: '/plugin/overwall', icon: 'global' })
|
plugins.push({ title: '功能增强', path: '/plugin/overwall', icon: 'global' })
|
||||||
|
|
Loading…
Reference in New Issue