mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
feat(web): add an 'all' option to notification filter
allows users to "reset" after selecting a filter. ideally, we'd be able to clear the filter if it was clicked again, but I couldn't find a way to listen to a second/repeat click on a SelectItem, so I added a new filter item instead.
This commit is contained in:
@@ -11,9 +11,7 @@ const { teleportTarget, determineTeleportTarget } = useTeleport();
|
||||
const importance = ref<Importance | undefined>(undefined);
|
||||
|
||||
const confirmAndArchiveAll = async () => {
|
||||
if (
|
||||
confirm('This will archive all notifications on your Unraid server. Continue?')
|
||||
) {
|
||||
if (confirm('This will archive all notifications on your Unraid server. Continue?')) {
|
||||
await archiveAll();
|
||||
}
|
||||
};
|
||||
@@ -81,7 +79,7 @@ const confirmAndDeleteAll = async () => {
|
||||
<Select
|
||||
@update:model-value="
|
||||
(val) => {
|
||||
importance = val as Importance;
|
||||
importance = val === 'all' ? undefined : (val as Importance);
|
||||
}
|
||||
"
|
||||
>
|
||||
@@ -91,7 +89,8 @@ const confirmAndDeleteAll = async () => {
|
||||
<SelectContent :to="teleportTarget">
|
||||
<SelectGroup>
|
||||
<SelectLabel>Notification Types</SelectLabel>
|
||||
<SelectItem :value="Importance.Alert">Alert</SelectItem>
|
||||
<SelectItem value="all">All Types</SelectItem>
|
||||
<SelectItem :value="Importance.Alert"> Alert </SelectItem>
|
||||
<SelectItem :value="Importance.Info">Info</SelectItem>
|
||||
<SelectItem :value="Importance.Warning">Warning</SelectItem>
|
||||
</SelectGroup>
|
||||
|
||||
Reference in New Issue
Block a user