mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-01 23:46:38 +00:00
fix: show contextual toast when saving with no targets
Instead of always showing "Settings updated" when saving, show "Targets cleared" when the target list is empty. This gives the user accurate feedback without blocking the save action. Fixes #586
This commit is contained in:
@@ -774,8 +774,12 @@ function ProxyResourceTargetsForm({
|
||||
}
|
||||
|
||||
toast({
|
||||
title: t("settingsUpdated"),
|
||||
description: t("settingsUpdatedDescription")
|
||||
title: targets.length === 0
|
||||
? t("targetTargetsCleared")
|
||||
: t("settingsUpdated"),
|
||||
description: targets.length === 0
|
||||
? t("targetTargetsClearedDescription")
|
||||
: t("settingsUpdatedDescription")
|
||||
});
|
||||
|
||||
setTargetsToRemove([]);
|
||||
|
||||
Reference in New Issue
Block a user