Skip to content

Build your personal knowledge base with Trilium Notes

fix(mobile): title the chat and lone script widgets in the note panel

Elian Doranfa07d6080b34
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
index 5bc5557775..7f396189e7 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
+++ b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
@@ -37,31 +37,17 @@ body.mobile .modal.mobile-note-panel {
padding-bottom: 0;
}
- > .card:only-child > .card-header:has(> .card-header-buttons:empty) {
+ &:not([data-tab-id="widgets"]) > .card:only-child > .card-header:has(> .card-header-buttons:empty) {
display: none;
}
- > .card:not(#sidebar-chat):first-child > .card-header {
- padding-top: 0;
- }
-
- .card-header {
+ .card > .card-header {
--icon-button-size: 32px;
- }
- .card:not(#sidebar-chat) {
- margin: 0;
+ width: auto;
+ padding: var(--note-panel-group-spacing, 16px) 16px 6px;
border: 0;
- border-radius: 0;
background: transparent;
- overflow: visible;
-
- > .card-header {
- width: auto;
- padding: var(--note-panel-group-spacing, 16px) 16px 6px;
- border: 0;
- background: transparent;
- }
.card-header-title {
margin: 0;
@@ -71,6 +57,19 @@ body.mobile .modal.mobile-note-panel {
text-transform: none;
color: var(--muted-text-color);
}
+ }
+
+ > :first-child > .card-header,
+ > :first-child > .card:first-child > .card-header {
+ padding-top: 0;
+ }
+
+ .card:not(#sidebar-chat) {
+ margin: 0;
+ border: 0;
+ border-radius: 0;
+ background: transparent;
+ overflow: visible;
> .body-wrapper {
margin-inline: 16px;
diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx b/apps/client/src/widgets/sidebar/RightPanelContainer.tsx
index 0699456d57..778fc42fe0 100644
--- a/apps/client/src/widgets/sidebar/RightPanelContainer.tsx
+++ b/apps/client/src/widgets/sidebar/RightPanelContainer.tsx
@@ -206,6 +206,7 @@ export function RightPaneTabBodies({ tabs, activeTabId, expandRequest, flat }: {
<div
key={tab.id}
role="tabpanel"
+ data-tab-id={tab.id}
class={clsx(flat ? "right-pane-flat-tab-body" : "right-pane-tab-body", tab.id !== activeTabId && "hidden-ext")}
>
{/* Collapsing the only widget of a tab would leave the tab empty, so a tab of one offers