Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Update and add translations and minor styling of ui components

Donbe563d938882
diff --git a/deployment/manager/shared/locales/en/or.json b/deployment/manager/shared/locales/en/or.json
index b3291a1d8..19595b0a2 100644
--- a/deployment/manager/shared/locales/en/or.json
+++ b/deployment/manager/shared/locales/en/or.json
@@ -9,7 +9,8 @@
"insights": "Insights",
"scenes": "Scenes",
"settings": "Settings",
- "selectLanguage": "Select Language",
+ "language": "Language",
+ "selectLanguage": "Select language",
"logout": "Log out",
"login": "Log in",
"monday": "Monday",
@@ -95,6 +96,9 @@
"year": "Year",
"period": "Period",
"ending": "Ending",
+ "timeframe": "Timeframe",
+ "addAttribute": "Add attribute",
+ "add": "Add",
"EQUALS_COMPARATOR": "Equals",
"GREATER_THAN": "Greater than",
"LESS_THAN": "Less than",
diff --git a/deployment/manager/shared/locales/nl/or.json b/deployment/manager/shared/locales/nl/or.json
index b36249d65..20b6d1d9c 100644
--- a/deployment/manager/shared/locales/nl/or.json
+++ b/deployment/manager/shared/locales/nl/or.json
@@ -9,6 +9,7 @@
"insights": "Inzicht",
"scenes": "Scenes",
"settings": "Instellingen",
+ "language": "Taal",
"selectLanguage": "Taal kiezen",
"logout": "Uitloggen",
"login": "Log in",
@@ -91,10 +92,13 @@
"hour": "Uur",
"day": "Dag",
"week": "Week",
- "month": "Month",
- "year": "Year",
- "period": "Period",
- "ending": "Ending",
+ "month": "Maand",
+ "year": "Jaar",
+ "period": "Periode",
+ "ending": "Einde",
+ "timeframe": "Tijdvak",
+ "addAttribute": "Attribuut toevoegen",
+ "add": "toevoegen",
"EQUALS_COMPARATOR": "Gelijk aan",
"GREATER_THAN": "Groter dan",
"LESS_THAN": "Kleiner dan",
@@ -170,7 +174,6 @@
"oncePerWeek": "Max. 1x per week",
"reset": "Reset",
"logs": "Logs",
- "chooseLanguage": "Kies een taal",
"addRemoveAttributes": "Attributen toevoegen/verwijderen",
"attributeValueType": {
"PERCENTAGE": "%.2f",
diff --git a/ui/component/or-asset-tree/src/style.ts b/ui/component/or-asset-tree/src/style.ts
index 4478f7884..0d80f3c7a 100644
--- a/ui/component/or-asset-tree/src/style.ts
+++ b/ui/component/or-asset-tree/src/style.ts
@@ -188,6 +188,7 @@ export const style = css`
align-items: center;
text-align: center;
margin: 0 auto;
+ font-size: 14px;
}
@media only screen and (min-width: 769px){
diff --git a/ui/component/or-attribute-history/src/index.ts b/ui/component/or-attribute-history/src/index.ts
index 21abeb271..31d44e65a 100644
--- a/ui/component/or-attribute-history/src/index.ts
+++ b/ui/component/or-attribute-history/src/index.ts
@@ -311,7 +311,7 @@ export class OrAttributeHistory extends translate(i18next)(LitElement) {
return html`
<div id="container">
<div id="controls">
- <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("Timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions().map(item => item.value)}"></or-input>
+ <or-input .type="${InputType.SELECT}" ?disabled="${disabled}" .label="${i18next.t("timeframe")}" @or-input-changed="${(evt: OrInputChangedEvent) => this.period = evt.detail.value}" .value="${this.period}" .options="${this._getPeriodOptions().map(item => item.value)}"></or-input>
<div id="ending-controls">
<or-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${disabled}" label="${i18next.t("ending")}" .value="${this.fromTimestamp}" @or-input-changed="${(evt: OrInputChangedEvent) => this._updateTimestamp(moment(evt.detail.value as string).toDate())}"></or-input>
<or-icon class="button button-icon" ?disabled="${disabled}" icon="chevron-left" @click="${() => this.fromTimestamp = this._updateTimestamp(this.fromTimestamp!, false)}"></or-icon>
diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.ts
index 06fc335c7..348871003 100644
--- a/ui/component/or-chart/src/index.ts
+++ b/ui/component/or-chart/src/index.ts
@@ -504,7 +504,7 @@ export class OrChart extends translate(i18next)(LitElement) {
`
})}
</div>
- <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="Add attribute" icon="plus" @click="${() => this._openDialog()}"></or-input>
+ <or-input class="button" .type="${InputType.BUTTON}" ?disabled="${disabled}" label="${i18next.t("addAttribute")}" icon="plus" @click="${() => this._openDialog()}"></or-input>
</div>
</div>
@@ -516,7 +516,7 @@ export class OrChart extends translate(i18next)(LitElement) {
aria-describedby="my-dialog-content">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
- <h2 class="mdc-dialog__title" id="my-dialog-title">Add attribute</h2>
+ <h2 class="mdc-dialog__title" id="my-dialog-title">${i18next.t("addAttribute")}</h2>
<div class="dialog-container mdc-dialog__content" id="my-dialog-content">
<or-asset-tree id="chart-asset-tree" .selectedIds="${this.activeAsset ? [this.activeAsset.id] : null}]"></or-asset-tree>
${this.activeAsset && this.activeAsset.attributes ? html`
@@ -531,14 +531,14 @@ export class OrChart extends translate(i18next)(LitElement) {
<or-input class="button"
slot="secondaryAction"
.type="${InputType.BUTTON}"
- label="${i18next.t("Cancel")}"
+ label="${i18next.t("cancel")}"
class="mdc-button mdc-dialog__button"
data-mdc-dialog-action="no"></or-input>
<or-input class="button"
slot="primaryAction"
.type="${InputType.BUTTON}"
- label="${i18next.t("Add")}"
+ label="${i18next.t("add")}"
class="mdc-button mdc-dialog__button"
data-mdc-dialog-action="yes"
@click="${this.addAttribute}"></or-input>
diff --git a/ui/component/or-header/src/index.ts b/ui/component/or-header/src/index.ts
index 0e84c3626..fa2068ec6 100644
--- a/ui/component/or-header/src/index.ts
+++ b/ui/component/or-header/src/index.ts
@@ -58,7 +58,7 @@ const secondaryItems: menuOption[] = [
{
icon: "web",
value: "language",
- text: "selectLanguage"
+ text: "language"
},
{
icon: "file-document-box-search-outline",
diff --git a/ui/component/or-header/src/or-language-modal.ts b/ui/component/or-header/src/or-language-modal.ts
index 7901ebd38..0cab77a3f 100644
--- a/ui/component/or-header/src/or-language-modal.ts
+++ b/ui/component/or-header/src/or-language-modal.ts
@@ -75,7 +75,7 @@ export class OrLanguageModal extends LitElement {
aria-describedby="my-dialog-content">
<div class="mdc-dialog__container">
<div class="mdc-dialog__surface">
- <h2 class="mdc-dialog__title" id="my-dialog-title"><or-translate value="chooseLanguage"></or-translate></h2>
+ <h2 class="mdc-dialog__title" id="my-dialog-title"><or-translate value="selectLanguage"></or-translate></h2>
<div class="dialog-container mdc-dialog__content" id="language-dialog-content">
<or-input id="language-picker"
.label="${i18next.t("language")}"
@@ -86,7 +86,7 @@ export class OrLanguageModal extends LitElement {
<or-input class="button"
slot="secondaryAction"
.type="${InputType.BUTTON}"
- label="${i18next.t("Cancel")}"
+ label="${i18next.t("cancel")}"
class="mdc-button mdc-dialog__button"
data-mdc-dialog-action="no"></or-input>
diff --git a/ui/component/or-map/src/style.ts b/ui/component/or-map/src/style.ts
index ed4c4c2ae..a600b618b 100644
--- a/ui/component/or-map/src/style.ts
+++ b/ui/component/or-map/src/style.ts
@@ -1,5 +1,5 @@
import {css, unsafeCSS} from "lit-element";
-import { DefaultColor1, DefaultColor3, DefaultColor4, DefaultColor5, DefaultHeaderHeight, DefaultBoxShadow} from "@openremote/core";
+import { DefaultColor1, DefaultColor2, DefaultColor3, DefaultColor4, DefaultColor5, DefaultHeaderHeight, DefaultBoxShadow} from "@openremote/core";
export const markerColorVar = "--internal-or-map-marker-color";
export const markerActiveColorVar = "--internal-or-map-marker-active-color";
@@ -146,7 +146,7 @@ export const mapAssetCardStyle = css`
--internal-or-asset-summary-card-header-height: var(--or-asset-summary-card-header-height, calc(${unsafeCSS(DefaultHeaderHeight)} - 10px));
--internal-or-asset-summary-card-background-color: var(--or-asset-summary-card-background-color, var(--or-app-color1, ${unsafeCSS(DefaultColor1)}));
--internal-or-asset-summary-card-background-text-color: var(--or-asset-summary-card-background-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
- --internal-or-asset-summary-card-separator-color: var(--or-asset-summary-card-separator-color, var(--or-app-color5, ${unsafeCSS(DefaultColor5)}));
+ --internal-or-asset-summary-card-separator-color: var(--or-asset-summary-card-separator-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
display: block;
}
diff --git a/ui/component/or-rules/src/or-rule-list.ts b/ui/component/or-rules/src/or-rule-list.ts
index 2511bda3f..10650970d 100644
--- a/ui/component/or-rules/src/or-rule-list.ts
+++ b/ui/component/or-rules/src/or-rule-list.ts
@@ -31,6 +31,13 @@ const style = css`
--internal-or-asset-tree-header-height: var(--internal-or-rules-list-header-height);
}
+ #wrapper {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ }
+
#wrapper[data-disabled] {
opacity: 0.3;
pointer-events: none;
@@ -245,7 +252,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {
${!this._nodes || this._showLoading
? html`
- <span id="loading">LOADING</span>`
+ <span id="loading"><or-translate value="loading"></or-translate></span>`
: html`
<div id="list-container">
<ol id="list">