diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index 9f7c2997e..620eeba08 100644
--- a/app/src/assets/scss/mobile.scss
+++ b/app/src/assets/scss/mobile.scss
@@ -145,6 +145,7 @@
flex: 1;
font-size: 17px;
min-height: 30px;
+ line-height: 30px;
}
}
diff --git a/app/src/assets/template/mobile/index.tpl b/app/src/assets/template/mobile/index.tpl
index a066fb8af..9917a3604 100644
--- a/app/src/assets/template/mobile/index.tpl
+++ b/app/src/assets/template/mobile/index.tpl
@@ -35,6 +35,7 @@
+
@@ -44,6 +45,7 @@
@@ -56,11 +89,14 @@ export class Inbox extends Model {
`;
+ /// #endif
const countElement = this.element.querySelector(".inboxSelectCount");
const detailsElement = this.element.querySelector(".inbox__details");
const selectAllElement = this.element.querySelector(".block__icons input") as HTMLInputElement;
this.element.addEventListener("click", (event: MouseEvent) => {
+ /// #if !MOBILE
setPanelFocus(this.element);
+ /// #endif
let target = event.target as HTMLElement;
while (target && !target.isEqualNode(this.element)) {
const typeElement = hasClosestByAttribute(target, "data-type", null);
@@ -181,7 +217,9 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)}
}
);
this.update();
+ /// #if !MOBILE
setPanelFocus(this.element);
+ /// #endif
}
private updateAction() {
@@ -296,7 +334,7 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)}
`;
return;
}
- const refreshElement = this.element.querySelector('[data-type="refresh"] svg');
+ const refreshElement = this.element.querySelector(`[data-type="refresh"]${isMobile() ? "" : " svg"}`);
if (refreshElement.classList.contains("fn__rotate")) {
return;
}
@@ -327,8 +365,8 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)}
this.pageCount = response.data.data.pagination.paginationRecordCount;
this.element.querySelector(".inboxSelectCount").innerHTML = `${this.selectIds.length}/${this.pageCount}`;
- const previousElement = this.element.querySelector('span[data-type="previous"]');
- const nextElement = this.element.querySelector('span[data-type="next"]');
+ const previousElement = this.element.querySelector('[data-type="previous"]');
+ const nextElement = this.element.querySelector('[data-type="next"]');
if (response.data.data.pagination.paginationPageCount > this.currentPage) {
nextElement.removeAttribute("disabled");
} else {
@@ -340,7 +378,7 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)}
previousElement.removeAttribute("disabled");
}
const selectCount = this.element.lastElementChild.querySelectorAll(".b3-list-item").length;
- (this.element.querySelector(".block__icons input") as HTMLInputElement).checked = this.element.lastElementChild.querySelectorAll("input:checked").length === selectCount && selectCount !== 0;
+ this.element.firstElementChild.querySelector("input").checked = this.element.lastElementChild.querySelectorAll("input:checked").length === selectCount && selectCount !== 0;
});
}
}
diff --git a/app/src/mobile/util/MobileBacklinks.ts b/app/src/mobile/dock/MobileBacklinks.ts
similarity index 100%
rename from app/src/mobile/util/MobileBacklinks.ts
rename to app/src/mobile/dock/MobileBacklinks.ts
diff --git a/app/src/mobile/util/MobileBookmarks.ts b/app/src/mobile/dock/MobileBookmarks.ts
similarity index 100%
rename from app/src/mobile/util/MobileBookmarks.ts
rename to app/src/mobile/dock/MobileBookmarks.ts
diff --git a/app/src/mobile/util/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts
similarity index 100%
rename from app/src/mobile/util/MobileFiles.ts
rename to app/src/mobile/dock/MobileFiles.ts
diff --git a/app/src/mobile/util/MobileOutline.ts b/app/src/mobile/dock/MobileOutline.ts
similarity index 100%
rename from app/src/mobile/util/MobileOutline.ts
rename to app/src/mobile/dock/MobileOutline.ts
diff --git a/app/src/mobile/util/MobileTags.ts b/app/src/mobile/dock/MobileTags.ts
similarity index 100%
rename from app/src/mobile/util/MobileTags.ts
rename to app/src/mobile/dock/MobileTags.ts
diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts
index 17ced8652..4214bf2dd 100644
--- a/app/src/mobile/menu/search.ts
+++ b/app/src/mobile/menu/search.ts
@@ -532,7 +532,7 @@ export const popSearch = (config = window.siyuan.storage[Constants.LOCAL_SEARCHD
});
openModel({
- title: `
`,
+ title: `
`,
icon: "iconSearch",
html: `
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index cd3524691..371498073 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -9,14 +9,15 @@ import {renderSnippet} from "../../config/util/snippets";
import {setEmpty} from "./setEmpty";
import {getIdZoomInByPath, getOpenNotebookCount} from "../../util/pathName";
import {popMenu} from "../menu";
-import {MobileFiles} from "./MobileFiles";
-import {MobileOutline} from "./MobileOutline";
+import {MobileFiles} from "../dock/MobileFiles";
+import {MobileOutline} from "../dock/MobileOutline";
import {hasTopClosestByTag} from "../../protyle/util/hasClosest";
-import {MobileBacklinks} from "./MobileBacklinks";
-import {MobileBookmarks} from "./MobileBookmarks";
-import {MobileTags} from "./MobileTags";
+import {MobileBacklinks} from "../dock/MobileBacklinks";
+import {MobileBookmarks} from "../dock/MobileBookmarks";
+import {MobileTags} from "../dock/MobileTags";
import {activeBlur, hideKeyboardToolbar, initKeyboardToolbar} from "./keyboardToolbar";
import {syncGuide} from "../../sync/syncGuide";
+import {Inbox} from "../../layout/dock/Inbox";
export const initFramework = () => {
setInlineStyle();
@@ -26,6 +27,7 @@ export const initFramework = () => {
let outline: MobileOutline;
let backlink: MobileBacklinks;
let bookmark: MobileBookmarks;
+ let inbox: Inbox;
let tag: MobileTags;
// 不能使用 getEventName,否则点击返回会展开右侧栏
const firstToolbarElement = sidebarElement.querySelector(".toolbar--border");
@@ -71,6 +73,8 @@ export const initFramework = () => {
} else {
tag.update();
}
+ } else if (type === "sidebar-inbox-tab" && !inbox) {
+ inbox = new Inbox(document.querySelector('#sidebar [data-type="sidebar-inbox"]'));
}
svgElement.classList.add("toolbar__icon--active");
sidebarElement.lastElementChild.querySelector(`[data-type="${itemType.replace("-tab", "")}"]`).classList.remove("fn__none");