Skip to content

Commit

Permalink
Merge pull request #755 from Hi-Windom/v0.35
Browse files Browse the repository at this point in the history
V0.35
  • Loading branch information
Soltus authored May 22, 2024
2 parents e339564 + 527a0a7 commit 0ff4df5
Show file tree
Hide file tree
Showing 33 changed files with 745 additions and 699 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.35.1100",
"version": "0.35.1200",
"preview": true,
"repository": "https://github.com/Hi-Windom/Sillot",
"publisher": "Hi-Windom",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "The currently used version is the Microsoft Store version, please check for updates in the Microsoft Store",
"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]",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "La versión utilizada actualmente es la versión de Microsoft Store, verifique si hay actualizaciones en Microsoft Store",
"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]",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "La version actuellement utilisée est la version du Microsoft Store, veuillez vérifier les mises à jour dans le Microsoft Store",
"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]",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "現在使用されているバージョンは Microsoft Store バージョンです。Microsoft Store で更新プログラムを確認してください",
"andSubFile": "<b>${x}</b> とそのサブドキュメント ${y} を削除してもよろしいですか?",
"confirmDeleteTip": "<b>${x}</b> を削除してもよろしいですか?",
"rollbackTip": "削除後は [データ履歴] で復元でき、<code class= 'fn__code'>${x}</code> は保持されます。 [設定 - エディター - 履歴の保存日数] による日数",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "目前使用的版本為 Microsoft Store 版本,請在 Microsoft Store 中檢查更新",
"andSubFile": "決定刪除 <b>${x}</b> 及其 ${y} 個子文件嗎?",
"confirmDeleteTip": "確定刪除<b>${x}</b> 嗎?",
"rollbackTip": "刪除後可在 [資料歷史] 中恢復,按 [設定 - 編輯器 - 歷史保留天數] 保留 <code class= 'fn__code'>${x}</code> 天",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"isMsStoreVerTip": "当前使用的版本为微软商店版,请在微软商店中检查更新",
"andSubFile": "确定删除 <b>${x}</b> 及其 ${y} 个子文档吗?",
"confirmDeleteTip": "确定删除 <b>${x}</b> 吗?",
"rollbackTip": "删除后可在 [数据历史] 中恢复,按 [设置 - 编辑器 - 历史保留天数] 保留 <code class='fn__code'>${x}</code> 天",
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sillot",
"version": "0.35.1100",
"version": "0.35.1200",
"syv": "3.0.16",
"sypv": "[]",
"description": "Build Your Eternal Digital Garden",
Expand Down
45 changes: 26 additions & 19 deletions app/src/config/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ import {isAppMode} from "sofill/env"
export const about = {
element: undefined as Element,
genHTML: () => {
const checkUpdateHTML = window.siyuan.config.system.isMicrosoftStore ? `<div class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.currentVer} v${Constants.SIYUAN_VERSION}${window.siyuan.languages.baseSY} v${Constants.SIYUAN_ORIGIN_VERSION}
<span id="isInsider"></span>
<div class="b3-label__text">${window.siyuan.languages.isMsStoreVerTip}</div>
</div>
</div>` : `<div class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.currentVer} v${Constants.SIYUAN_VERSION}${window.siyuan.languages.baseSY} v${Constants.SIYUAN_ORIGIN_VERSION}
<span id="isInsider"></span>
<div class="b3-label__text">${window.siyuan.languages.downloadLatestVer}</div>
</div>
<div class="fn__space"></div>
<div class="fn__flex-center fn__size200 config__item-line">
<button id="checkUpdateBtn" class="b3-button b3-button--outline fn__block">
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.checkUpdate}
</button>
</div>
</div>`;
return `<div class="fn__flex b3-label config__item${isBrowser() || window.siyuan.config.system.isMicrosoftStore || "std" !== window.siyuan.config.system.container || "linux" === window.siyuan.config.system.os ? " fn__none" : ""}">
<div class="fn__flex-1">
${window.siyuan.languages.autoLaunch}
Expand Down Expand Up @@ -147,27 +166,15 @@ ${
<svg><use xlink:href="#iconUpload"></use></svg>${window.siyuan.languages.export}
</button>
</div>
<div class="fn__flex b3-label config__item">
${checkUpdateHTML}
${ isAppMode() ? `
<div class="fn__flex config__item b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.currentVer} v${Constants.SIYUAN_VERSION}${window.siyuan.languages.baseSY} v${Constants.SIYUAN_ORIGIN_VERSION}
<span id="isInsider"></span>
<div class="b3-label__text">${window.siyuan.languages.downloadLatestVer}</div>
${window.siyuan.languages.about13}
<div class="b3-label__text" id="tokenTip">${window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token)}</div>
</div>
<div class="fn__space"></div>
<div class="fn__flex-center fn__size200 config__item-line">
<button id="checkUpdateBtn" class="b3-button b3-button--outline fn__block">
<svg><use xlink:href="#iconRefresh"></use></svg>${window.siyuan.languages.checkUpdate}
</button>
</div>
</div>
${
isAppMode() ? `<div class="fn__flex config__item b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.about13}
<div class="b3-label__text" id="tokenTip">${window.siyuan.languages.about14.replace("${token}", window.siyuan.config.api.token)}</div>
</div>
<span class="fn__space"></span>
<input class="b3-text-field fn__flex-center fn__size200" id="token" value="${window.siyuan.config.api.token}">
<span class="fn__space"></span>
<input class="b3-text-field fn__flex-center fn__size200" id="token" value="${window.siyuan.config.api.token}">
</div>` : ""
}
<div class="b3-label${(window.siyuan.config.system.container === "std" || window.siyuan.config.system.container === "docker") ? "" : " fn__none"}">
Expand Down
3 changes: 2 additions & 1 deletion app/src/layout/Tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Constants} from "../constants";
import {escapeGreat, escapeHtml} from "../util/escape";
import {unicode2Emoji} from "../emoji";
import {fetchPost} from "../util/fetch";
import {showTooltip} from "../dialog/tooltip";
import {hideTooltip, showTooltip} from "../dialog/tooltip";
import {isTouchDevice} from "../util/functions";
/// #if !BROWSER
import {openNewWindow} from "../window/openNewWindow";
Expand Down Expand Up @@ -77,6 +77,7 @@ export class Tab {
return;
}
window.getSelection().removeAllRanges();
hideTooltip();
const tabElement = hasClosestByTag(event.target, "LI");
if (tabElement) {
event.dataTransfer.setData("text/html", tabElement.outerHTML);
Expand Down
10 changes: 4 additions & 6 deletions app/src/layout/Wnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,15 +315,13 @@ export class Wnd {
const width = rect.width;
const x = event.clientX - rect.left;
const y = event.clientY - rect.top;
if ((x <= width / 3 && (y <= height / 8 || y >= height * 7 / 8)) ||
(x <= width / 8 && (y > height / 8 || y < height * 7 / 8))) {
if (x <= width / 8 || (x <= width / 3 && x > width / 8 && y >= height / 8 && y <= height * 7 / 8)) {
dragElement.setAttribute("style", "height:100%;width:50%;right:50%;bottom:0;left:0;top:0");
} else if ((x > width * 2 / 3 && (y <= height / 8 || y >= height * 7 / 8)) ||
(x >= width * 7 / 8 && (y > height / 8 || y < height * 7 / 8))) {
} else if (x >= width * 7 / 8 || (x >= width * 2 / 3 && x < width * 7 / 8 && y >= height / 8 && y <= height * 7 / 8)) {
dragElement.setAttribute("style", "height:100%;width:50%;right:0;bottom:0;left:50%;top:0");
} else if (x > width / 3 && x < width * 2 / 3 && y <= height / 8) {
} else if (y <= height / 8) {
dragElement.setAttribute("style", "height:50%;width:100%;right:0;bottom:50%;left:0;top:0");
} else if (x > width / 3 && x < width * 2 / 3 && y >= height * 7 / 8) {
} else if (y >= height * 7 / 8) {
dragElement.setAttribute("style", "height:50%;width:100%;right:0;bottom:0;left:0;top:50%");
} else {
dragElement.setAttribute("style", "height:100%;width:100%;right:0;bottom:0;top:0;left:0");
Expand Down
18 changes: 10 additions & 8 deletions app/src/layout/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {MenuItem} from "../menus/Menu";
import {Constants} from "../constants";
import {toggleDockBar} from "./dock/util";
import SillotDrawer from "./SillotDrawer";
import {updateHotkeyTip} from "../protyle/util/compatibility";
import {isIPad, updateHotkeyTip} from "../protyle/util/compatibility";
import {isPadAppMode} from "sofill/env"

export const initStatus = (isWindow = false) => {
Expand Down Expand Up @@ -74,13 +74,15 @@ export const initStatus = (isWindow = false) => {
}
window.siyuan.menus.menu.remove();
window.siyuan.menus.menu.element.setAttribute("data-name", "statusHelp");
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.userGuide,
icon: "iconHelp",
click: () => {
mountHelp();
}
}).element);
if (!isIPad()) {
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.userGuide,
icon: "iconHelp",
click: () => {
mountHelp();
}
}).element);
}
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.feedback,
icon: "iconFeedback",
Expand Down
4 changes: 2 additions & 2 deletions app/src/layout/tabUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {Tag} from "./dock/Tag";
import {Search} from "../search";
import {Custom} from "./dock/Custom";
import {newCardModel} from "../card/newCardTab";
import {updateHotkeyTip} from "../protyle/util/compatibility";
import {isIPad, updateHotkeyTip} from "../protyle/util/compatibility";
import {openSearch} from "../search/spread";
import {openRecentDocs} from "../business/openRecentDocs";
import {openHistory} from "../history/history";
Expand Down Expand Up @@ -197,7 +197,7 @@ export const newCenterEmptyTab = (app: App) => {
<svg class="b3-list-item__graphic"><use xlink:href="#iconFilesRoot"></use></svg>
<span>${window.siyuan.languages.newNotebook}</span>
</div>
<div class="b3-list-item" id="editorEmptyHelp">
<div class="b3-list-item${isIPad() ? " fn__none" : ""}" id="editorEmptyHelp">
<svg class="b3-list-item__graphic"><use xlink:href="#iconHelp"></use></svg>
<span>${window.siyuan.languages.userGuide}</span>
</div>
Expand Down
16 changes: 9 additions & 7 deletions app/src/menus/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,15 @@ export const workspaceMenu = (app: App, rect: DOMRect) => {
}).element);
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
}
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.userGuide,
icon: "iconHelp",
click: () => {
mountHelp();
}
}).element);
if (!isIPad()) {
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.userGuide,
icon: "iconHelp",
click: () => {
mountHelp();
}
}).element);
}
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.feedback,
icon: "iconFeedback",
Expand Down
4 changes: 2 additions & 2 deletions app/src/mobile/menu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {initAbout} from "../settings/about";
import {getRecentDocs} from "./getRecentDocs";
import {initEditor} from "../settings/editor";
import type {App} from "../../index";
import {isHuawei, isInAndroid, isInIOS} from "../../protyle/util/compatibility";
import {isHuawei, isInAndroid, isInIOS, isIPhone} from "../../protyle/util/compatibility";
import {newFile} from "../../util/newFile";
import {afterLoadPlugin} from "../../plugin/loader";
import {Menu} from "../../plugin/Menu";
Expand Down Expand Up @@ -114,7 +114,7 @@ export const initRightMenu = (app: App) => {
<svg class="b3-menu__icon"><use xlink:href="#iconPlugin"></use></svg><span class="b3-menu__label">${window.siyuan.languages.plugin}</span>
</div>
<div class="b3-menu__separator"></div>
<div class="b3-menu__item b3s-mobile-height-menu__item" id="menuHelp">
<div class="b3-menu__item b3s-mobile-height-menu__item${isIPhone() ? " fn__none" : ""}" id="menuHelp">
<svg class="b3-menu__icon"><use xlink:href="#iconHelp"></use></svg><span class="b3-menu__label">${window.siyuan.languages.userGuide}</span>
</div>
<a class="b3-menu__item b3s-mobile-height-menu__item" id="androidFeedback">
Expand Down
Loading

0 comments on commit 0ff4df5

Please sign in to comment.