mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 14:34:06 +01:00
🎨 桌面端内核进程使用随机端口 https://github.com/siyuan-note/siyuan/issues/4952
This commit is contained in:
parent
a20a19182b
commit
bb90e72eee
10 changed files with 50 additions and 0 deletions
|
|
@ -40,6 +40,14 @@ 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>
|
||||
<label class="b3-label fn__flex">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.useFixedPort}
|
||||
<div class="b3-label__text">${window.siyuan.languages.useFixedPortTip}</div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<input class="b3-switch fn__flex-center" id="fixedPort" type="checkbox"${window.siyuan.config.system.fixedPort ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="b3-label${isBrowser() ? " fn__none" : " fn__flex"}">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.about2}
|
||||
|
|
@ -348,6 +356,14 @@ export const about = {
|
|||
});
|
||||
});
|
||||
});
|
||||
const fixedPortElement = about.element.querySelector("#fixedPort") as HTMLInputElement;
|
||||
fixedPortElement.addEventListener("change", () => {
|
||||
fetchPost("/api/system/setFixedPort", {networkServe: fixedPortElement.checked}, () => {
|
||||
exportLayout(false, () => {
|
||||
exitSiYuan();
|
||||
});
|
||||
});
|
||||
});
|
||||
const uploadErrLogElement = about.element.querySelector("#uploadErrLog") as HTMLInputElement;
|
||||
uploadErrLogElement.addEventListener("change", () => {
|
||||
fetchPost("/api/system/setUploadErrLog", {uploadErrLog: uploadErrLogElement.checked}, () => {
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -341,6 +341,7 @@ declare interface IConfig {
|
|||
uploadErrLog: boolean
|
||||
downloadInstallPkg: boolean
|
||||
networkServe: boolean
|
||||
fixedPort: boolean
|
||||
useExistingDB: boolean
|
||||
}
|
||||
localIPs: string[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue