Skip to content

Commit

Permalink
日志按钮调整。
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Dec 2, 2024
1 parent 3b604d0 commit b6538f4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
4 changes: 4 additions & 0 deletions packages/gui/src/view/mixins/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,9 @@ export default {
isLinux () {
return this.systemPlatform === 'linux'
},
async openLog () {
const dir = await this.$api.info.getConfigDir()
this.$api.ipc.openPath(`${dir}/logs/`)
},
},
}
3 changes: 2 additions & 1 deletion packages/gui/src/view/pages/help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default {
<template slot="header">
帮助中心
<span>
<a-button @click="openExternal('https://github.com/docmirror/dev-sidecar/issues/new/choose')">反馈问题</a-button>
<a-button class="md-mr-10" @click="openExternal('https://github.com/docmirror/dev-sidecar/issues/new/choose')">反馈问题</a-button>
<a-button class="md-mr-10" icon="profile" @click="openLog()">查看日志</a-button>
</span>
</template>

Expand Down
9 changes: 1 addition & 8 deletions packages/gui/src/view/pages/server.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ export default {
addWhiteList () {
this.whiteList.unshift({ key: '', value: true })
},
async openLog () {
const dir = await this.$api.info.getConfigDir()
this.$api.ipc.openPath(`${dir}/logs/`)
},
getSpeedTestConfig () {
return this.config.server.dns.speedTest
},
Expand Down Expand Up @@ -202,9 +198,6 @@ export default {
<a-tag v-else color="red">
当前未启动
</a-tag>
<a-button class="md-mr-10" icon="profile" @click="openLog()">
日志
</a-button>
</a-form-item>
<a-form-item label="绑定IP" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-input v-model="config.server.host" />
Expand Down Expand Up @@ -273,7 +266,7 @@ export default {
/>
</a-tab-pane>
<a-tab-pane key="3" tab="超时时间设置">
<div style="height:100%;display:flex;flex-direction:column;padding-right:10px">
<div style="height:100%;display:flex;flex-direction:column">
<a-form-item label="默认超时时间" :label-col="labelCol" :wrapper-col="wrapperCol">
请求:<a-input-number v-model="config.server.setting.defaultTimeout" :step="1000" :min="1000" /> ms,对应<code>timeout</code>配置<br>
连接:<a-input-number v-model="config.server.setting.defaultKeepAliveTimeout" :step="1000" :min="1000" /> ms,对应<code>keepAliveTimeout</code>配置
Expand Down
12 changes: 4 additions & 8 deletions packages/gui/src/view/pages/setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export default {
this.urlBackup = config.app.remoteConfig.url
this.personalUrlBackup = config.app.remoteConfig.personalUrl
},
async openLog () {
const dir = await this.$api.info.getConfigDir()
this.$api.ipc.openPath(`${dir}/logs/`)
},
getEventKey (event) {
// 忽略以下键
switch (event.key) {
Expand Down Expand Up @@ -315,16 +311,16 @@ export default {
<ds-container>
<template slot="header">
设置
<span>
<a-button class="md-mr-10" icon="profile" @click="openLog()">查看日志</a-button>
</span>
</template>

<div v-if="config">
<a-form-item label="开机自启" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-checkbox v-model="config.app.autoStart.enabled" @change="onAutoStartChange">
本应用开机自启
</a-checkbox>
<a-button class="md-mr-10" icon="profile" @click="openLog()">
日志
</a-button>
</a-form-item>
<a-form-item v-if="systemPlatform === 'mac'" label="隐藏Dock图标" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-checkbox v-model="config.app.dock.hideWhenWinClose">
Expand Down Expand Up @@ -410,7 +406,7 @@ export default {
部分快捷键已被占用:F5=刷新页面,F12=开发者工具(DevTools)
</div>
</a-form-item>
<a-form-item label="启动时打开窗口" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="启动时窗口状态" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-radio-group v-model="config.app.startShowWindow" default-value="true" button-style="solid">
<a-radio-button :value="true">
打开窗口
Expand Down

0 comments on commit b6538f4

Please sign in to comment.