Skip to content

armgit / core

Public Imported from GitHub
0

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

UI updates: or header selected item highlighting bug fix (fixes #250)

Rich Turner31558be0d8c1
diff --git a/ui/app/or-app/src/index.ts b/ui/app/or-app/src/index.ts
index 040e2162e..ccfcfdf6a 100644
--- a/ui/app/or-app/src/index.ts
+++ b/ui/app/or-app/src/index.ts
@@ -45,7 +45,7 @@ export function headerItemMap<S extends AppStateKeyed, A extends AnyAction>(orAp
export function headerItemAssets<S extends AppStateKeyed, A extends AnyAction>(orApp: OrApp<S>): HeaderItem {
return {
icon: "rhombus-split",
- href: "#!assets",
+ href: "assets",
text: "asset_plural",
};
}
@@ -53,7 +53,7 @@ export function headerItemAssets<S extends AppStateKeyed, A extends AnyAction>(o
export function headerItemRules<S extends AppStateKeyed, A extends AnyAction>(orApp: OrApp<S>): HeaderItem {
return {
icon: "state-machine",
- href: "#!rules",
+ href: "rules",
text: "rule_plural",
hideMobile: true
};
@@ -62,7 +62,7 @@ export function headerItemRules<S extends AppStateKeyed, A extends AnyAction>(or
export function headerItemInsights<S extends AppStateKeyed, A extends AnyAction>(orApp: OrApp<S>): HeaderItem {
return {
icon: "chart-areaspline",
- href: "#!insights",
+ href: "insights",
text: "insights"
};
}
@@ -103,7 +103,7 @@ export function headerItemLogs<S extends AppStateKeyed, A extends AnyAction>(orA
return {
icon: "file-document-box-search-outline",
value: "logs",
- href: "#!logs",
+ href: "logs",
text: "logs",
hideMobile: true
};
@@ -113,7 +113,7 @@ export function headerItemAccount<S extends AppStateKeyed, A extends AnyAction>(
return {
icon: "account",
value: "account",
- href: "#!account",
+ href: "account",
text: "account",
roles: {
account: ["manage-account"]
diff --git a/ui/app/or-app/src/or-header.ts b/ui/app/or-app/src/or-header.ts
index 407a614a8..6c4d94b14 100644
--- a/ui/app/or-app/src/or-header.ts
+++ b/ui/app/or-app/src/or-header.ts
@@ -325,7 +325,7 @@ class OrHeader extends LitElement {
private _drawerOpened = false;
@property({ type: String })
- private activeMenu: string | undefined = window.location.hash ? window.location.hash : "#!map";
+ private activeMenu: string | undefined = window.location.hash ? window.location.hash.split("/")[0].substr(2) : "map";
public connectedCallback(): void {
super.connectedCallback();
@@ -339,7 +339,7 @@ class OrHeader extends LitElement {
public _onHashChanged(e: Event) {
const menu = window.location.hash.split("/")[0];
- this.activeMenu = menu;
+ this.activeMenu = menu.substr(2);
}
public _onRealmSelect(realm: string) {
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index 476e97961..5f74bf53e 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -902,10 +902,6 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
await this.updateComplete;
}
- protected _toggleEdit(edit: boolean) {
-
- }
-
protected async _saveAsset() {
if (!this.asset) {
return;