Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8d23fc969b
6 changed files with 21 additions and 15 deletions
|
@ -1492,8 +1492,8 @@
|
|||
"241": "Drag to its subheading is not supported",
|
||||
"242": "The binding block already exists in the current database",
|
||||
"243": "Only list the first [%d] tags (including subtags), if you need to adjust, please modify [Settings - Doc Tree - Maximum number to list]",
|
||||
"244": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]",
|
||||
"245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. To exit normally, you need to use [Exit Application] in the right panel",
|
||||
"244": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. In the future, please exit the program completely before shutting down the computer",
|
||||
"245": "It did not exit normally after the last use. It is recommended to execute [Doc Tree - Rebuild Index]. In the future, please use [Exit Application] in the right panel to exit normally",
|
||||
"246": "The document title cannot contain / and has been replaced with _"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1492,8 +1492,8 @@
|
|||
"241": "No se admite arrastrar a su subtítulo",
|
||||
"242": "El bloque de enlace ya existe en la base de datos actual",
|
||||
"243": "Enumere solo las primeras [%d] etiquetas (incluidas las subetiquetas), modifique [Configuración - Árbol de documentos - Número máximo a listar]",
|
||||
"244": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]",
|
||||
"245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. Para salir normalmente, necesita usar [Salir de la aplicación] en el panel derecho",
|
||||
"244": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. En el futuro, salga del programa por completo antes de apagar la computadora",
|
||||
"245": "No salió normalmente después del último uso. Se recomienda ejecutar [Árbol de documentos - Reconstruir índice]. En el futuro, utilice [Salir de la aplicación] en el panel derecho para salir normalmente",
|
||||
"246": "El título del documento no puede contener / y ha sido reemplazado por _"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1492,8 +1492,8 @@
|
|||
"241": "Le glisser vers son sous-titre n'est pas pris en charge",
|
||||
"242": "Le bloc de liaison existe déjà dans la base de données actuelle",
|
||||
"243": "Répertorier uniquement les [%d] premières balises (y compris les sous-balises). veuillez modifier [Paramètres - Arbre des documents - Nombre maximum de documents à lister].",
|
||||
"244": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]",
|
||||
"245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Rebuild Index]. Pour quitter normalement, vous devez utiliser [Quitter l'application] dans le panneau de droite",
|
||||
"244": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Reconstruire l'index]. À l'avenir, veuillez quitter complètement le programme avant d'éteindre l'ordinateur",
|
||||
"245": "Il ne s'est pas terminé normalement après la dernière utilisation. Il est recommandé d'exécuter [Doc Tree - Reconstruire l'index]. À l'avenir, veuillez utiliser [Quitter l'application] dans le panneau de droite pour quitter normalement",
|
||||
"246": "Le titre du document ne peut pas contenir / et a été remplacé par _"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1492,8 +1492,8 @@
|
|||
"241": "不支持拖曳為自己的子標題",
|
||||
"242": "目前資料庫中已經存在該綁定區塊",
|
||||
"243": "僅列出前 [%d] 個標籤(含子標籤),如需調整請修改 [設置 - 文檔樹 - 最大列出數量]",
|
||||
"244": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]",
|
||||
"245": "上次使用後未正常退出,建議執行一次 [文件樹 - 重建索引],正常退出需使用右側欄面板中的 [退出應用]",
|
||||
"244": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]。以後請完整退出程式後再關閉電腦",
|
||||
"245": "上次使用後未正常退出,建議執行一次 [文檔樹 - 重建索引]。以後請使用右側欄面板中的 [退出應用] 進行正常退出",
|
||||
"246": "文件標題不能包含 /,已經使用 _ 替換"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1492,8 +1492,8 @@
|
|||
"241": "不支持拖拽为自己的子标题",
|
||||
"242": "当前数据库中已经存在该绑定块",
|
||||
"243": "仅列出前 [%d] 个标签(含子标签),如需调整请修改 [设置 - 文档树 - 最大列出数量]",
|
||||
"244": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]",
|
||||
"245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引],正常退出需使用右侧栏面板中的 [退出应用]",
|
||||
"244": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]。以后请完整退出程序后再关闭电脑",
|
||||
"245": "上次使用后未正常退出,建议执行一次 [文档树 - 重建索引]。以后请使用右侧栏面板中的 [退出应用] 进行正常退出",
|
||||
"246": "文档标题不能包含 /,已经使用 _ 替换"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,6 +230,11 @@ const writeLog = (out) => {
|
|||
}
|
||||
};
|
||||
|
||||
let openAsHidden = false;
|
||||
isOpenAsHidden = function () {
|
||||
return 1 === workspaces.length && openAsHidden;
|
||||
}
|
||||
|
||||
const initMainWindow = () => {
|
||||
let windowStateInitialized = true;
|
||||
// 恢复主窗体状态
|
||||
|
@ -382,8 +387,8 @@ const initMainWindow = () => {
|
|||
|
||||
// 主界面事件监听
|
||||
currentWindow.once("ready-to-show", () => {
|
||||
if (workspaces.length === 0 && openAsHidden) {
|
||||
bootWindow.minimize();
|
||||
if (isOpenAsHidden()) {
|
||||
currentWindow.minimize();
|
||||
} else {
|
||||
currentWindow.show();
|
||||
if (windowState.isMaximized) {
|
||||
|
@ -444,10 +449,12 @@ const showWindow = (wnd) => {
|
|||
const initKernel = (workspace, port, lang) => {
|
||||
return new Promise(async (resolve) => {
|
||||
bootWindow = new BrowserWindow({
|
||||
show: false,
|
||||
width: Math.floor(screen.getPrimaryDisplay().size.width / 2),
|
||||
height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height / 2),
|
||||
frame: false,
|
||||
backgroundColor: "#1e1e1e",
|
||||
resizable: false,
|
||||
icon: path.join(appDir, "stage", "icon-large.png"),
|
||||
});
|
||||
let bootIndex = path.join(appDir, "app", "electron", "boot.html");
|
||||
|
@ -567,9 +574,7 @@ const initKernel = (workspace, port, lang) => {
|
|||
try {
|
||||
const apiResult = await net.fetch(getServer() + "/api/system/version");
|
||||
apiData = await apiResult.json();
|
||||
bootWindow.setResizable(false);
|
||||
bootWindow.loadURL(getServer() + "/appearance/boot/index.html");
|
||||
bootWindow.show();
|
||||
break;
|
||||
} catch (e) {
|
||||
writeLog("get kernel version failed: " + e.message);
|
||||
|
@ -633,13 +638,14 @@ let argStart = 1;
|
|||
if (!app.isPackaged) {
|
||||
argStart = 2;
|
||||
}
|
||||
let openAsHidden = false;
|
||||
|
||||
for (let i = argStart; i < process.argv.length; i++) {
|
||||
let arg = process.argv[i];
|
||||
if (arg.startsWith("--workspace=") || arg.startsWith("--openAsHidden") || arg.startsWith("--port=") || arg.startsWith("siyuan://")) {
|
||||
// 跳过内置参数
|
||||
if (arg.startsWith("--openAsHidden")) {
|
||||
openAsHidden = true;
|
||||
writeLog("open as hidden");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue