TagSpaces is an offline, open source, document manager with tagging support
fix missing description && set theme for md description
sytolk407a8ee37eee
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsxindex dcdec8e91..5ab6d586c 100644--- a/app/components/EntryProperties.tsx+++ b/app/components/EntryProperties.tsx@@ -913,7 +913,7 @@ function EntryProperties(props: Props) {content={currentEntry.description || ''}onChange={milkdownListener}readOnly={editDescription === undefined}- dark={false}+ dark={theme.palette.mode === 'dark'}/></div><Typographydiff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsxindex 95c2bce7a..0ee1e5f7c 100644--- a/app/perspectives/grid-perspective/components/GridPagination.tsx+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx@@ -542,7 +542,7 @@ function GridPagination(props: Props) {<MilkdownEditorcontent={currentDirectoryDescription}readOnly={true}- dark={false}+ dark={theme.palette.mode === 'dark'}/></Grid>)}diff --git a/app/services/utils-io.ts b/app/services/utils-io.tsindex 1c4c139ac..2b7e4eb02 100644--- a/app/services/utils-io.ts+++ b/app/services/utils-io.ts@@ -1279,17 +1279,18 @@ export function normalizeUrl(url: string) {/*** https://stackoverflow.com/a/71981197/2285631- * TODO this not merge with "b" properties that missing in "a"* @param a* @param b*/-export const merge = (a, b) =>- Object.fromEntries(- Object.entries(a).map(([k, v]) => [+export const merge = (a, b) => {+ const allKeys = { ...b, ...a };+ return Object.fromEntries(+ Object.entries(allKeys).map(([k, v]) => [k,v && Array.isArray(v) ? mergeTags(v, b[k]) : v || b[k]]));+};function mergeTags(oldTagsArray: Array<TS.Tag>, newTagsArray: Array<TS.Tag>) {if (newTagsArray.length === 0) {