mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Small reorganization of profile settings (#20076)
* Small reorganization of profile settings * use isExternal
This commit is contained in:
parent
adc89f1487
commit
56a23c5c3d
@ -74,7 +74,6 @@ class HaPanelProfile extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
></ha-menu-button>
|
></ha-menu-button>
|
||||||
<div slot="title">${this.hass.localize("panel.profile")}</div>
|
<div slot="title">${this.hass.localize("panel.profile")}</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<ha-card .header=${this.hass.user!.name}>
|
<ha-card .header=${this.hass.user!.name}>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -85,7 +84,20 @@ class HaPanelProfile extends LitElement {
|
|||||||
? this.hass.localize("ui.panel.profile.is_owner")
|
? this.hass.localize("ui.panel.profile.is_owner")
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-actions">
|
||||||
|
<mwc-button class="warning" @click=${this._handleLogOut}>
|
||||||
|
${this.hass.localize("ui.panel.profile.logout")}
|
||||||
|
</mwc-button>
|
||||||
|
</div>
|
||||||
|
</ha-card>
|
||||||
|
<ha-card
|
||||||
|
.header=${this.hass.localize(
|
||||||
|
"ui.panel.profile.user_settings_header"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div class="card-content">
|
||||||
|
${this.hass.localize("ui.panel.profile.user_settings_detail")}
|
||||||
|
</div>
|
||||||
<ha-pick-language-row
|
<ha-pick-language-row
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@ -110,6 +122,26 @@ class HaPanelProfile extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
></ha-pick-first-weekday-row>
|
></ha-pick-first-weekday-row>
|
||||||
|
${this.hass.user!.is_admin
|
||||||
|
? html`
|
||||||
|
<ha-advanced-mode-row
|
||||||
|
.hass=${this.hass}
|
||||||
|
.narrow=${this.narrow}
|
||||||
|
.coreUserData=${this._coreUserData}
|
||||||
|
></ha-advanced-mode-row>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
</ha-card>
|
||||||
|
<ha-card
|
||||||
|
.header=${this.hass.localize(
|
||||||
|
isExternal
|
||||||
|
? "ui.panel.profile.mobile_app_settings"
|
||||||
|
: "ui.panel.profile.browser_settings"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div class="card-content">
|
||||||
|
${this.hass.localize("ui.panel.profile.client_settings_detail")}
|
||||||
|
</div>
|
||||||
<ha-pick-theme-row
|
<ha-pick-theme-row
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@ -159,15 +191,6 @@ class HaPanelProfile extends LitElement {
|
|||||||
></ha-push-notifications-row>
|
></ha-push-notifications-row>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this.hass.user!.is_admin
|
|
||||||
? html`
|
|
||||||
<ha-advanced-mode-row
|
|
||||||
.hass=${this.hass}
|
|
||||||
.narrow=${this.narrow}
|
|
||||||
.coreUserData=${this._coreUserData}
|
|
||||||
></ha-advanced-mode-row>
|
|
||||||
`
|
|
||||||
: ""}
|
|
||||||
<ha-set-suspend-row
|
<ha-set-suspend-row
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@ -176,11 +199,6 @@ class HaPanelProfile extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
></ha-enable-shortcuts-row>
|
></ha-enable-shortcuts-row>
|
||||||
<div class="card-actions">
|
|
||||||
<mwc-button class="warning" @click=${this._handleLogOut}>
|
|
||||||
${this.hass.localize("ui.panel.profile.logout")}
|
|
||||||
</mwc-button>
|
|
||||||
</div>
|
|
||||||
</ha-card>
|
</ha-card>
|
||||||
|
|
||||||
${this.hass.user!.credentials.some(
|
${this.hass.user!.credentials.some(
|
||||||
|
@ -5887,6 +5887,11 @@
|
|||||||
"profile": {
|
"profile": {
|
||||||
"current_user": "You are currently logged in as {fullName}.",
|
"current_user": "You are currently logged in as {fullName}.",
|
||||||
"is_owner": "You are an owner.",
|
"is_owner": "You are an owner.",
|
||||||
|
"user_settings_header": "User settings",
|
||||||
|
"user_settings_detail": "The following settings are tied to your account and will persist across all sessions and devices.",
|
||||||
|
"mobile_app_settings": "Mobile app settings",
|
||||||
|
"browser_settings": "Browser settings",
|
||||||
|
"client_settings_detail": "The following settings are local to this client only, and may reset to defaults on logout or when local data is cleared.",
|
||||||
"logout": "Log out",
|
"logout": "Log out",
|
||||||
"logout_title": "Log out?",
|
"logout_title": "Log out?",
|
||||||
"logout_text": "Are you sure you want to log out?",
|
"logout_text": "Are you sure you want to log out?",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user