Address minor comments about config menu (#12492)

This commit is contained in:
Bram Kragten 2022-04-28 15:44:01 +02:00 committed by GitHub
parent 2c9411c6c3
commit 1617a9dfed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View File

@ -110,7 +110,9 @@ class ConfigAnalytics extends LitElement {
ha-settings-row {
padding: 0;
}
p {
margin-top: 0;
}
.card-actions {
display: flex;
flex-direction: row-reverse;

View File

@ -187,6 +187,7 @@ class HaConfigSectionGeneral extends LitElement {
href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes"
target="_blank"
rel="noopener noreferrer"
class="find-value"
>${this.hass.localize(
"ui.panel.config.core.section.core.core_config.find_currency_value"
)}</a
@ -345,6 +346,10 @@ class HaConfigSectionGeneral extends LitElement {
ha-select {
display: block;
}
a.find-value {
margin-top: 8px;
display: inline-block;
}
ha-locations-editor {
display: block;
height: 400px;

View File

@ -39,9 +39,9 @@ import { configSections } from "../ha-panel-config";
import "./ha-config-navigation";
import "./ha-config-updates";
const randomTip = (hass: HomeAssistant) => {
const randomTip = (hass: HomeAssistant, narrow: boolean) => {
const weighted: string[] = [];
const tips = [
let tips = [
{
content: hass.localize(
"ui.panel.config.tips.join",
@ -84,11 +84,16 @@ const randomTip = (hass: HomeAssistant) => {
</span>`
),
weight: 2,
narrow: true,
},
{ content: hass.localize("ui.tips.key_c_hint"), weight: 1 },
{ content: hass.localize("ui.tips.key_m_hint"), weight: 1 },
{ content: hass.localize("ui.tips.key_c_hint"), weight: 1, narrow: false },
{ content: hass.localize("ui.tips.key_m_hint"), weight: 1, narrow: false },
];
if (narrow) {
tips = tips.filter((tip) => tip.narrow);
}
tips.forEach((tip) => {
for (let i = 0; i < tip.weight; i++) {
weighted.push(tip.content);
@ -215,7 +220,7 @@ class HaConfigDashboard extends LitElement {
super.updated(changedProps);
if (!this._tip && changedProps.has("hass")) {
this._tip = randomTip(this.hass);
this._tip = randomTip(this.hass, this.narrow);
}
}

View File

@ -224,14 +224,14 @@ export const configSections: { [name: string]: PageNavigation[] } = {
path: "/config/person",
translationKey: "ui.panel.config.person.caption",
iconPath: mdiAccount,
iconColor: "#E48629",
iconColor: "#5A87FA",
},
{
component: "users",
path: "/config/users",
translationKey: "ui.panel.config.users.caption",
iconPath: mdiBadgeAccountHorizontal,
iconColor: "#E48629",
iconColor: "#5A87FA",
core: true,
advancedOnly: true,
},

View File

@ -111,6 +111,9 @@ export class HassioHostname extends LitElement {
justify-content: space-between;
align-items: center;
}
ha-settings-row {
border-top: none;
}
`;
}

View File

@ -1493,7 +1493,7 @@
"unit_system_metric": "Metric",
"imperial_example": "Fahrenheit, pounds",
"metric_example": "Celsius, kilograms",
"find_currency_value": "Find your value",
"find_currency_value": "Find my value",
"save_button": "Save",
"currency": "Currency",
"edit_location": "Edit location",