mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-15 07:25:54 +00:00
Add configurable confirmation title & button text (#28931)
This commit is contained in:
@@ -52,6 +52,9 @@ export interface BaseActionConfig {
|
||||
|
||||
export interface ConfirmationRestrictionConfig {
|
||||
text?: string;
|
||||
title?: string;
|
||||
confirm_text?: string;
|
||||
dismiss_text?: string;
|
||||
exemptions?: RestrictionConfig[];
|
||||
}
|
||||
|
||||
|
||||
@@ -21,5 +21,8 @@ export const confirmAction = async (
|
||||
hass.localize("ui.panel.lovelace.cards.actions.action_confirmation", {
|
||||
action,
|
||||
}),
|
||||
title: config.title,
|
||||
dismissText: config.dismiss_text,
|
||||
confirmText: config.confirm_text,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -89,6 +89,9 @@ export const handleAction = async (
|
||||
) ||
|
||||
actionConfig.action,
|
||||
}),
|
||||
title: actionConfig.confirmation.title,
|
||||
dismissText: actionConfig.confirmation.dismiss_text,
|
||||
confirmText: actionConfig.confirmation.confirm_text,
|
||||
}))
|
||||
) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user