1
0
mirror of https://github.com/koloml/philomena-tagging-assistant.git synced 2026-09-23 04:19:39 +00:00

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:
2026-03-22 04:09:18 +04:00
parent f0083169f3
commit 83c7608e99
7 changed files with 84 additions and 1 deletions

View File

@@ -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
});
}

View File

@@ -42,6 +42,7 @@ const entitiesExporters: ExportersMap = {
id: entity.id,
name: entity.settings.name,
tags: entity.settings.tags,
exclusive: entity.settings.exclusive,
}
}
};