added system tag for buckets

This commit is contained in:
2026-02-13 19:34:27 -06:00
parent a967bbd177
commit b3a37cd927
2 changed files with 12 additions and 6 deletions
+8 -2
View File
@@ -17,7 +17,11 @@ export const TagPicker: Component<TagPickerProps> = (props) => {
const [valueScore, setValueScore] = createSignal(5);
// Filter tags for the "Name" part
const allTagNames = () => store.tagDefinitions.map(d => d.name).sort();
const allTagNames = () => {
const definedTags = store.tagDefinitions.map(d => d.name);
const bucketTags = store.buckets.map(b => b.name);
return [...new Set([...definedTags, ...bucketTags])].sort();
};
// When a tag name is selected, update the value score to match its current definition
createEffect(() => {
@@ -35,7 +39,9 @@ export const TagPicker: Component<TagPickerProps> = (props) => {
if (!name) return;
// update global definition
upsertTagDefinition(name, valueScore(), undefined, resolvedTheme());
const bucket = store.buckets.find(b => b.name === name);
const color = bucket ? bucket.color : undefined;
upsertTagDefinition(name, valueScore(), color, resolvedTheme());
// Toggle in current task selection if not already there
const currentSelected = props.selectedTags;