Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/nav): use different presentation for note content

Elian Doranbf6bc53fa543
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index bd1050404a..6908ec811f 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1864,7 +1864,9 @@
"mobile_note_navigator": {
"back": "Go up one level",
"loading": "Loading...",
- "empty": "This note has no children."
+ "empty": "This note has no children.",
+ "children_count_one": "{{count}} note",
+ "children_count_other": "{{count}} notes"
},
"title_bar_buttons": {
"window-on-top": "Keep Window on Top"
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
index bf2e7b07fd..7faa4bcd5c 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.css
@@ -55,7 +55,6 @@
flex-direction: column;
gap: 10px;
padding: 14px 16px;
- background: var(--accented-background-color, var(--hover-item-background-color));
border-bottom: 2px solid var(--main-border-color);
cursor: pointer;
user-select: none;
@@ -67,12 +66,17 @@
filter: brightness(0.95);
}
-.mobile-navigator-current-tile.is-active {
- background: var(--active-item-background-color);
- color: var(--active-item-text-color);
+.mobile-navigator-current-tile.is-archived {
+ opacity: 0.7;
}
-.mobile-navigator-current-tile.is-archived {
+.mobile-navigator-children-label {
+ padding: 14px 16px 6px;
+ font-size: 0.75em;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--muted-text-color, var(--main-text-color));
opacity: 0.7;
}
@@ -126,7 +130,7 @@
inset-inline: 0;
bottom: 0;
height: 32px;
- background: linear-gradient(to bottom, transparent, var(--accented-background-color, var(--hover-item-background-color)));
+ background: linear-gradient(to bottom, transparent, var(--main-background-color));
}
.mobile-navigator-current-preview:empty,
@@ -167,8 +171,8 @@
}
.mobile-navigator-row.is-active {
- background: var(--active-item-background-color);
- color: var(--active-item-text-color);
+ border-inline-start: 3px solid var(--main-text-color);
+ padding-inline-start: 11px;
}
.mobile-navigator-row.is-archived {
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx
index 002a05153c..635ca8a4e3 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx
+++ b/apps/client/src/widgets/mobile_widgets/MobileNoteNavigator.tsx
@@ -230,6 +230,12 @@ export default function MobileNoteNavigator() {
</div>
)}
+ {isLoaded && parentNote && children.length > 0 && (
+ <div className="mobile-navigator-children-label">
+ {t("mobile_note_navigator.children_count", { count: children.length })}
+ </div>
+ )}
+
<div className="mobile-navigator-list">
{!isLoaded || !parentNote ? null : children.length === 0 ? (
<NoItems icon="bx bx-folder-open" text={t("mobile_note_navigator.empty")} />