Skip to content

Commit

Permalink
Merge pull request #739 from Hi-Windom/v0.34
Browse files Browse the repository at this point in the history
V0.34
  • Loading branch information
Soltus authored May 18, 2024
2 parents ffdfc2b + 70314d3 commit 871ce89
Show file tree
Hide file tree
Showing 36 changed files with 1,800 additions and 538 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions/Sillot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sillot",
"displayName": "汐洛 Sillot",
"description": "汐洛彖夲肜矩阵(Sillot T☳Converbenk Matrix)为智慧新彖务服务。此插件为汐洛官方插件,提供多功能一体化集成。",
"version": "0.34.1310",
"version": "0.34.1320",
"preview": true,
"repository": "https://github.com/Hi-Windom/Sillot",
"publisher": "Hi-Windom",
Expand Down
7 changes: 6 additions & 1 deletion app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "Are you sure you want to delete <b>${x}</b> and its ${y} subdocs?",
"confirmDeleteTip": "Are you sure to delete <b>${x}</b>?",
"rollbackTip": "After deletion, it can be restored in [Data History], retained <code class= 'fn__code'>${x}</code> days according to [Settings - Editor - History Retention Days]",
"newView": "Add View",
"newCol": "Add column",
"newRow": "Add entry",
"enterKey": "Enter",
"doubleClick": "Double Click",
"click": "Click",
Expand Down Expand Up @@ -682,7 +688,6 @@
"customEmoji": "Add custom emoji",
"customEmojiTip": "Open <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">Emoji folder</a>, put the picture in and click the refresh button",
"recentEmoji": "Common Emoticons",
"andSubFile": "and its <b>x</b> subdocs",
"changeIcon": "Change icon",
"addIcon": "Add icon",
"includeSubFile": "\nInclude x subdocs",
Expand Down
9 changes: 7 additions & 2 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "¿Está seguro de que desea eliminar <b>${x}</b> y sus subdocumentos ${y}?",
"confirmDeleteTip": "¿Está seguro de eliminar <b>${x}</b>?",
"rollbackTip": "Después de la eliminación, se puede restaurar en [Historial de datos] y se conserva <code class= 'fn__code'>${x}</code> días según [Configuración - Editor - Días de retención del historial]",
"newView": "Agregar vista",
"newCol": "Agregar columna",
"newRow": "Agregar entrada",
"enterKey": "Entrar",
"doubleClick": "Doble clic",
"click": "Hacer clic",
Expand Down Expand Up @@ -231,7 +237,7 @@
"hideAll": "Ocultar todo",
"showAll": "Mostrar todo",
"showCol": "Mostrar columna",
"número": "Número",
"number": "Número",
"fecha": "Fecha",
"seleccionar": "Seleccionar",
"multiSelect": "Selección múltiple",
Expand Down Expand Up @@ -682,7 +688,6 @@
"customEmoji": "Añadir un emoji personalizado",
"customEmojiTip": "Abrir <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">carpeta de emojis</a>, poner la imagen y hacer clic en el botón de actualización",
"recentEmoji": "Emoticonos comunes",
"andSubFile": "y sus <b>x</b> documentos secundarios",
"changeIcon": "Cambiar el icono",
"addIcon": "Agregar icono",
"includeSubFile": "\nIncluir x documentos secundarios",
Expand Down
9 changes: 7 additions & 2 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "Êtes-vous sûr de vouloir supprimer <b>${x}</b> et ses sous-documents ${y} ?",
"confirmDeleteTip": "Êtes-vous sûr de supprimer <b>${x}</b> ?",
"rollbackTip": "Après la suppression, il peut être restauré dans [Historique des données], conservé <code class= 'fn__code'>${x}</code> jours selon [Paramètres - Éditeur - Jours de rétention de l'historique]",
"newView": "Ajouter une vue",
"newCol": "Ajouter une colonne",
"newRow": "Ajouter une entrée",
"enterKey": "Entrer",
"doubleClick": "Double-clic",
"click": "Cliquez sur",
Expand Down Expand Up @@ -231,7 +237,7 @@
"hideAll": "Masquer tout",
"showAll": "Afficher tout",
"showCol": "Afficher la colonne",
"numéro": "Numéro",
"number": "Numéro",
"date": "Date",
"select": "Sélectionner",
"multiSelect": "Multi-sélection",
Expand Down Expand Up @@ -682,7 +688,6 @@
"customEmoji": "Ajouter un emoji personnalisé",
"customEmojiTip": "Ouvrir <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">Emoji folder</a>, insérez l'image et cliquez sur le bouton d'actualisation",
"recentEmoji": "Emoticônes courantes",
"andSubFile": "et son <b>x</b> sous-documents",
"changeIcon": "Changer l'icône",
"addIcon": "Ajouter une icône",
"includeSubFile": "\nInclure x sous-documents",
Expand Down
7 changes: 6 additions & 1 deletion app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "<b>${x}</b> とそのサブドキュメント ${y} を削除してもよろしいですか?",
"confirmDeleteTip": "<b>${x}</b> を削除してもよろしいですか?",
"rollbackTip": "削除後は [データ履歴] で復元でき、<code class= 'fn__code'>${x}</code> は保持されます。 [設定 - エディター - 履歴の保存日数] による日数",
"newView": "ビューを追加",
"newCol": "列を追加",
"newRow": "エントリを追加",
"enterKey": "入力",
"doubleClick": "ダブルクリック",
"click": "クリック",
Expand Down Expand Up @@ -682,7 +688,6 @@
"customEmoji": "絵文字を追加",
"customEmojiTip": "<a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">絵文字フォルダ</a>に画像を入れて更新ボタンをクリックしてください",
"recentEmoji": "よく使う絵文字",
"andSubFile": "およびその <b>x</b> サブドキュメント",
"changeIcon": "アイコンを変更",
"addIcon": "アイコンを追加",
"includeSubFile": "\nx 個のサブドキュメントを含む",
Expand Down
7 changes: 6 additions & 1 deletion app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "決定刪除 <b>${x}</b> 及其 ${y} 個子文件嗎?",
"confirmDeleteTip": "確定刪除<b>${x}</b> 嗎?",
"rollbackTip": "刪除後可在 [資料歷史] 中恢復,按 [設定 - 編輯器 - 歷史保留天數] 保留 <code class= 'fn__code'>${x}</code> 天",
"newView": "新增視圖",
"newCol": "新增列",
"newRow": "新增項目",
"enterKey": "回車",
"doubleClick": "雙擊",
"click": "點擊",
Expand Down Expand Up @@ -682,7 +688,6 @@
"customEmoji": "新增自訂表情",
"customEmojiTip": "打開 <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">Emoji 資料夾</a> 放入圖片後並點擊重新整理按鈕",
"recentEmoji": "常用表情",
"andSubFile": "及其 <b>x</b> 個子文檔",
"changeIcon": "修改圖示",
"addIcon": "新增圖示",
"includeSubFile": "\n包含 x 個子文檔",
Expand Down
7 changes: 6 additions & 1 deletion app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"andSubFile": "确定删除 <b>${x}</b> 及其 ${y} 个子文档吗?",
"confirmDeleteTip": "确定删除 <b>${x}</b> 吗?",
"rollbackTip": "删除后可在 [数据历史] 中恢复,按 [设置 - 编辑器 - 历史保留天数] 保留 <code class='fn__code'>${x}</code> 天",
"newView": "添加视图",
"newCol": "添加列",
"newRow": "添加条目",
"enterKey": "回车",
"doubleClick": "双击",
"click": "点击",
Expand Down Expand Up @@ -683,7 +689,6 @@
"customEmoji": "添加自定义表情",
"customEmojiTip": "打开 <a href=\"javascript:void(0)\" id=\"appearanceOpenEmoji\">Emoji 文件夹</a> 放入图片后并点击刷新按钮",
"recentEmoji": "常用表情",
"andSubFile": "及其 <b>x</b> 个子文档",
"changeIcon": "修改图标",
"addIcon": "添加图标",
"includeSubFile": "\n包含 x 个子文档",
Expand Down
24 changes: 11 additions & 13 deletions app/electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,9 @@ const initMainWindow = () => {
height: defaultHeight,
}, oldWindowState);

// writeLog("windowStat [width=" + windowState.width + ", height=" + windowState.height + "], default [width=" + defaultWidth + ", height=" + defaultHeight + "], workArea [width=" + workArea.width + ", height=" + workArea.height + "]");
writeLog("windowStat [x=" + windowState.x + ", y=" + windowState.y + ", width=" + windowState.width + ", height=" + windowState.height + "], default [width=" + defaultWidth + ", height=" + defaultHeight + "], workArea [width=" + workArea.width + ", height=" + workArea.height + "]");

let resetToCenter = false
let x = windowState.x;
let y = windowState.y;
if (workArea) {
Expand All @@ -356,25 +357,22 @@ const initMainWindow = () => {
windowState.width = Math.min(defaultWidth, workArea.width);
windowState.height = Math.min(defaultHeight, workArea.height);
}
if (x > workArea.width) {
x = 0;
}
if (y > workArea.height) {
y = 0;

if (x >= workArea.width * 0.8 || y >= workArea.height * 0.8) {
resetToCenter = true;
}
}

if (x < 0 || y < 0) {
resetToCenter = true;
}

if (windowState.width < 493) {
windowState.width = 493;
}
if (windowState.height < 376) {
windowState.height = 376;
}
if (x < 0) {
x = 0;
}
if (y < 0) {
y = 0;
}

// 创建主窗体
console.log("action: 创建主窗体");
Expand All @@ -400,7 +398,7 @@ const initMainWindow = () => {
});
remote.enable(currentWindow.webContents);

windowStateInitialized ? currentWindow.setPosition(x, y) : currentWindow.center();
resetToCenter ? currentWindow.center() : currentWindow.setPosition(x, y);
currentWindow.webContents.userAgent = "SiYuan-Sillot/" + appVer + " https://b3log.org/siyuan Electron " + currentWindow.webContents.userAgent;

// set proxy
Expand Down
Loading

0 comments on commit 871ce89

Please sign in to comment.