diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index b36efa98e..3250a9233 100644
--- a/app/src/assets/scss/mobile.scss
+++ b/app/src/assets/scss/mobile.scss
@@ -31,12 +31,55 @@
.b3-list--mobile {
+ .counter {
+ line-height: 36px;
+ height: 36px;
+ font-size: 16px;
+ border-radius: 4px;
+ }
+
& > .fn__flex-column {
height: 100%;
}
.b3-list-item {
- font-size: 16px;
+ font-size: 18px;
+ line-height: 36px;
+ padding: 4px;
+
+ &__icon {
+ font-size: 18px;
+ line-height: 36px;
+ height: auto;
+ }
+
+ &__graphic {
+ width: 20px;
+ height: 20px;
+ padding: 8px 4px;
+ line-height: 20px;
+ font-size: 20px;
+ }
+
+ &__toggle {
+ padding: 11px;
+ height: auto;
+ }
+
+ &__arrow {
+ height: 14px;
+ width: 14px;
+ }
+
+ &__action {
+ padding: 8px;
+ height: 20px;
+
+ svg {
+ width: 20px;
+ height: 20px;
+ }
+ }
}
}
@@ -65,7 +108,7 @@
background: var(--b3-theme-background);
&--border {
- border-bottom: 1px solid var(--b3-theme-surface-lighter);
+ border-bottom: .5px solid var(--b3-theme-background-light);
}
&--dark {
@@ -73,8 +116,8 @@
}
&__icon {
- height: 18px;
- width: 18px;
+ height: 20px;
+ width: 20px;
padding: 8px;
flex-shrink: 0;
margin: 6px 4px;
@@ -97,11 +140,8 @@
min-width: 1px;
line-height: 30px;
font-size: 17px;
-
- &:focus,
- &:hover {
- box-shadow: none;
- }
+ padding: 0;
+ border: 0;
}
&__search {
diff --git a/app/src/assets/template/mobile/index.tpl b/app/src/assets/template/mobile/index.tpl
index 3c9cd5f37..7863f6cd3 100644
--- a/app/src/assets/template/mobile/index.tpl
+++ b/app/src/assets/template/mobile/index.tpl
@@ -14,7 +14,7 @@
-
+
diff --git a/app/src/mobile/util/MobileFiles.ts b/app/src/mobile/util/MobileFiles.ts
index 51e5c547f..d7fc2466a 100644
--- a/app/src/mobile/util/MobileFiles.ts
+++ b/app/src/mobile/util/MobileFiles.ts
@@ -605,7 +605,7 @@ export class MobileFiles extends Model {
}
return `
-
+
${unicode2Emoji(item.icon || (item.subFileCount === 0 ? Constants.SIYUAN_IMAGE_FILE : Constants.SIYUAN_IMAGE_FOLDER))}
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index fa15fcf4f..17a955905 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -29,7 +29,8 @@ export const initFramework = () => {
let bookmark: MobileBookmarks;
let tag: MobileTags;
// 不能使用 getEventName,否则点击返回会展开右侧栏
- sidebarElement.querySelector(".toolbar--border").addEventListener("click", (event: Event & {
+ const firstToolbarElement = sidebarElement.querySelector(".toolbar--border")
+ firstToolbarElement.addEventListener("click", (event: Event & {
target: Element
}) => {
const svgElement = hasTopClosestByTag(event.target, "svg");
@@ -41,8 +42,11 @@ export const initFramework = () => {
closePanel();
return;
}
- sidebarElement.querySelectorAll(".toolbar--border svg").forEach(item => {
+ firstToolbarElement.querySelectorAll(".toolbar__icon").forEach(item => {
const itemType = item.getAttribute("data-type");
+ if (!itemType) {
+ return;
+ }
if (itemType === type) {
if (type === "sidebar-outline-tab") {
if (!outline) {
@@ -57,13 +61,13 @@ export const initFramework = () => {
backlink.update();
}
} else if (type === "sidebar-bookmark-tab") {
- if (!backlink) {
+ if (!bookmark) {
bookmark = new MobileBookmarks();
} else {
backlink.update();
}
} else if (type === "sidebar-tag-tab") {
- if (!backlink) {
+ if (!tag) {
tag = new MobileTags();
} else {
tag.update();
diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts
index 59729968b..7b9863dfd 100644
--- a/app/src/util/Tree.ts
+++ b/app/src/util/Tree.ts
@@ -74,6 +74,14 @@ export class Tree {
countHTML = `${item.count}`;
}
const hasChild = (item.children && item.children.length > 0) || (item.blocks && item.blocks.length > 0);
+ let style = "";
+ if (isMobile()) {
+ if (item.depth > 0) {
+ style = `padding-left: ${(item.depth - 1) * 29 + 40}px`
+ }
+ } else {
+ style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`
+ }
html += `
-
+
${iconHTML}
@@ -119,6 +127,14 @@ ${item.label ? "data-label='" + item.label + "'" : ""}>
} else {
iconHTML = ``;
}
+ let style = "";
+ if (isMobile()) {
+ if (item.depth > 0) {
+ style = `padding-left: ${(item.depth - 1) * 29 + 40}px`
+ }
+ } else {
+ style = `padding-left: ${(item.depth - 1) * 18 + 22}px;margin-right: 2px`
+ }
html += `
-
+
${iconHTML}