improve tag creating

This commit is contained in:
2025-09-05 16:22:43 +08:00
parent 8f240823ef
commit b8acd97c11
2 changed files with 17 additions and 2 deletions

View File

@@ -203,7 +203,11 @@ export function QuickAddTagDialog({
return;
}
setError(null);
const names = text.split(separator).filter((n) => n.length > 0);
let sep: string | RegExp = separator;
if (sep === " ") {
sep = /\s+/;
}
const names = text.split(sep).filter((n) => n.length > 0);
setLoading(true);
const res = await network.getOrCreateTags(names, type);
setLoading(false);