Skip to content

Build your personal knowledge base with Trilium Notes

feat(mobile/tab_switcher): respect note color class

Elian Doran6b70412f6e29
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
index d1ae03be2f..a8771562ce 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.css
@@ -30,6 +30,7 @@
display: flex;
overflow: hidden;
align-items: center;
+ color: var(--custom-color, inherit);
>.tn-icon {
margin-inline-end: 0.4em;
diff --git a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
index ff481b2ed3..c14cfa7e60 100644
--- a/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
+++ b/apps/client/src/widgets/mobile_widgets/TabSwitcher.tsx
@@ -77,10 +77,11 @@ function Tab({ noteContext, selectTab, activeNtxId }: {
}) {
const { note } = noteContext;
const iconClass = useNoteIcon(note);
+ const colorClass = note?.getColorClass() || '';
return (
<div
- class={clsx("tab-card", {
+ class={clsx("tab-card", colorClass, {
active: noteContext.ntxId === activeNtxId
})}
onClick={() => selectTab(noteContext)}