mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 19:40:48 +08:00
This commit is contained in:
parent
1715b150a2
commit
9de0fe0d93
@ -38,8 +38,6 @@
|
|||||||
"floatWindowMode": "Hover to display a floating window",
|
"floatWindowMode": "Hover to display a floating window",
|
||||||
"floatWindowModeTip": "After enabling, a floating window will appear when the mouse hovers over the block reference, breadcrumb block icon, etc. After disabling, you need to hold down the <code class='fn__code'>${hotkey}</code> key to appear the floating window",
|
"floatWindowModeTip": "After enabling, a floating window will appear when the mouse hovers over the block reference, breadcrumb block icon, etc. After disabling, you need to hold down the <code class='fn__code'>${hotkey}</code> key to appear the floating window",
|
||||||
"codeSnippet": "Code Snippet",
|
"codeSnippet": "Code Snippet",
|
||||||
"useFixedPort": "Use Fixed Port",
|
|
||||||
"useFixedPortTip": "After enabling, only the port <code class='fn__code'>6806</code> will be used. When disabled, both random ports and <code class='fn__code'>6806</code> will be used. The application will be closed automatically after modification, please restart manually",
|
|
||||||
"expandDown": "Expand Down",
|
"expandDown": "Expand Down",
|
||||||
"expandUp": "Expand Up",
|
"expandUp": "Expand Up",
|
||||||
"goForward": "Go forward",
|
"goForward": "Go forward",
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
"floatWindowMode": "Pase el cursor para mostrar una ventana flotante",
|
"floatWindowMode": "Pase el cursor para mostrar una ventana flotante",
|
||||||
"floatWindowModeTip": "Después de habilitar, aparecerá una ventana flotante cuando el mouse se desplace sobre la referencia del bloque, el ícono del bloque de navegación, etc. Después de deshabilitar, debe mantener presionada la tecla <code class='fn__code'>${hotkey}</code> para aparece la ventana flotante",
|
"floatWindowModeTip": "Después de habilitar, aparecerá una ventana flotante cuando el mouse se desplace sobre la referencia del bloque, el ícono del bloque de navegación, etc. Después de deshabilitar, debe mantener presionada la tecla <code class='fn__code'>${hotkey}</code> para aparece la ventana flotante",
|
||||||
"codeSnippet": "Fragmento de código",
|
"codeSnippet": "Fragmento de código",
|
||||||
"useFixedPort": "Usar puerto fijo",
|
|
||||||
"useFixedPortTip": "Después de habilitarlo, solo se usará el puerto <code class='fn__code'>6806</code>. Cuando está deshabilitado, se utilizarán tanto los puertos aleatorios como <code class='fn__code'>6806</code>. La aplicación se cerrará automáticamente después de la modificación, por favor reinicie manualmente",
|
|
||||||
"expandDown": "Expandir hacia abajo",
|
"expandDown": "Expandir hacia abajo",
|
||||||
"expandUp": "Expandir hacia arriba",
|
"expandUp": "Expandir hacia arriba",
|
||||||
"goForward": "Ir hacia adelante",
|
"goForward": "Ir hacia adelante",
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
"floatWindowMode": "Survolez pour afficher une fenêtre flottante",
|
"floatWindowMode": "Survolez pour afficher une fenêtre flottante",
|
||||||
"floatWindowModeTip": "Après l'activation, une fenêtre flottante apparaît lorsque la souris survole la référence du bloc, l'icône du fil d'Ariane, etc. Après la désactivation, vous devez maintenir enfoncée la touche <code class='fn__code'>${hotkey}</code> pour apparaît la fenêtre flottante",
|
"floatWindowModeTip": "Après l'activation, une fenêtre flottante apparaît lorsque la souris survole la référence du bloc, l'icône du fil d'Ariane, etc. Après la désactivation, vous devez maintenir enfoncée la touche <code class='fn__code'>${hotkey}</code> pour apparaît la fenêtre flottante",
|
||||||
"codeSnippet": "Extrait de code",
|
"codeSnippet": "Extrait de code",
|
||||||
"useFixedPort": "Utiliser un port fixe",
|
|
||||||
"useFixedPortTip": "Après activation, seul le port <code class='fn__code'>6806</code> sera utilisé. Lorsqu'il est désactivé, les ports aléatoires et <code class='fn__code'>6806</code> seront utilisés. L'application sera fermée automatiquement après modification, veuillez la redémarrer manuellement.",
|
|
||||||
"expandDown": "Développer vers le bas",
|
"expandDown": "Développer vers le bas",
|
||||||
"expandUp": "Développer vers le haut",
|
"expandUp": "Développer vers le haut",
|
||||||
"goForward": "Suivant",
|
"goForward": "Suivant",
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
"floatWindowMode": "懸停出現浮窗",
|
"floatWindowMode": "懸停出現浮窗",
|
||||||
"floatWindowModeTip": "啟用後鼠標懸停塊引、導覽路徑塊標等位置會出現浮窗,關閉後需按住 <code class='fn__code'>${hotkey}</code> 鍵才會出現浮窗",
|
"floatWindowModeTip": "啟用後鼠標懸停塊引、導覽路徑塊標等位置會出現浮窗,關閉後需按住 <code class='fn__code'>${hotkey}</code> 鍵才會出現浮窗",
|
||||||
"codeSnippet": "代碼片段",
|
"codeSnippet": "代碼片段",
|
||||||
"useFixedPort": "使用固定端口",
|
|
||||||
"useFixedPortTip": "啟用後將僅使用固定端口 <code class='fn__code'>6806</code>,關閉時同時使用隨機端口和 <code class='fn__code'>6806</code>。修改後會自動關閉應用,請手動重啟",
|
|
||||||
"expandDown": "向下擴選",
|
"expandDown": "向下擴選",
|
||||||
"expandUp": "向上擴選",
|
"expandUp": "向上擴選",
|
||||||
"goForward": "前進",
|
"goForward": "前進",
|
||||||
|
@ -38,8 +38,6 @@
|
|||||||
"floatWindowMode": "悬停出现浮窗",
|
"floatWindowMode": "悬停出现浮窗",
|
||||||
"floatWindowModeTip": "启用后鼠标悬停块引、面包屑块标等位置会出现浮窗,关闭后需按住 <code class='fn__code'>${hotkey}</code> 键才会出现浮窗",
|
"floatWindowModeTip": "启用后鼠标悬停块引、面包屑块标等位置会出现浮窗,关闭后需按住 <code class='fn__code'>${hotkey}</code> 键才会出现浮窗",
|
||||||
"codeSnippet": "代码片段",
|
"codeSnippet": "代码片段",
|
||||||
"useFixedPort": "使用固定端口",
|
|
||||||
"useFixedPortTip": "启用后将仅使用固定端口 <code class='fn__code'>6806</code>,关闭时同时使用随机端口和 <code class='fn__code'>6806</code>。修改后会自动关闭应用,请手动重启",
|
|
||||||
"expandDown": "向下扩选",
|
"expandDown": "向下扩选",
|
||||||
"expandUp": "向上扩选",
|
"expandUp": "向上扩选",
|
||||||
"goForward": "前进",
|
"goForward": "前进",
|
||||||
|
@ -57,14 +57,6 @@ export const about = {
|
|||||||
<div class="fn__space"></div>
|
<div class="fn__space"></div>
|
||||||
<input class="b3-switch fn__flex-center" id="networkServe" type="checkbox"${window.siyuan.config.system.networkServe ? " checked" : ""}>
|
<input class="b3-switch fn__flex-center" id="networkServe" type="checkbox"${window.siyuan.config.system.networkServe ? " checked" : ""}>
|
||||||
</label>
|
</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"}">
|
<label class="b3-label${isBrowser() ? " fn__none" : " fn__flex"}">
|
||||||
<div class="fn__flex-1">
|
<div class="fn__flex-1">
|
||||||
${window.siyuan.languages.about2}
|
${window.siyuan.languages.about2}
|
||||||
@ -369,14 +361,6 @@ export const about = {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const fixedPortElement = about.element.querySelector("#fixedPort") as HTMLInputElement;
|
|
||||||
fixedPortElement.addEventListener("change", () => {
|
|
||||||
fetchPost("/api/system/setFixedPort", {fixedPort: fixedPortElement.checked}, () => {
|
|
||||||
exportLayout(false, () => {
|
|
||||||
exitSiYuan();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
const googleAnalyticsElement = about.element.querySelector("#googleAnalytics") as HTMLInputElement;
|
const googleAnalyticsElement = about.element.querySelector("#googleAnalytics") as HTMLInputElement;
|
||||||
googleAnalyticsElement.addEventListener("change", () => {
|
googleAnalyticsElement.addEventListener("change", () => {
|
||||||
fetchPost("/api/system/setGoogleAnalytics", {googleAnalytics: googleAnalyticsElement.checked}, () => {
|
fetchPost("/api/system/setGoogleAnalytics", {googleAnalytics: googleAnalyticsElement.checked}, () => {
|
||||||
|
@ -74,7 +74,7 @@ export const initConfigSearch = (element: HTMLElement) => {
|
|||||||
"importKey", "genKey", "genKeyByPW", "copyKey", "resetRepo", "systemLogTip", "export", "visitAnnouncements",
|
"importKey", "genKey", "genKeyByPW", "copyKey", "resetRepo", "systemLogTip", "export", "visitAnnouncements",
|
||||||
"safeQuit", "directConnection", "siyuanNote", "key", "password", "copied", "resetRepoTip",
|
"safeQuit", "directConnection", "siyuanNote", "key", "password", "copied", "resetRepoTip",
|
||||||
"autoDownloadUpdatePkg", "autoDownloadUpdatePkgTip", "networkProxy", "keyPlaceholder", "initRepoKeyTip",
|
"autoDownloadUpdatePkg", "autoDownloadUpdatePkgTip", "networkProxy", "keyPlaceholder", "initRepoKeyTip",
|
||||||
"useFixedPort", "useFixedPortTip", "googleAnalytics", "googleAnalyticsTip"]),
|
"googleAnalytics", "googleAnalyticsTip"]),
|
||||||
];
|
];
|
||||||
const inputElement = element.querySelector(".b3-form__icon input") as HTMLInputElement;
|
const inputElement = element.querySelector(".b3-form__icon input") as HTMLInputElement;
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
|
@ -39,7 +39,6 @@ func ServeAPI(ginServer *gin.Engine) {
|
|||||||
ginServer.Handle("POST", "/api/system/getEmojiConf", model.CheckAuth, getEmojiConf)
|
ginServer.Handle("POST", "/api/system/getEmojiConf", model.CheckAuth, getEmojiConf)
|
||||||
ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, setAccessAuthCode)
|
ginServer.Handle("POST", "/api/system/setAccessAuthCode", model.CheckAuth, setAccessAuthCode)
|
||||||
ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, setNetworkServe)
|
ginServer.Handle("POST", "/api/system/setNetworkServe", model.CheckAuth, setNetworkServe)
|
||||||
ginServer.Handle("POST", "/api/system/setFixedPort", model.CheckAuth, setFixedPort)
|
|
||||||
ginServer.Handle("POST", "/api/system/setUploadErrLog", model.CheckAuth, setUploadErrLog)
|
ginServer.Handle("POST", "/api/system/setUploadErrLog", model.CheckAuth, setUploadErrLog)
|
||||||
ginServer.Handle("POST", "/api/system/setGoogleAnalytics", model.CheckAuth, setGoogleAnalytics)
|
ginServer.Handle("POST", "/api/system/setGoogleAnalytics", model.CheckAuth, setGoogleAnalytics)
|
||||||
ginServer.Handle("POST", "/api/system/setDownloadInstallPkg", model.CheckAuth, setDownloadInstallPkg)
|
ginServer.Handle("POST", "/api/system/setDownloadInstallPkg", model.CheckAuth, setDownloadInstallPkg)
|
||||||
|
@ -285,23 +285,6 @@ func setNetworkServe(c *gin.Context) {
|
|||||||
time.Sleep(time.Second * 3)
|
time.Sleep(time.Second * 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setFixedPort(c *gin.Context) {
|
|
||||||
ret := gulu.Ret.NewResult()
|
|
||||||
defer c.JSON(http.StatusOK, ret)
|
|
||||||
|
|
||||||
arg, ok := util.JsonArg(c, ret)
|
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
fixedPort := arg["fixedPort"].(bool)
|
|
||||||
model.Conf.System.FixedPort = fixedPort
|
|
||||||
model.Conf.Save()
|
|
||||||
|
|
||||||
util.PushMsg(model.Conf.Language(42), 1000*15)
|
|
||||||
time.Sleep(time.Second * 3)
|
|
||||||
}
|
|
||||||
|
|
||||||
func setGoogleAnalytics(c *gin.Context) {
|
func setGoogleAnalytics(c *gin.Context) {
|
||||||
ret := gulu.Ret.NewResult()
|
ret := gulu.Ret.NewResult()
|
||||||
defer c.JSON(http.StatusOK, ret)
|
defer c.JSON(http.StatusOK, ret)
|
||||||
|
@ -35,7 +35,6 @@ type System struct {
|
|||||||
DataDir string `json:"dataDir"`
|
DataDir string `json:"dataDir"`
|
||||||
|
|
||||||
NetworkServe bool `json:"networkServe"` // 是否开启网络伺服
|
NetworkServe bool `json:"networkServe"` // 是否开启网络伺服
|
||||||
FixedPort bool `json:"fixedPort"` // 是否使用固定端口 6806
|
|
||||||
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
NetworkProxy *NetworkProxy `json:"networkProxy"`
|
||||||
|
|
||||||
UploadErrLog bool `json:"uploadErrLog"`
|
UploadErrLog bool `json:"uploadErrLog"`
|
||||||
|
@ -296,13 +296,6 @@ func InitConf() {
|
|||||||
Conf.AccessAuthCode = util.AccessAuthCode
|
Conf.AccessAuthCode = util.AccessAuthCode
|
||||||
}
|
}
|
||||||
|
|
||||||
if util.ContainerStd != util.Container {
|
|
||||||
Conf.System.FixedPort = true
|
|
||||||
}
|
|
||||||
if Conf.System.FixedPort {
|
|
||||||
util.ServerPort = util.FixedPort
|
|
||||||
}
|
|
||||||
|
|
||||||
Conf.LocalIPs = util.GetLocalIPs()
|
Conf.LocalIPs = util.GetLocalIPs()
|
||||||
|
|
||||||
Conf.Save()
|
Conf.Save()
|
||||||
|
Loading…
Reference in New Issue
Block a user