From b990770e489efe0f5aa51a07f40815004cc44195 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 21 Sep 2025 22:44:39 +0300 Subject: [PATCH] feat(render): add a floating button to refresh --- apps/client/src/widgets/FloatingButtonsDefinitions.tsx | 2 +- apps/client/src/widgets/type_widgets/Render.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx index 1cdcf30cf..e631892cd 100644 --- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx +++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx @@ -69,7 +69,7 @@ export const MOBILE_FLOATING_BUTTONS: FloatingButtonsList = [ ] function RefreshBackendLogButton({ note, parentComponent, noteContext, isDefaultViewMode }: FloatingButtonContext) { - const isEnabled = note.noteId === "_backendLog" && isDefaultViewMode; + const isEnabled = (note.noteId === "_backendLog" || note.type === "render") && isDefaultViewMode; return isEnabled && (null); const [ renderNotesFound, setRenderNotesFound ] = useState(false); @@ -22,6 +22,10 @@ export default function Render({ note, noteContext }: TypeWidgetProps) { if (noteContext?.isActive()) return; refresh(); }); + useTriliumEvent("refreshData", ({ ntxId: eventNtxId }) => { + if (eventNtxId !== ntxId) return; + refresh(); + }); return (