Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion src/panels/profile/ha-panel-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { haStyle } from "../../resources/styles";
import { HomeAssistant } from "../../types";
import { fireEvent } from "../../common/dom/fire_event";
import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { showConfirmationDialog } from "../../dialogs/confirmation/show-dialog-confirmation";

class HaPanelProfile extends LitElement {
@property() public hass!: HomeAssistant;
Expand Down Expand Up @@ -173,7 +174,10 @@ class HaPanelProfile extends LitElement {
}

private _handleLogOut() {
fireEvent(this, "hass-logout");
showConfirmationDialog(this, {
Comment thread
iantrich marked this conversation as resolved.
text: this.hass.localize("ui.panel.profile.confirm_logout"),
confirm: () => fireEvent(this, "hass-logout"),
});
}

static get styles(): CSSResultArray {
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1834,6 +1834,7 @@
"current_user": "You are currently logged in as {fullName}.",
"is_owner": "You are an owner.",
"logout": "Log out",
"confirm_logout": "Are you sure you want to log out?",
"force_narrow": {
"header": "Always hide the sidebar",
"description": "This will hide the sidebar by default, similar to the mobile experience."
Expand Down