diff --git a/src/lib/browser/app-info.ts b/src/lib/browser/app-info.ts index 9f1748b..12ed395 100644 --- a/src/lib/browser/app-info.ts +++ b/src/lib/browser/app-info.ts @@ -24,3 +24,16 @@ export function getAppVersion(): string { return ''; } } + +/** + * The `generator` string written into exported and backup BM JSON. + * + * Separate from `getAppVersion` because the UI and a file want different + * fallbacks: the UI hides an unknown version, but a file field cannot be + * hidden, and `"BookmarkMagic "` with a trailing space is a worse artifact + * than the bare product name. + */ +export function getGeneratorVersion(): string { + const version = getAppVersion(); + return version === '' ? 'unknown' : version; +} diff --git a/src/lib/components/FolderPickNode.svelte b/src/lib/components/FolderPickNode.svelte index c53b688..81d71f7 100644 --- a/src/lib/components/FolderPickNode.svelte +++ b/src/lib/components/FolderPickNode.svelte @@ -1,7 +1,7 @@