Merge remote-tracking branch 'upstream/master' into avoiding-anomalies

pull/407/head
王良 2024-12-02 23:28:17 +08:00
commit 8ed989d850
7 changed files with 53 additions and 21 deletions

View File

@ -15,10 +15,12 @@ export default {
<template>
<ul>
<li v-for="node in treeData" :key="node.title">
<span v-if="node.url && (node.url.startsWith('http://') || node.url.startsWith('https://'))" :title="node.tip || node.title">
<a @click="openExternal(node.url)">{{ node.title }}</a>
<span v-if="node.url && (node.url.startsWith('http://') || node.url.startsWith('https://'))" :class="node.class" :style="node.style">
<a :title="node.tip || node.title" @click="openExternal(node.url)">{{ node.title }}</a>
</span>
<span v-else :class="node.class" :style="node.style">
<label :title="node.tip || node.title">{{ node.title }}</label>
</span>
<span v-else :title="node.tip || node.title">{{ node.title }}</span>
<tree-node v-if="node.children && node.children.length > 0" :tree-data="node.children" class="child-node" />
</li>
</ul>

View File

@ -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/`)
},
},
}

View File

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

View File

@ -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
},
@ -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" />
@ -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>配置

View File

@ -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) {
@ -315,6 +311,9 @@ 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">
@ -322,9 +321,6 @@ export default {
<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">
@ -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">
打开窗口

View File

@ -30,6 +30,9 @@
margin-right: 20px;
}
.md-mt-0 {
margin-top: 0;
}
.md-mt-5 {
margin-top: 5px;
}
@ -151,10 +154,15 @@ hr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
}
a {
color: #3990e0;
}
a:hover {
text-decoration: underline;
color: #2c9be5;
}
}
@ -163,4 +171,28 @@ hr {
padding-left: 20px;
}
}
}
.help-title-h1 {
font-size: 18px;
font-weight: bold;
border-bottom: 1px solid #eee;
margin-top: 20px;
margin-bottom: 5px;
padding-bottom: 5px;
padding-left: 5px;
&.md-mt-0 {
margin-top: 0;
}
}
.help-title-h2 {
font-size: 16px;
font-weight: bold;
margin-top: 10px;
}
.console {
font-family: Consolas, arial, serif;
}
}

View File

@ -69,6 +69,10 @@ $dark-input: #777; //输入框:背景色
background: $dark-bd;
}
.help-list .help-title-h1 {
border-bottom-color: $dark-bd;
}
/* 左侧 */
/** 背景色 **/
.ant-layout-sider {