Fix RTL & missing translation & misalign hostnam (#15758)

This commit is contained in:
Yosi Levy 2023-03-07 23:10:21 +02:00 committed by GitHub
parent 55edeb474e
commit 4f1c4bdcb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 20 deletions

View File

@ -344,7 +344,8 @@ class ConfigUrlForm extends LitElement {
}
.card-actions {
text-align: right;
display: flex;
flex-direction: row-reverse;
}
a {

View File

@ -51,22 +51,23 @@ export class HassioHostname extends LitElement {
<ha-card
class="no-padding"
outlined
.header=${this.hass.localize("ui.panel.config.network.hostname.title")}
.header=${this.hass.localize(
"ui.panel.config.network.supervisor.hostname.title"
)}
>
<div>
<ha-settings-row .narrow=${this.narrow}>
<span slot="heading">Hostname</span>
<span slot="description"
>The name your instance will have on your network</span
>
<ha-textfield
.disabled=${this._processing}
.value=${this._hostname}
@change=${this._handleChange}
placeholder="homeassistant"
>
</ha-textfield>
</ha-settings-row>
<div class="card-content">
<p>
${this.hass.localize(
"ui.panel.config.network.supervisor.hostname.description"
)}
</p>
<ha-textfield
.disabled=${this._processing}
.value=${this._hostname}
@change=${this._handleChange}
placeholder="homeassistant"
>
</ha-textfield>
</div>
<div class="card-actions">
<mwc-button @click=${this._save} .disabled=${this._processing}>
@ -91,7 +92,7 @@ export class HassioHostname extends LitElement {
} catch (err: any) {
showAlertDialog(this, {
title: this.hass.localize(
"ui.panel.config.network.hostname.failed_to_set_hostname"
"ui.panel.config.network.supervisor.hostname.failed_to_set_hostname"
),
text: extractApiErrorMessage(err),
});
@ -110,8 +111,8 @@ export class HassioHostname extends LitElement {
justify-content: space-between;
align-items: center;
}
ha-settings-row {
border-top: none;
.card-content > p {
padding-bottom: 1em;
}
`;
}

View File

@ -3778,7 +3778,12 @@
"gateway": "Gateway address",
"dns_servers": "DNS Servers",
"unsaved": "You have unsaved changes, these will get lost if you change tabs, do you want to continue?",
"failed_to_change": "Failed to change network settings"
"failed_to_change": "Failed to change network settings",
"hostname": {
"title": "Host Name",
"description": "The name your instance will have on your network",
"failed_to_set_hostname": "Setting hostname failed"
}
}
},
"storage": {