tags, folder rename, other stuff

This commit is contained in:
2025-10-15 21:32:17 +02:00
parent b5119a8e6f
commit 068f96880b
13 changed files with 525 additions and 130 deletions
+6 -1
View File
@@ -438,6 +438,7 @@ const SkeuomorphicWorkspace = ({
onRemoveTagFromDocument = null,
ensureAssetUrl = null,
getDocumentAsset = () => null,
prepareTagPayload = null,
}) => {
const items = useMemo(() => (searchResults ? searchResults : documents), [documents, searchResults]);
const showingSearchResults = searchResults !== null;
@@ -1732,7 +1733,11 @@ const SkeuomorphicWorkspace = ({
return;
}
try {
await onCreateTag({ label, color: generateRandomTagColor() });
const payload =
typeof prepareTagPayload === 'function'
? prepareTagPayload({ label })
: { label, color: generateRandomTagColor() };
await onCreateTag(payload);
setActiveShelfTagId(null);
} catch (error) {
console.error('Failed to create tag', error);