Skip to content

armgit / core

Public Imported from GitHub
0

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

Styling updates (#442)

DonWillems3c31a8750f15
diff --git a/manager/src/web/shared/locales/en/or.json b/manager/src/web/shared/locales/en/or.json
index 740250c21..25f00b2e0 100644
--- a/manager/src/web/shared/locales/en/or.json
+++ b/manager/src/web/shared/locales/en/or.json
@@ -398,5 +398,6 @@
"latestDatapoint": "Latest datapoint",
"arrayDimensions": "Array dimensions",
"addParameter": "Add parameter",
- "addItem": "Add item"
+ "addItem": "Add item",
+ "array": "Array"
}
diff --git a/manager/src/web/shared/locales/nl/or.json b/manager/src/web/shared/locales/nl/or.json
index dbe3c1ca6..4d6afb504 100644
--- a/manager/src/web/shared/locales/nl/or.json
+++ b/manager/src/web/shared/locales/nl/or.json
@@ -385,5 +385,7 @@
"assetName": "Asset naam",
"attributeName": "Attribuut naam",
"oldestDatapoint": "Oudste datapunt",
- "latestDatapoint": "Laatste datapunt"
+ "latestDatapoint": "Laatste datapunt",
+ "arrayDimensions": "Array dimensies",
+ "array": "Array"
}
diff --git a/model/src/main/java/org/openremote/model/value/ValueFormat.java b/model/src/main/java/org/openremote/model/value/ValueFormat.java
index 694405e75..388bc7204 100644
--- a/model/src/main/java/org/openremote/model/value/ValueFormat.java
+++ b/model/src/main/java/org/openremote/model/value/ValueFormat.java
@@ -61,9 +61,9 @@ public class ValueFormat implements Serializable {
public static ValueFormat NUMBER_1_DP() { return new ValueFormat().setMinimumFractionDigits(1).setMaximumFractionDigits(1); }
public static ValueFormat NUMBER_2_DP() { return new ValueFormat().setMinimumFractionDigits(2).setMaximumFractionDigits(2); }
public static ValueFormat NUMBER_3_DP() { return new ValueFormat().setMinimumFractionDigits(3).setMaximumFractionDigits(3); }
- public static ValueFormat NUMBER_1_DP_MAX() { return new ValueFormat().setMaximumFractionDigits(2); }
+ public static ValueFormat NUMBER_1_DP_MAX() { return new ValueFormat().setMaximumFractionDigits(1); }
public static ValueFormat NUMBER_2_DP_MAX() { return new ValueFormat().setMaximumFractionDigits(2); }
- public static ValueFormat NUMBER_3_DP_MAX() { return new ValueFormat().setMaximumFractionDigits(2); }
+ public static ValueFormat NUMBER_3_DP_MAX() { return new ValueFormat().setMaximumFractionDigits(3); }
public static ValueFormat DATE_DAY_MONTH_YEAR() { return new ValueFormat(); }
public static ValueFormat DATE_WEEK_NUMBER() { return new ValueFormat().setWeek(StyleRepresentation.NUMERIC); }
public static ValueFormat DATE_DAY_MONTH_YEAR_TIME_WITHOUT_SECOND() { return new ValueFormat(); }
diff --git a/ui/app/manager/src/pages/page-assets.ts b/ui/app/manager/src/pages/page-assets.ts
index 043be9f5b..a0577121c 100644
--- a/ui/app/manager/src/pages/page-assets.ts
+++ b/ui/app/manager/src/pages/page-assets.ts
@@ -227,7 +227,7 @@ class PageAssets<S extends AppStateKeyed> extends Page<S> {
protected _confirmContinue(action: () => void) {
if (this._viewer.isModified()) {
- showOkCancelDialog(i18next.t("loseChanges"), i18next.t("confirmContinueAssetModified"))
+ showOkCancelDialog(i18next.t("loseChanges"), i18next.t("confirmContinueAssetModified"), i18next.t("discard"))
.then((ok) => {
if (ok) {
action();
diff --git a/ui/app/manager/src/pages/page-realms.ts b/ui/app/manager/src/pages/page-realms.ts
index 0a843abe3..01f79056d 100644
--- a/ui/app/manager/src/pages/page-realms.ts
+++ b/ui/app/manager/src/pages/page-realms.ts
@@ -284,7 +284,7 @@ class PageRealms<S extends AppStateKeyed> extends Page<S> {
}
private _deleteTenant(tenant) {
- showOkCancelDialog(i18next.t("delete"), i18next.t("deleteTenantConfirm"))
+ showOkCancelDialog(i18next.t("delete"), i18next.t("deleteTenantConfirm"), i18next.t("delete"))
.then((ok) => {
if (ok) {
this._doDelete(tenant);
diff --git a/ui/app/manager/src/pages/page-roles.ts b/ui/app/manager/src/pages/page-roles.ts
index ae21f967a..4b06a3955 100644
--- a/ui/app/manager/src/pages/page-roles.ts
+++ b/ui/app/manager/src/pages/page-roles.ts
@@ -64,7 +64,6 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {
.panel {
width: calc(100% - 90px);
- padding: 0 20px;
max-width: 1310px;
background-color: white;
border: 1px solid #e5e5e5;
@@ -85,7 +84,6 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {
letter-spacing: 0.025em;
}
-
#table-roles,
#table-roles table{
width: 100%;
@@ -93,6 +91,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {
}
.mdc-data-table__row {
+ cursor: pointer;
border-top-color: #D3D3D3;
}
@@ -287,7 +286,7 @@ class PageRoles<S extends AppStateKeyed> extends Page<S> {
}
private _deleteRole(role) {
- showOkCancelDialog(i18next.t("delete"), i18next.t("deleteRoleConfirm"))
+ showOkCancelDialog(i18next.t("delete"), i18next.t("deleteRoleConfirm"), i18next.t("delete"))
.then((ok) => {
if (ok) {
this.doDelete(role);
diff --git a/ui/app/manager/src/pages/page-users.ts b/ui/app/manager/src/pages/page-users.ts
index 03c3e8b4c..2f93dbdbc 100644
--- a/ui/app/manager/src/pages/page-users.ts
+++ b/ui/app/manager/src/pages/page-users.ts
@@ -66,7 +66,7 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
border: 1px solid #e5e5e5;
border-radius: 5px;
position: relative;
- margin: 20px auto;
+ margin: 5px auto;
padding: 24px;
}
@@ -75,6 +75,8 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
font-weight: bolder;
line-height: 1em;
color: var(--internal-or-asset-viewer-title-text-color);
+ margin-bottom: 20px;
+ margin-top: 0;
flex: 0 0 auto;
letter-spacing: 0.025em;
}
@@ -150,9 +152,14 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
.button {
cursor: pointer;
+ display: flex;
+ flex-direction: row;
align-content: center;
+ padding: 16px;
align-items: center;
- margin: 0;
+ font-size: 14px;
+ text-transform: uppercase;
+ color: var(--or-app-color4);
}
@media screen and (max-width: 768px) {
@@ -326,7 +333,7 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
private _deleteUser(user) {
- showOkCancelDialog(i18next.t("delete"), i18next.t("deleteUserConfirm"))
+ showOkCancelDialog(i18next.t("delete"), i18next.t("deleteUserConfirm"), i18next.t("delete"))
.then((ok) => {
if (ok) {
this.doDelete(user);
@@ -396,10 +403,7 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
this._users = [...this._users, {enabled: true}];
}}">
<td colspan="100%">
- <or-mwc-input class="button" .type="${InputType.BUTTON}"
- .label="${i18next.t("add")} ${i18next.t("user")}"
- icon="plus">
- </or-mwc-input>
+ <a class="button"><or-icon icon="plus"></or-icon>${i18next.t("add")} ${i18next.t("user")}</a>
</td>
</tr>
` : ``}
@@ -439,10 +443,7 @@ class PageUsers<S extends AppStateKeyed> extends Page<S> {
serviceAccount: true}]
}}">
<td colspan="100%">
- <or-mwc-input class="button" .type="${InputType.BUTTON}"
- .label="${i18next.t("add")} ${i18next.t("user")}"
- icon="plus">
- </or-mwc-input>
+ <a class="button"><or-icon icon="plus"></or-icon>${i18next.t("add")} ${i18next.t("user")}</a>
</td>
</tr>
` : ``}
diff --git a/ui/component/or-app/images/logo-mobile.png b/ui/component/or-app/images/logo-mobile.png
deleted file mode 100644
index 15ace0048..000000000
Binary files a/ui/component/or-app/images/logo-mobile.png and /dev/null differ
diff --git a/ui/component/or-app/images/logo-mobile.svg b/ui/component/or-app/images/logo-mobile.svg
new file mode 100644
index 000000000..aa288222c
--- /dev/null
+++ b/ui/component/or-app/images/logo-mobile.svg
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg viewBox="0 0 107.372 107.453" xmlns="http://www.w3.org/2000/svg">
+ <g>
+ <path fill="#C4D600" d="M53.648,107.296C24.068,107.296,0,83.236,0,53.646h11.234c0,23.391,19.025,42.42,42.414,42.42 c23.385,0,42.416-19.029,42.416-42.42c0-23.382-19.031-42.408-42.416-42.408V0c29.582,0,53.65,24.068,53.65,53.646 C107.299,83.236,83.23,107.296,53.648,107.296L53.648,107.296z"/>
+ <path fill="#4E9D2D" d="M45.525,92.57c-10.395-2.166-19.324-8.262-25.145-17.137c-5.814-8.884-7.826-19.511-5.654-29.906 c2.174-10.399,8.258-19.325,17.141-25.145c8.889-5.815,19.506-7.825,29.906-5.655c21.463,4.479,35.281,25.582,30.803,47.041 L81.58,59.478c3.207-15.397-6.703-30.539-22.105-33.751c-7.461-1.56-15.078-0.119-21.455,4.06 c-6.369,4.169-10.736,10.58-12.299,18.039c-1.555,7.458-0.113,15.075,4.064,21.453c4.17,6.37,10.576,10.744,18.041,12.297 L45.525,92.57L45.525,92.57z"/>
+ <path fill="#1D5632" d="M53.682,79.428c-0.432,0-0.871-0.012-1.309-0.032c-6.869-0.342-13.205-3.344-17.83-8.439 c-4.621-5.108-6.982-11.705-6.639-18.582l11.215,0.553c-0.188,3.879,1.141,7.609,3.75,10.488c2.604,2.879,6.186,4.568,10.059,4.761 c3.869,0.179,7.607-1.142,10.48-3.748c2.887-2.603,4.576-6.179,4.773-10.057c0.391-8.012-5.803-14.854-13.816-15.248l0.559-11.222 c14.201,0.71,25.178,12.823,24.475,27.021c-0.344,6.883-3.336,13.212-8.441,17.831C66.174,77.086,60.084,79.428,53.682,79.428 L53.682,79.428z"/>
+ </g>
+</svg>
\ No newline at end of file
diff --git a/ui/component/or-app/images/logo.png b/ui/component/or-app/images/logo.png
deleted file mode 100644
index 2179b259d..000000000
Binary files a/ui/component/or-app/images/logo.png and /dev/null differ
diff --git a/ui/component/or-app/images/logo.svg b/ui/component/or-app/images/logo.svg
new file mode 100644
index 000000000..5483ae32c
--- /dev/null
+++ b/ui/component/or-app/images/logo.svg
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg viewBox="72.189 -19.217 539.143 173.724" xmlns="http://www.w3.org/2000/svg">
+ <g transform="matrix(1, 0, 0, 1, 0, 7)">
+ <path fill="#1D5632" d="M145.09,38.053c12.479,0,22.098,10.548,22.098,22.095c0,11.473-9.473,22.097-22.098,22.097 c-12.316,0-21.943-10.392-21.943-21.787C123.146,47.14,134.004,38.053,145.09,38.053z M145.17,77.396 c8.164,0,16.631-6.468,16.631-17.479c0-11.088-9.393-17.018-16.631-17.018c-7.701,0-16.635,6.313-16.635,17.476 C128.535,70.158,136.471,77.396,145.17,77.396z"/>
+ <path fill="#1D5632" d="M267.848,38.237h5.385V45.4h0.156c1.617-2.551,5.773-6.494,12.938-6.494c5.154,0,9.469,1.315,13.316,5.179 c3.156,3.093,5.238,7.956,5.238,14.911v23.26h-5.391v-23.26c0-5.484-1.695-9.347-4.006-11.588c-2.924-2.859-6.775-3.63-9.158-3.63 c-2.389,0-6.24,0.771-9.168,3.63c-2.309,2.241-4,6.104-3.926,11.588v23.26h-5.385V38.237z"/>
+ <path fill="#4E9D2D" d="M312.16,39.521h9.395v3.775h0.15c1.928-2.772,3.848-5.235,9.166-5.235h0.846v9.932 C322.4,48.378,322.4,55.69,322.4,58.23v24.025h-10.24V39.521z"/>
+ <path fill="#4E9D2D" d="M448.814,59.918c0-12.935,10.547-22.866,22.789-22.866c12.088,0,22.637,9.622,22.637,22.71 c0,14.016-10.781,22.867-22.637,22.867C458.898,82.629,448.814,72.159,448.814,59.918z M483.992,59.995 c0-7.776-6-13.554-12.389-13.554c-5.312,0-12.555,4.546-12.555,13.477c0,8.088,6.09,13.321,12.555,13.321 C479.066,73.239,483.992,66.771,483.992,59.995z"/>
+ <path fill="#4E9D2D" d="M500.199,47.598h-5.984V38.51h5.984V24.271h10.24V38.51h6.16v9.088h-6.16v33.646h-10.24V47.598z"/>
+ <path fill="#4E9D2D" d="M426.043,38.349c-5.213,0-9.924,2.27-13.324,5.927c-3.398-3.657-8.119-5.927-13.322-5.927 c-10.326,0-18.73,8.916-18.73,19.873v24.464h10.752V58.222c0-5.032,3.582-9.123,7.979-9.123c4.203,0,7.65,3.733,7.947,8.453 c-0.006,0.227-0.033,0.446-0.033,0.67v24.464h10.754v-0.06h0.059V58.222c0-0.224-0.023-0.443-0.029-0.67 c0.297-4.72,3.744-8.453,7.949-8.453c4.395,0,7.979,4.091,7.979,9.123v24.404h10.748V58.222 C444.77,47.265,436.371,38.349,426.043,38.349z"/>
+ <rect x="171.701" y="39.091" fill="#1D5632" width="5.402" height="56.955"/>
+ <path fill="#1D5632" d="M193.68,38.053c-11.088,0-21.945,9.052-21.979,22.335h5.393c0-0.006,0-0.006,0-0.006 c0-11.168,8.945-17.481,16.654-17.481c7.256,0,16.66,5.93,16.66,17.018c0,11.011-8.48,17.479-16.66,17.479 c-4.051,0-7.928-1.587-10.932-4.251v6.167c3.186,1.85,6.881,2.932,10.863,2.932c12.639,0,22.131-10.624,22.131-22.097 C215.811,48.601,206.168,38.053,193.68,38.053z"/>
+ <path fill="#1D5632" d="M259.939,48.83c-3.002-5.233-9.547-10.702-18.787-10.777c-12.242,0.231-21.865,10.237-21.865,22.173 c0,12.471,10.166,22.019,21.943,22.019c9.699,0,17.785-6.388,20.711-14.782h-5.699c-1.922,5.234-7.391,9.781-15.09,9.935 c-8.236,0-15.938-7.006-16.322-15.246h0.006c-0.234-2.232-0.318-5.594,0.805-8.146h0.01c2.654-7.622,9.742-11.104,15.58-11.104 c6.701,0,14.783,4.466,16.479,14.402h-24.168v4.848h29.635C263.402,58.073,262.789,53.373,259.939,48.83z"/>
+ <path fill="#4E9D2D" d="M376.396,59.304c0-10.779-8.549-22.481-22.1-22.481c-13.172,0-22.482,11.087-22.482,23.173 c0,12.471,9.852,22.634,22.559,22.634c10.008,0,18.17-7.157,20.635-14.855h-10.779c-1.926,3.538-5.314,5.466-9.855,5.466 c-7.08,0-11.047-5.616-11.715-8.492c-0.619-1.886-1.23-4.997-0.352-8.521h-0.023c0.051-0.205,0.117-0.395,0.17-0.59 c0.021-0.064,0.037-0.123,0.057-0.189c2.145-7.278,8.221-9.232,11.863-9.232c5.08,0,10.398,3.154,11.545,10.012h-17.971v8.235 h27.826C376.086,63.074,376.396,61.307,376.396,59.304z"/>
+ <path fill="#4E9D2D" d="M561.125,59.304c0-10.779-8.541-22.481-22.09-22.481c-13.172,0-22.49,11.087-22.49,23.173 c0,12.471,9.861,22.634,22.566,22.634c10.008,0,18.17-7.157,20.635-14.855h-10.781c-1.924,3.538-5.314,5.466-9.854,5.466 c-7.078,0-11.047-5.616-11.717-8.492c-0.615-1.886-1.23-4.997-0.354-8.521h-0.018c0.047-0.205,0.115-0.395,0.168-0.59 c0.021-0.064,0.037-0.123,0.057-0.189c2.145-7.278,8.221-9.232,11.863-9.232c5.08,0,10.393,3.154,11.551,10.012h-18.629v8.235 h28.479C560.82,63.074,561.125,61.307,561.125,59.304z"/>
+ </g>
+</svg>
\ No newline at end of file
diff --git a/ui/component/or-app/src/index.ts b/ui/component/or-app/src/index.ts
index 36c9d0d84..20ee24955 100644
--- a/ui/component/or-app/src/index.ts
+++ b/ui/component/or-app/src/index.ts
@@ -26,8 +26,8 @@ import {AppStateKeyed, updatePage, updateRealm} from "./app";
import { InputType, OrInputChangedEvent } from "@openremote/or-mwc-components/or-mwc-input";
import { ORError } from "@openremote/core";
-const DefaultLogo = require("../images/logo.png");
-const DefaultMobileLogo = require("../images/logo-mobile.png");
+const DefaultLogo = require("../images/logo.svg");
+const DefaultMobileLogo = require("../images/logo-mobile.svg");
const DefaultFavIcon = require("../images/favicon.ico");
export * from "./app";
diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.ts
index 605d635f0..60d995a3a 100644
--- a/ui/component/or-asset-tree/src/index.ts
+++ b/ui/component/or-asset-tree/src/index.ts
@@ -237,6 +237,9 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
@property({type: Array})
public selectedIds?: string[];
+ @property({type: Boolean})
+ public showDeselectBtn?: boolean = true;
+
@property({type: Boolean})
public showSortBtn?: boolean = true;
@@ -297,14 +300,14 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
</div>
<div id="header-btns">
- <or-mwc-input ?hidden="${!this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-mwc-input>
+ <or-mwc-input ?hidden="${!this.selectedIds || this.selectedIds.length === 0 || !this.showDeselectBtn}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-mwc-input>
<or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-mwc-input>
<or-mwc-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this.selectedNodes.some((node) => this.isAncestorSelected(node))}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-mwc-input>
<or-mwc-input ?hidden="${this._isReadonly() || !this._canAdd()}" type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked()}"></or-mwc-input>
<or-mwc-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-mwc-input>
${getContentWithMenuTemplate(
- html`<or-mwc-input type="${InputType.BUTTON}" icon="sort-variant" ?hidden="${!this.showSortBtn}"></or-mwc-input>`,
+ html`<or-mwc-input type="${InputType.BUTTON}" ?hidden="${!this.showSortBtn}" icon="sort-variant"></or-mwc-input>`,
["name", "type", "createdOn", "status"].map((sort) => { return {value: sort, text: i18next.t(sort)} as ListItem; }),
this.sortBy,
(v) => this._onSortClicked(v as string))}
@@ -663,7 +666,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
};
// Confirm deletion request
- showOkCancelDialog(i18next.t("delete"), i18next.t("deleteAssetsConfirm"))
+ showOkCancelDialog(i18next.t("delete"), i18next.t("deleteAssetsConfirm"), i18next.t("delete"))
.then((ok) => {
if (ok) {
doDelete();
diff --git a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts b/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
index 5e4aaf830..a4967bb04 100644
--- a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
+++ b/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
@@ -179,8 +179,8 @@ export class OrAddAssetDialog extends LitElement {
<div id="name-wrapper">
<or-mwc-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.name}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.onNameChanged(e.detail.value)}"></or-mwc-input>
<or-mwc-input id="parent" .type="${InputType.TEXT}" comfortable readonly outlined .label="${i18next.t("parent")}" .value="${parentStr}" @click="${() => this._onToggleParentAssetSelector()}"></or-mwc-input>
- <or-mwc-input id="toggle-parent-selector" icon="pencil" type="${InputType.BUTTON}" @click="${() => this._onToggleParentAssetSelector()}"></or-mwc-input>
- <or-mwc-input id="remove-parent" ?disabled="${!this.parent}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-mwc-input>
+ <or-mwc-input id="toggle-parent-selector" icon="pencil" type="${InputType.BUTTON}" @click="${() => this._onToggleParentAssetSelector()}" title="Edit parent"></or-mwc-input>
+ <or-mwc-input id="remove-parent" ?disabled="${!this.parent}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}" title="Remove parent"></or-mwc-input>
</div>
<form id="mdc-dialog-form-add" class="row">
<div id="type-list" class="col">
@@ -193,7 +193,7 @@ export class OrAddAssetDialog extends LitElement {
</div>
${!this.showParentAssetSelector
? html``
- : html`<or-asset-tree id="parent-selector" class="col" .showSortBtn="${false}" selectedNodes readonly></or-asset-tree>`
+ : html`<or-asset-tree id="parent-selector" class="col" .showDeselectBtn="${false}" .showSortBtn="${false}" selectedNodes readonly></or-asset-tree>`
}
</form>
</div>
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index a500b1475..f536298a3 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -662,7 +662,7 @@ export function getPanelContent(panelName: string, asset: Asset, attributes: { [
<div style="display: grid">
${availableAttributes.sort().map((attribute) =>
html`<div style="grid-column: 1 / -1;">
- <or-mwc-input .type="${InputType.CHECKBOX}" .label="${i18next.t(attribute)}" .value="${!!selectedAttributes.find((selected) => selected === attribute)}"
+ <or-mwc-input .type="${InputType.CHECKBOX}" .label="${i18next.t(Util.camelCaseToSentenceCase(attribute))}" .value="${!!selectedAttributes.find((selected) => selected === attribute)}"
@or-mwc-input-changed="${(evt: OrInputChangedEvent) => evt.detail.value ? newlySelectedAttributes.push(attribute) : newlySelectedAttributes.splice(newlySelectedAttributes.findIndex((s) => s === attribute), 1)}"></or-mwc-input>
</div>`)}
</div>
@@ -796,7 +796,7 @@ export function getAttributeTemplate(asset: Asset, attribute: Attribute<any>, ho
}
return html`
- <or-attribute-input dense .assetType="${asset!.type}" .attribute="${attribute}" .assetId="${asset.id!}" .disabled="${attrDisabled}" .label="${attrLabel}" .readonly="${attrReadonly}" .disableButton="${attrDisableButton}" .inputType="${attrInputType}" .hasHelperText="${!attrDisableHelper}"></or-attribute-input>
+ <or-attribute-input .assetType="${asset!.type}" .attribute="${attribute}" .assetId="${asset.id!}" .disabled="${attrDisabled}" .label="${attrLabel}" .readonly="${attrReadonly}" .disableButton="${attrDisableButton}" .inputType="${attrInputType}" .hasHelperText="${!attrDisableHelper}"></or-attribute-input>
`;
}
@@ -1158,7 +1158,7 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
return html`
<div id="wrapper">
- <div id="asset-header">
+ <div id="asset-header" class=${editMode ? "editmode" : ""}>
<a class="back-navigation" @click="${() => window.history.back()}">
<or-icon icon="chevron-left"></or-icon>
</a>
@@ -1166,15 +1166,11 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
<or-icon title="${descriptor && descriptor.name ? descriptor.name : "unset"}" style="--or-icon-fill: ${descriptor && descriptor.colour ? "#" + descriptor.colour : "unset"}" icon="${descriptor && descriptor.icon ? descriptor.icon : AssetModelUtil.getAssetDescriptorIcon(WellknownAssets.THINGASSET)}"></or-icon>
${editMode ? html`<or-mwc-input id="name-input" .type="${InputType.TEXT}" min="1" max="1023" comfortable required outlined .label="${i18next.t("name")}" .value="${this.asset.name}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => {this.asset!.name = e.detail.value; this._onAssetModified();}}"></or-mwc-input>` : html`<span>${this.asset.name}</span>`}
</div>
- ${!this._isReadonly() ? html`
- <span id="edit-wrapper" class="mobileHidden">
- <or-translate value="editAsset"></or-translate>
- <or-mwc-input id="edit-btn" .type="${InputType.SWITCH}" .value="${this.editMode}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this._onEditToggleClicked(ev.detail.value)}"></or-mwc-input>
- </span>
- `: ``}
<div id="right-wrapper" class="mobileHidden">
${this.asset!.createdOn ? html`<or-translate id="created-time" value="createdOnWithDate" .options="${{ date: new Date(this.asset!.createdOn!) } as TOptions<InitOptions>}"></or-translate>` : ``}
${editMode ? html`<or-mwc-input id="save-btn" .disabled="${!this.isModified()}" raised .type="${InputType.BUTTON}" .label="${i18next.t("save")}" @or-mwc-input-changed="${() => this._onSaveClicked()}"></or-mwc-input>` : ``}
+ ${!this._isReadonly() ? html`<or-mwc-input id="edit-btn" class="mobileHidden" outlined .type="${InputType.BUTTON}" .value="${this.editMode}" .label="${this.editMode ? i18next.t("view") : i18next.t("modify")}" icon="${this.editMode ? "eye" : "pencil"}" @or-mwc-input-changed="${() => this._onEditToggleClicked(!this.editMode!)}"></or-mwc-input>
+ `: ``}
</div>
</div>
${content}
diff --git a/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts b/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts
index 4efae61c4..7390d40d3 100644
--- a/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts
+++ b/ui/component/or-asset-viewer/src/or-add-attribute-panel.ts
@@ -45,25 +45,17 @@ export class OrAddAttributePanel extends LitElement {
@query("#array-input")
protected arrayInput!: OrMwcInput;
- @query("#wrapper")
- protected wrapperElem!: HTMLDivElement;
-
+ protected customAttribute: boolean = false;
protected attributeTypes?: [string, string][];
protected attributeValueTypes?: [string, string][];
+ protected arrayRegex: RegExp = /\[\]/g;
public static get styles() {
return css`
- #attribute-creator > * {
- padding: 20px;
- }
-
or-mwc-input {
width: 300px;
display: block;
- }
-
- .hidden {
- visibility: hidden;
+ padding: 10px 20px;
}`;
}
@@ -106,27 +98,23 @@ export class OrAddAttributePanel extends LitElement {
return html`
<div id="attribute-creator">
- <div>
- <or-mwc-input .type="${InputType.SELECT}" .options="${this.attributeTypes}" .label="${i18next.t("type")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTypeChanged(ev.detail.value)}"></or-mwc-input>
- </div>
- <div id="wrapper" class="hidden">
- <or-mwc-input id="name-input" .type="${InputType.TEXT}" .label="${i18next.t("name")}" pattern="\\w+" required @keyup="${(ev: KeyboardEvent) => this.onNameChanged((ev.target as OrMwcInput).currentValue)}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onNameChanged(ev.detail.value)}"></or-mwc-input>
- <or-mwc-input id="type-input" .type="${InputType.SELECT}" .value="${this.attribute && this.attribute.type ? this.attribute.type.replace("[]", "") : undefined}" .options="${this.attributeValueTypes}" .label="${i18next.t("valueType")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onValueTypeChanged(ev.detail.value)}"></or-mwc-input>
- <or-mwc-input id="array-checkbox" .type="${InputType.CHECKBOX}" .value="${this.isArray}" .label="${i18next.t("array")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onArrayChanged(ev.detail.value, 1)}"></or-mwc-input>
- <or-mwc-input id="array-input" .type="${InputType.NUMBER}" ?disabled="${!this.isArray}" .value="${this.arrayDimensions}" min="1" max="2" .label="${i18next.t("arrayDimensions")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onArrayChanged(true, ev.detail.value)}"></or-mwc-input>
- </div>
+ <or-mwc-input .type="${InputType.SELECT}" .options="${this.attributeTypes}" .label="${i18next.t("type")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onTypeChanged(ev.detail.value)}"></or-mwc-input>
+ <or-mwc-input id="name-input" .type="${InputType.TEXT}" ?disabled="${!this.customAttribute}" .value="${(this.attribute && this.attribute.name) ? this.attribute.name : undefined}" .label="${i18next.t("name")}" pattern="\\w+" required @keyup="${(ev: KeyboardEvent) => this.onNameChanged((ev.target as OrMwcInput).currentValue)}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onNameChanged(ev.detail.value)}"></or-mwc-input>
+ <or-mwc-input id="type-input" .type="${InputType.SELECT}" ?disabled="${!this.customAttribute}" .value="${this.attribute && this.attribute.type ? this.attribute.type.replace(this.arrayRegex, "") : undefined}" .options="${this.attributeValueTypes}" .label="${i18next.t("valueType")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onValueTypeChanged(ev.detail.value)}"></or-mwc-input>
+ <or-mwc-input id="array-checkbox" .type="${InputType.CHECKBOX}" ?disabled="${!this.customAttribute}" .value="${this.isArray}" .label="${i18next.t("array")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onArrayChanged(ev.detail.value, 1)}"></or-mwc-input>
+ <or-mwc-input id="array-input" .type="${InputType.NUMBER}" ?disabled="${!this.isArray || !this.customAttribute}" .value="${this.arrayDimensions}" min="1" max="2" .label="${i18next.t("arrayDimensions")}" @or-mwc-input-changed="${(ev: OrInputChangedEvent) => this.onArrayChanged(true, ev.detail.value)}"></or-mwc-input>
</div>
`;
}
protected onTypeChanged(name: string) {
if (name === "@custom") {
- this.wrapperElem.classList.remove("hidden");
+ this.customAttribute = true;
this.attribute = {
meta: {}
};
} else {
- this.wrapperElem.classList.add("hidden");
+ this.customAttribute = false;
const descriptor = AssetModelUtil.getAttributeDescriptor(name, this.asset.type!)!;
this.attribute = {};
this.attribute.name = descriptor.name;
@@ -162,7 +150,7 @@ export class OrAddAttributePanel extends LitElement {
return;
}
- let type = this.attribute.type.replace("[]", "");
+ let type = this.attribute.type.replace(this.arrayRegex, "");
if (this.isArray) {
for (let i=1; i<=this.arrayDimensions; i++) {
type += "[]";
diff --git a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts b/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts
index 0830dbaab..ee119556e 100644
--- a/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts
+++ b/ui/component/or-asset-viewer/src/or-edit-asset-panel.ts
@@ -250,7 +250,7 @@ export class OrEditAssetPanel extends LitElement {
<td class="padded-cell mdc-data-table__cell expander-cell"><or-icon icon="chevron-right"></or-icon><span>${attribute.name}</span></td>
<td class="padded-cell mdc-data-table__cell">${Util.getValueDescriptorLabel(attribute.type!)}</td>
<td class="padded-cell overflow-visible mdc-data-table__cell">
- <or-attribute-input compact .assetType="${assetType}" .label=${null} .readonly="${false}" .attribute="${attribute}" .assetId="${this.asset.id!}" disableWrite disableSubscribe disableButton @or-attribute-input-changed="${(e: OrAttributeInputChangedEvent) => this._onAttributeModified(attribute, e.detail.value)}"></or-attribute-input>
+ <or-attribute-input compact .comfortable="${true}" .assetType="${assetType}" .label=${null} .readonly="${false}" .attribute="${attribute}" .assetId="${this.asset.id!}" disableWrite disableSubscribe disableButton @or-attribute-input-changed="${(e: OrAttributeInputChangedEvent) => this._onAttributeModified(attribute, e.detail.value)}"></or-attribute-input>
</td>
<td class="padded-cell mdc-data-table__cell actions-cell">${canDelete ? html`<or-mwc-input type="${InputType.BUTTON}" icon="delete" @click="${deleteAttribute}">` : ``}</td>
</tr>
@@ -301,7 +301,8 @@ export class OrEditAssetPanel extends LitElement {
content = html`<p>NOT SUPPORTED</p>`;
} else {
const options: ValueInputProviderOptions = {
- label: Util.getMetaLabel(metaItem, descriptor!, this.asset.type!, true)
+ label: Util.getMetaLabel(metaItem, descriptor!, this.asset.type!, true),
+ resizeVertical: true
};
const provider = getValueHolderInputTemplateProvider(this.asset.type!, metaItem, descriptor, valueDescriptor, (detail: OrInputChangedEventDetail) => this._onMetaItemModified(attribute, metaItem, detail), options);
@@ -341,11 +342,6 @@ export class OrEditAssetPanel extends LitElement {
overflow-y: visible !important;
}
#dialog-content {
- border-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
- border-top-width: 1px;
- border-top-style: solid;
- border-bottom-width: 1px;
- border-bottom-style: solid;
padding: 0;
overflow: visible;
}
@@ -398,13 +394,6 @@ export class OrEditAssetPanel extends LitElement {
`,
styles: html`
<style>
- #dialog-content {
- border-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
- border-top-width: 1px;
- border-top-style: solid;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- }
#meta-creator {
height: 600px;
max-height: 100%;
@@ -531,7 +520,7 @@ export class OrEditAssetPanel extends LitElement {
return html`
<div id="parent-edit-wrapper">
${getPropertyTemplate(this.asset, "parentId", this, undefined, undefined, {readonly: false, label: i18next.t("parent")})}
- <or-mwc-input id="change-parent-btn" type="${InputType.BUTTON}" raised .label="${i18next.t("edit")}" @or-mwc-input-changed="${openDialog}"></or-mwc-input>
+ <or-mwc-input id="change-parent-btn" type="${InputType.BUTTON}" outlined .label="${i18next.t("edit")}" @or-mwc-input-changed="${openDialog}"></or-mwc-input>
</div>
`;
}
diff --git a/ui/component/or-asset-viewer/src/style.ts b/ui/component/or-asset-viewer/src/style.ts
index 701acb3a5..bfb4b4bd5 100644
--- a/ui/component/or-asset-viewer/src/style.ts
+++ b/ui/component/or-asset-viewer/src/style.ts
@@ -87,19 +87,19 @@ export const style = css`
#view-container, #edit-container {
flex: 0 1 auto;
- margin-top: 10px;
+ padding-top: 10px;
overflow: auto;
+ min-height: calc(100vh - 88px - var(--internal-or-header-height));
}
#view-container {
margin-top: 0;
box-sizing: border-box;
display: grid;
- padding: 20px 20px;
+ padding: 0 20px 20px;
grid-gap: 10px;
grid-template-columns: repeat(auto-fill, minmax(calc(50% - 5px),1fr));
grid-auto-rows: 5px;
- min-height: calc(100vh - 68px - var(--internal-or-header-height));
-webkit-animation: fadein 0.3s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 0.3s; /* Firefox < 16 */
@@ -150,13 +150,19 @@ export const style = css`
}
#asset-header {
- padding: 20px 30px 0 30px;
+ padding: 20px 30px;
display: flex;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
}
+ #asset-header.editmode {
+ padding: 14px 30px;
+ background-color: var(--internal-or-asset-viewer-panel-color);
+ border-bottom: solid 1px #e5e5e5;
+ }
+
#title {
flex: 1 1 0%;
font-size: 18px;
@@ -187,6 +193,10 @@ export const style = css`
#save-btn {
margin-left: 20px;
}
+
+ #edit-btn {
+ margin-left: 15px;
+ }
#location-panel .panel-content {
height: 100%;
@@ -254,7 +264,7 @@ export const style = css`
#view-container {
grid-auto-rows: auto;
grid-template-columns: 100% !important;
- padding: 20px 0;
+ padding: 10px 0;
min-height: unset;
}
}
diff --git a/ui/component/or-attribute-input/src/index.ts b/ui/component/or-attribute-input/src/index.ts
index 0d8bd4bc8..ea41e24e2 100644
--- a/ui/component/or-attribute-input/src/index.ts
+++ b/ui/component/or-attribute-input/src/index.ts
@@ -127,7 +127,7 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
}
#wrapper.right-padding {
- padding-right: 48px;
+ padding-right: 52px;
}
#wrapper-helper {
@@ -175,6 +175,8 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
#send-btn {
flex: 0;
+ margin-left: 4px;
+ margin-top: 4px;
}
/* https://codepen.io/finnhvman/pen/bmNdNr */
@@ -343,6 +345,12 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
@property({type: Boolean})
public compact: boolean = false;
+ @property({type: Boolean})
+ public comfortable: boolean = false;
+
+ @property({type: Boolean})
+ public resizeVertical: boolean = false;
+
@property({type: Boolean})
public fullWidth?: boolean;
@@ -495,6 +503,8 @@ export class OrAttributeInput extends subscribe(manager)(translate(i18next)(LitE
disabled: this.disabled,
compact: this.compact,
label: this.getLabel(),
+ comfortable: this.comfortable,
+ resizeVertical: this.resizeVertical,
inputType: this.inputType
};
diff --git a/ui/component/or-map/src/index.ts b/ui/component/or-map/src/index.ts
index 8a652713a..b5a4fd67b 100644
--- a/ui/component/or-map/src/index.ts
+++ b/ui/component/or-map/src/index.ts
@@ -183,6 +183,7 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a
const disabled = !!(options && options.disabled);
const readonly = !!(options && options.readonly);
const compact = !!(options && options.compact);
+ const comfortable = !!(options && options.comfortable);
const centerControl = new CenterControl();
const coordinatesControl = new CoordinatesControl(disabled, valueChangeNotifier);
@@ -292,7 +293,7 @@ export const geoJsonPointInputTemplateProvider: ValueInputProviderGenerator = (a
}
</style>
<div id="geo-json-point-input-compact-wrapper">
- <or-mwc-input .type="${InputType.TEXT}" .value="${centerStr}" .pattern="${CoordinatesRegexPattern}" @keyup="${(e: KeyboardEvent) => getCoordinatesInputKeyHandler(valueChangeNotifier)(e)}"></or-mwc-input>
+ <or-mwc-input .comfortable="${comfortable}" .type="${InputType.TEXT}" .value="${centerStr}" .pattern="${CoordinatesRegexPattern}" @keyup="${(e: KeyboardEvent) => getCoordinatesInputKeyHandler(valueChangeNotifier)(e)}"></or-mwc-input>
<or-mwc-input style="width: auto;" .type="${InputType.BUTTON}" compact icon="crosshairs-gps" @click="${onClick}"></or-mwc-input>
</div>
`;
diff --git a/ui/component/or-mwc-components/src/or-mwc-dialog.ts b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
index 5a9100eee..6e6af8444 100644
--- a/ui/component/or-mwc-components/src/or-mwc-dialog.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-dialog.ts
@@ -92,7 +92,7 @@ export async function showErrorDialog(errorMessage: string, hostElement?: HTMLEl
await deferred.promise;
}
-export async function showOkCancelDialog(title: string, content: string | TemplateResult) {
+export async function showOkCancelDialog(title: string, content: string | TemplateResult, okText?: string) {
const deferred = new Util.Deferred<boolean>();
@@ -100,16 +100,16 @@ export async function showOkCancelDialog(title: string, content: string | Templa
{
content: typeof(content) === "string" ? html`<p>${content}</p>` : content,
actions: [
- {
- actionName: "ok",
- content: "ok",
- action: () => deferred.resolve(true)
- },
{
actionName: "cancel",
content: "cancel",
default: true,
action: () => deferred.resolve(false)
+ },
+ {
+ actionName: "ok",
+ content: okText ? okText : "ok",
+ action: () => deferred.resolve(true)
}
],
title: title
diff --git a/ui/component/or-mwc-components/src/or-mwc-input.ts b/ui/component/or-mwc-components/src/or-mwc-input.ts
index 9add22cc6..7e9830adc 100644
--- a/ui/component/or-mwc-components/src/or-mwc-input.ts
+++ b/ui/component/or-mwc-components/src/or-mwc-input.ts
@@ -131,6 +131,8 @@ export interface ValueInputProviderOptions {
readonly?: boolean;
disabled?: boolean;
compact?: boolean;
+ comfortable?: boolean;
+ resizeVertical?: boolean;
inputType?: InputType;
}
@@ -376,6 +378,8 @@ export const getValueHolderInputTemplateProvider: ValueInputProviderGenerator =
const supportsLabel = inputTypeSupportsLabel(inputType);
const supportsSendButton = inputTypeSupportsButton(inputType);
const readonly = options.readonly;
+ const comfortable = options.comfortable;
+ const resizeVertical = options.resizeVertical;
const templateFunction: ValueInputTemplateFunction = (value, focused, loading, sending, error, helperText) => {
@@ -384,8 +388,8 @@ export const getValueHolderInputTemplateProvider: ValueInputProviderGenerator =
return html`<or-mwc-input id="input" .type="${inputType}" .label="${label}" .value="${value}" .pattern="${pattern}"
.min="${min}" .max="${max}" .format="${format}" .focused="${focused}" .required="${required}" .multiple="${multiple}"
- .options="${selectOptions}" .readonly="${readonly}" .disabled="${disabled}" .step="${step}"
- .helperText="${helperText}" .helperPersistent="${true}"
+ .options="${selectOptions}" .comfortable="${comfortable}" .readonly="${readonly}" .disabled="${disabled}" .step="${step}"
+ .helperText="${helperText}" .helperPersistent="${true}" .resizeVertical="${resizeVertical}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => {
e.stopPropagation();
e.detail.value = valueConverter ? valueConverter(e.detail.value) : e.detail.value;
@@ -507,11 +511,15 @@ const style = css`
color: var(--mdc-theme-primary);
}
+ .mdc-text-field__input.resize-vertical {
+ resize: vertical;
+ }
+
.mdc-text-field, .mdc-text-field-helper-line {
width: 100%;
}
- .mdc-text-field.dense-comfortable {
+ .mdc-text-field.dense-comfortable, .mdc-select.dense-comfortable {
height: 48px;
}
@@ -703,6 +711,8 @@ export class OrMwcInput extends LitElement {
@property({type: Boolean})
public continuous: boolean = false;
+ @property({type: Boolean})
+ public resizeVertical: boolean = false;
/* TEXT INPUT STYLES END */
@@ -839,6 +849,7 @@ export class OrMwcInput extends LitElement {
"mdc-select--disabled": this.disabled || this.readonly,
"mdc-select--required": this.required,
"mdc-select--dense": false, // this.dense,
+ "dense-comfortable": this.comfortable,
"mdc-select--no-label": !this.label,
"mdc-select--with-leading-icon": !!this.icon
};
@@ -1118,7 +1129,7 @@ export class OrMwcInput extends LitElement {
"mdc-text-field--textarea": type === InputType.TEXTAREA || type === InputType.JSON,
"mdc-text-field--disabled": this.disabled,
"mdc-text-field--fullwidth": this.fullWidth && !outlined,
- "dense-comfortable": this.comfortable,
+ "dense-comfortable": this.comfortable && !(type === InputType.TEXTAREA || type === InputType.JSON),
"dense-compact": !this.comfortable && this.compact,
"mdc-text-field--label-floating": hasValue,
"mdc-text-field--no-label": !this.label,
@@ -1128,7 +1139,7 @@ export class OrMwcInput extends LitElement {
inputElem = type === InputType.TEXTAREA || type === InputType.JSON
? html`
- <textarea id="elem" class="mdc-text-field__input" ?required="${this.required}"
+ <textarea id="elem" class="mdc-text-field__input ${this.resizeVertical ? "resize-vertical" : ""}" ?required="${this.required}"
?readonly="${this.readonly}" ?disabled="${this.disabled}" minlength="${ifDefined(this.minLength)}"
maxlength="${ifDefined(this.maxLength)}" rows="${this.rows ? this.rows : 5}"
cols="${ifDefined(this.cols)}" aria-label="${ifDefined(label)}"
@@ -1151,10 +1162,10 @@ export class OrMwcInput extends LitElement {
inputElem = html`
<label id="${componentId}" class="${classMap(classes)}">
${this.icon ? html`<or-icon class="mdc-text-field__icon mdc-text-field__icon--leading" aria-hidden="true" icon="${this.icon}"></or-icon>` : ``}
- <span class="mdc-text-field__ripple"></span>
+ ${outlined ? `` : html`<span class="mdc-text-field__ripple"></span>`}
${inputElem}
${outlined ? this.renderOutlined(labelTemplate) : labelTemplate}
- <span class="mdc-line-ripple"></span>
+ ${outlined ? `` : html`<span class="mdc-line-ripple"></span>`}
${this.iconTrailing ? html`<or-icon class="mdc-text-field__icon mdc-text-field__icon--trailing" aria-hidden="true" icon="${this.iconTrailing}"></or-icon>` : ``}
</label>
${hasHelper || showValidationMessage ? html`
diff --git a/ui/component/or-rules/src/index.ts b/ui/component/or-rules/src/index.ts
index bd877c73a..eb8afb400 100644
--- a/ui/component/or-rules/src/index.ts
+++ b/ui/component/or-rules/src/index.ts
@@ -598,7 +598,7 @@ export class OrRules extends translate(i18next)(LitElement) {
protected _confirmContinue(action: () => void) {
if (this._viewer.modified) {
- showOkCancelDialog(i18next.t("loseChanges"), i18next.t("confirmContinueRulesetModified"))
+ showOkCancelDialog(i18next.t("loseChanges"), i18next.t("confirmContinueRulesetModified"), i18next.t("discard"))
.then((ok) => {
if (ok) {
action();
diff --git a/ui/component/or-rules/src/or-rule-list.ts b/ui/component/or-rules/src/or-rule-list.ts
index 2fb664a32..db657bf8d 100644
--- a/ui/component/or-rules/src/or-rule-list.ts
+++ b/ui/component/or-rules/src/or-rule-list.ts
@@ -275,7 +275,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {
<or-mwc-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-mwc-input>
${getContentWithMenuTemplate(
- html`<or-mwc-input type="${InputType.BUTTON}" icon="sort-variant"></or-mwc-input>`,
+ html`<or-mwc-input type="${InputType.BUTTON}" icon="sort-variant" ></or-mwc-input>`,
sortOptions.map((sort) => { return { value: sort, text: i18next.t(sort) } as ListItem; }),
this.sortBy,
(v) => this._onSortClicked(v as string))}
@@ -541,7 +541,7 @@ export class OrRuleList extends translate(i18next)(LitElement) {
};
// Confirm deletion request
- showOkCancelDialog(i18next.t("delete"), i18next.t("deleteRulesetsConfirm"))
+ showOkCancelDialog(i18next.t("delete"), i18next.t("deleteRulesetsConfirm"), i18next.t("delete"))
.then((ok) => {
if (ok) {
doDelete();
diff --git a/ui/component/or-rules/src/or-rule-validity.ts b/ui/component/or-rules/src/or-rule-validity.ts
index faedc22f1..cd7321986 100644
--- a/ui/component/or-rules/src/or-rule-validity.ts
+++ b/ui/component/or-rules/src/or-rule-validity.ts
@@ -226,6 +226,30 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {
this._dialog = showDialog({
title: i18next.t("scheduleRuleActivity"),
+ styles: html`
+ <style>
+ .mdc-dialog__surface {
+ overflow-x: visible !important;
+ overflow-y: visible !important;
+ }
+
+ #dialog-content {
+ overflow: visible;
+ }
+
+ @media only screen and (max-width: 1279px) {
+ .mdc-dialog__surface {
+ overflow-x: auto !important;
+ overflow-y: auto !important;
+ }
+
+ #dialog-content {
+ min-height: 230px;
+ overflow: auto;
+ }
+ }
+ </style>`
+ ,
actions: [
{
actionName: "cancel",
@@ -275,7 +299,7 @@ export class OrRuleValidity extends translate(i18next)(LitElement) {
const validity = this._validity;
return html`
- <div style="min-height: 200px; min-width: 635px; display:grid; flex-direction: row;">
+ <div style="min-width: 635px; display:grid; flex-direction: row;">
<div class="layout horizontal">
<or-mwc-input .value="${validityType}" .type="${InputType.SELECT}" .options="${validityTypes}" @or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setValidityType(e.detail.value)}" ></or-mwc-input>
</div>
diff --git a/ui/component/or-table/src/index.ts b/ui/component/or-table/src/index.ts
index 9e8f4b87d..94561bd87 100644
--- a/ui/component/or-table/src/index.ts
+++ b/ui/component/or-table/src/index.ts
@@ -110,7 +110,7 @@ export class OrTable extends LitElement {
</thead>`;
return html`
<div class="mdc-data-table ${classMap({"has-sticky-first-column": !!this.options!.stickyFirstColumn})}">
- <table class="mdc-data-table__table" aria-label="Dessert calories">
+ <table class="mdc-data-table__table">
${headerTemplate}
<tbody class="mdc-data-table__content">
${!this.rows ? `` : this.rows.map(item => html`