From 1eebc8ff77530f89395c881186e7dbde8d68eab0 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 23 Dec 2025 20:44:12 +0200 Subject: [PATCH] fix(note_badges): avoid "shared locally" on server build --- apps/client/src/widgets/shared_info.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/shared_info.tsx b/apps/client/src/widgets/shared_info.tsx index 54c6da785..bbcdbe982 100644 --- a/apps/client/src/widgets/shared_info.tsx +++ b/apps/client/src/widgets/shared_info.tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from "preact/hooks"; import FNote from "../entities/fnote"; import attributes from "../services/attributes"; import { t } from "../services/i18n"; +import { isElectron } from "../services/utils"; import HelpButton from "./react/HelpButton"; import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks"; import InfoBar from "./react/InfoBar"; @@ -68,7 +69,11 @@ export function useShareInfo(note: FNote | null | undefined) { } }); - return { link, linkHref, isSharedExternally: !!syncServerHost }; + return { + link, + linkHref, + isSharedExternally: !isElectron() || !!syncServerHost // on server we can't reliably detect if the note is shared locally or available publicly. + }; } function getShareId(note: FNote) {