mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Update Restart add-on dialog (#13896)
This commit is contained in:
parent
be30cdb51f
commit
4a07d3d39b
@ -18,9 +18,11 @@ export const suggestAddonRestart = async (
|
|||||||
addon: HassioAddonDetails
|
addon: HassioAddonDetails
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
const confirmed = await showConfirmationDialog(element, {
|
const confirmed = await showConfirmationDialog(element, {
|
||||||
title: supervisor.localize("common.restart_name", "name", addon.name),
|
title: supervisor.localize("dialog.restart_addon.title", {
|
||||||
|
name: addon.name,
|
||||||
|
}),
|
||||||
text: supervisor.localize("dialog.restart_addon.text"),
|
text: supervisor.localize("dialog.restart_addon.text"),
|
||||||
confirmText: supervisor.localize("dialog.restart_addon.confirm_text"),
|
confirmText: supervisor.localize("dialog.restart_addon.restart"),
|
||||||
dismissText: supervisor.localize("common.cancel"),
|
dismissText: supervisor.localize("common.cancel"),
|
||||||
});
|
});
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
@ -28,11 +30,9 @@ export const suggestAddonRestart = async (
|
|||||||
await restartHassioAddon(hass, addon.slug);
|
await restartHassioAddon(hass, addon.slug);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
showAlertDialog(element, {
|
showAlertDialog(element, {
|
||||||
title: supervisor.localize(
|
title: supervisor.localize("common.failed_to_restart_name", {
|
||||||
"common.failed_to_restart_name",
|
name: addon.name,
|
||||||
"name",
|
}),
|
||||||
addon.name
|
|
||||||
),
|
|
||||||
text: extractApiErrorMessage(err),
|
text: extractApiErrorMessage(err),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -5129,8 +5129,9 @@
|
|||||||
"used": "Repository is in use for installed add-ons and can't be removed."
|
"used": "Repository is in use for installed add-ons and can't be removed."
|
||||||
},
|
},
|
||||||
"restart_addon": {
|
"restart_addon": {
|
||||||
"confirm_text": "Restart add-on",
|
"title": "Restart {name}?",
|
||||||
"text": "Do you want to restart the add-on with your changes?"
|
"text": "To use the new saved configuration this add-on must be restarted.",
|
||||||
|
"restart": "Restart"
|
||||||
},
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"title": "Hardware",
|
"title": "Hardware",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user