fix(webui): don't require confirmation for set remove in combine
parent
d0903de812
commit
a8dd4735d3
|
@ -115,6 +115,7 @@
|
|||
<EntitySetEditor
|
||||
entities={includedGroups}
|
||||
header={$i18n.t("Include")}
|
||||
confirmRemoveMessage={null}
|
||||
on:add={(ev) => (includedGroups = [...includedGroups, ev.detail])}
|
||||
on:remove={(ev) =>
|
||||
(includedGroups = includedGroups.filter((e) => e !== ev.detail))}
|
||||
|
@ -122,6 +123,7 @@
|
|||
<EntitySetEditor
|
||||
entities={requiredGroups}
|
||||
header={$i18n.t("Require")}
|
||||
confirmRemoveMessage={null}
|
||||
on:add={(ev) => (requiredGroups = [...requiredGroups, ev.detail])}
|
||||
on:remove={(ev) =>
|
||||
(requiredGroups = requiredGroups.filter((e) => e !== ev.detail))}
|
||||
|
@ -129,6 +131,7 @@
|
|||
<EntitySetEditor
|
||||
entities={excludedGroups}
|
||||
header={$i18n.t("Exclude")}
|
||||
confirmRemoveMessage={null}
|
||||
on:add={(ev) => (excludedGroups = [...excludedGroups, ev.detail])}
|
||||
on:remove={(ev) =>
|
||||
(excludedGroups = excludedGroups.filter((e) => e !== ev.detail))}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
export let entities: string[];
|
||||
|
||||
export let header = "";
|
||||
export let confirmRemoveMessage = $i18n.t(
|
||||
export let confirmRemoveMessage: string | null = $i18n.t(
|
||||
"Are you sure you want to remove this?",
|
||||
);
|
||||
export let emptyMessage = $i18n.t("Nothing to show.");
|
||||
|
@ -31,7 +31,7 @@
|
|||
}
|
||||
|
||||
async function remove(address: string) {
|
||||
if (confirm(confirmRemoveMessage)) {
|
||||
if (!confirmRemoveMessage || confirm(confirmRemoveMessage)) {
|
||||
dispatch("remove", address);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue