Vanessa 2023-09-04 09:11:35 +08:00
parent fa7ff32105
commit e0a34318ef
4 changed files with 27 additions and 15 deletions

View file

@ -918,6 +918,8 @@
"about4": "打开浏览器",
"about5": "访问授权码",
"about6": "配置后作为访问鉴权密码,留空则关闭鉴权",
"about7": "todo",
"about8": "todo",
"about9": "自动上传报错信息和诊断数据",
"about10": "启用后会通过 <a href=\"https://sentry.io\" target=\"_blank\">Sentry</a> SDK 自动上传报错信息和诊断数据等不涉及个人隐私的数据,以便开发者修复缺陷。修改后会自动关闭应用,请手动重启",
"about11": "网络伺服",

View file

@ -56,28 +56,37 @@ export const about = {
<div class="fn__space"></div>
<input class="b3-switch fn__flex-center" id="networkServe" type="checkbox"${window.siyuan.config.system.networkServe ? " checked" : ""}>
</label>
<div class="b3-label">
<label class="fn__flex">
<div class="fn__flex-1">
${window.siyuan.languages.about5}
<div class="b3-label__text">${window.siyuan.languages.about6}</div>
</div>
<div class="fn__space"></div>
<button class="fn__flex-center b3-button b3-button--outline fn__size200" id="authCode">
<svg><use xlink:href="#iconLock"></use></svg>${window.siyuan.languages.config}
</button>
</label>
<label class="b3-label fn__flex${window.siyuan.config.accessAuthCode ? "" : " fn__none"}">
<div class="fn__flex-1">
${window.siyuan.languages.about7}
<div class="b3-label__text">${window.siyuan.languages.about8}</div>
</div>
<div class="fn__space"></div>
<input class="b3-switch fn__flex-center" id="lockScreenMode" type="checkbox"${window.siyuan.config.system.lockScreenMode === 0 ? " checked" : ""}>
</label>
</div>
<label class="b3-label config__item${isBrowser() ? " fn__none" : " fn__flex"}">
<div class="fn__flex-1">
${window.siyuan.languages.about2}
<div class="b3-label__text">${window.siyuan.languages.about3.replace("${port}", location.port)}</div>
<span class="b3-label__text"><code class="fn__code">${window.siyuan.config.localIPs.join("</code> <code class='fn__code'>")}</code></span>
</div>
<div class="fn__space"></div>
<button data-type="open" data-url="http://${window.siyuan.config.system.networkServe ? window.siyuan.config.localIPs[0] : "127.0.0.1"}:${location.port}" class="b3-button b3-button--outline fn__size200 fn__flex-center">
<svg><use xlink:href="#iconLink"></use></svg>${window.siyuan.languages.about4}
</button>
</label>
<label class="b3-label fn__flex config__item">
<div class="fn__flex-1">
${window.siyuan.languages.about5}
<div class="b3-label__text">${window.siyuan.languages.about6}</div>
</div>
<div class="fn__space"></div>
<button class="fn__flex-center b3-button b3-button--outline fn__size200" id="authCode">
<svg><use xlink:href="#iconLock"></use></svg>${window.siyuan.languages.config}
</button>
</label>
<div class="b3-label fn__flex config__item">
<div class="fn__flex-1 fn__flex-center">
${window.siyuan.languages.dataRepoKey}

View file

@ -80,10 +80,10 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
// 关于
getLang(["autoLaunch", "autoLaunchTip", "about", "about1", "about2", "about3", "about4", "about5", "about6",
"about9", "about10", "about11", "about12", "about13", "about14", "about17", "config", "dataRepoKey",
"dataRepoKeyTip1", "dataRepoKeyTip2", "slogan", "currentVer", "checkUpdate", "updatePath", "systemLog",
"importKey", "genKey", "genKeyByPW", "copyKey", "resetRepo", "systemLogTip", "export", "downloadLatestVer",
"safeQuit", "directConnection", "siyuanNote", "key", "password", "copied", "resetRepoTip",
"about7", "about8", "about9", "about10", "about11", "about12", "about13", "about14", "about17", "config",
"dataRepoKey", "dataRepoKeyTip1", "dataRepoKeyTip2", "slogan", "currentVer", "checkUpdate", "updatePath",
"systemLog", "importKey", "genKey", "genKeyByPW", "copyKey", "resetRepo", "systemLogTip", "export",
"downloadLatestVer", "safeQuit", "directConnection", "siyuanNote", "key", "password", "copied", "resetRepoTip",
"autoDownloadUpdatePkg", "autoDownloadUpdatePkgTip", "networkProxy", "keyPlaceholder", "initRepoKeyTip",
"googleAnalytics", "googleAnalyticsTip"]),
];

View file

@ -635,6 +635,7 @@ interface IConfig {
}
openHelp: boolean
system: {
lockScreenMode: number // 0手动1手动+跟随系统
networkProxy: {
host: string
port: string