mirror of
https://github.com/zadam/trilium.git
synced 2026-01-08 07:34:25 +01:00
fix(note_badges): avoid "shared locally" on server build
This commit is contained in:
parent
00592025c0
commit
1eebc8ff77
@ -5,6 +5,7 @@ import { useEffect, useState } from "preact/hooks";
|
|||||||
import FNote from "../entities/fnote";
|
import FNote from "../entities/fnote";
|
||||||
import attributes from "../services/attributes";
|
import attributes from "../services/attributes";
|
||||||
import { t } from "../services/i18n";
|
import { t } from "../services/i18n";
|
||||||
|
import { isElectron } from "../services/utils";
|
||||||
import HelpButton from "./react/HelpButton";
|
import HelpButton from "./react/HelpButton";
|
||||||
import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks";
|
import { useNoteContext, useTriliumEvent, useTriliumOption } from "./react/hooks";
|
||||||
import InfoBar from "./react/InfoBar";
|
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) {
|
function getShareId(note: FNote) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user