Presets: Added flag for making it "exclusive"

This will make it so only one tag will be active from marked preset.
This can be useful for some tags that cannot be together in the editor,
for example, rating tags.
This commit is contained in:
koloml committed 2026-03-22 04:09:18 +04:00
1 parent f0083169f3
commit 83c7608e99
7 files changed
+84 -1

No files matched your search

@@ -3,6 +3,7 @@ import StorageEntity from "$lib/extension/base/StorageEntity";
interface TagEditorPresetSettings {
name: string;
tags: string[];
exclusive: boolean;
}
export default class TagEditorPreset extends StorageEntity<TagEditorPresetSettings> {
@@ -10,6 +11,7 @@ export default class TagEditorPreset extends StorageEntity<TagEditorPresetSettin
super(id, {
name: settings.name || '',
tags: settings.tags || [],
exclusive: settings.exclusive ?? false
});
}
@@ -42,6 +42,7 @@ const entitiesExporters: ExportersMap = {
id: entity.id,
name: entity.settings.name,
tags: entity.settings.tags,
exclusive: entity.settings.exclusive,
}
}
};