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 { .card-actions {
text-align: right; display: flex;
flex-direction: row-reverse;
} }
a { a {

View File

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

View File

@ -3778,7 +3778,12 @@
"gateway": "Gateway address", "gateway": "Gateway address",
"dns_servers": "DNS Servers", "dns_servers": "DNS Servers",
"unsaved": "You have unsaved changes, these will get lost if you change tabs, do you want to continue?", "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": { "storage": {