Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,15 @@ export class DialogLovelaceDashboardDetail extends LitElement {
}
this.closeDialog();
} catch (err: any) {
if (err?.translation_key === "url_already_exists") {
this._error = {
url_path: this.hass!.localize(
"ui.panel.config.lovelace.dashboards.detail.url_already_exists",
err?.translation_placeholders
),
};
return;
}
this._error = { base: err?.message || "Unknown error" };
} finally {
this._submitting = false;
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3433,6 +3433,7 @@
"title": "Title",
"title_required": "Title is required.",
"url": "URL",
"url_already_exists": "The {url} URL is already in use. Please choose a different one.",
"url_error_msg": "The URL should contain a - and cannot contain spaces or special characters, except for _ and -",
"require_admin": "Admin only",
"delete": "Delete",
Expand Down
Loading