@matter-server/dashboard 0.5.15 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/esm/components/dialog-box/dialog-box.d.ts +1 -0
  2. package/dist/esm/components/dialog-box/dialog-box.d.ts.map +1 -1
  3. package/dist/esm/components/dialog-box/dialog-box.js +15 -1
  4. package/dist/esm/components/dialog-box/dialog-box.js.map +1 -1
  5. package/dist/esm/components/dialogs/binding/node-binding-dialog.js +15 -19
  6. package/dist/esm/components/dialogs/binding/node-binding-dialog.js.map +1 -1
  7. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.d.ts.map +1 -1
  8. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.js +2 -1
  9. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-existing.js.map +1 -1
  10. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.d.ts.map +1 -1
  11. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js +13 -5
  12. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-thread.js.map +1 -1
  13. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.d.ts.map +1 -1
  14. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js +13 -9
  15. package/dist/esm/components/dialogs/commission-node-dialog/commission-node-wifi.js.map +1 -1
  16. package/dist/esm/components/dialogs/settings/log-level-dialog.d.ts.map +1 -1
  17. package/dist/esm/components/dialogs/settings/log-level-dialog.js +2 -1
  18. package/dist/esm/components/dialogs/settings/log-level-dialog.js.map +1 -1
  19. package/dist/esm/components/ha-svg-icon.d.ts.map +1 -1
  20. package/dist/esm/components/ha-svg-icon.js +0 -1
  21. package/dist/esm/components/ha-svg-icon.js.map +1 -1
  22. package/dist/esm/entrypoint/main.js +1 -1
  23. package/dist/esm/entrypoint/main.js.map +1 -1
  24. package/dist/esm/pages/cluster-commands/base-cluster-commands.d.ts.map +1 -1
  25. package/dist/esm/pages/cluster-commands/base-cluster-commands.js +72 -68
  26. package/dist/esm/pages/cluster-commands/base-cluster-commands.js.map +1 -1
  27. package/dist/esm/pages/components/header.d.ts +1 -1
  28. package/dist/esm/pages/components/header.d.ts.map +1 -1
  29. package/dist/esm/pages/components/header.js +59 -55
  30. package/dist/esm/pages/components/header.js.map +1 -1
  31. package/dist/esm/pages/components/node-details.js +1 -1
  32. package/dist/esm/pages/components/server-details.d.ts.map +1 -1
  33. package/dist/esm/pages/components/server-details.js +2 -0
  34. package/dist/esm/pages/components/server-details.js.map +1 -1
  35. package/dist/esm/pages/matter-cluster-view.d.ts +2 -1
  36. package/dist/esm/pages/matter-cluster-view.d.ts.map +1 -1
  37. package/dist/esm/pages/matter-cluster-view.js +49 -39
  38. package/dist/esm/pages/matter-cluster-view.js.map +1 -1
  39. package/dist/esm/pages/matter-endpoint-view.d.ts +2 -1
  40. package/dist/esm/pages/matter-endpoint-view.d.ts.map +1 -1
  41. package/dist/esm/pages/matter-endpoint-view.js +44 -35
  42. package/dist/esm/pages/matter-endpoint-view.js.map +1 -1
  43. package/dist/esm/pages/matter-network-view.d.ts +1 -1
  44. package/dist/esm/pages/matter-network-view.d.ts.map +1 -1
  45. package/dist/esm/pages/matter-network-view.js +216 -207
  46. package/dist/esm/pages/matter-network-view.js.map +1 -1
  47. package/dist/esm/pages/matter-node-view.d.ts +2 -1
  48. package/dist/esm/pages/matter-node-view.d.ts.map +1 -1
  49. package/dist/esm/pages/matter-node-view.js +104 -94
  50. package/dist/esm/pages/matter-node-view.js.map +1 -1
  51. package/dist/esm/pages/network/base-network-graph.d.ts.map +1 -1
  52. package/dist/esm/pages/network/base-network-graph.js +12 -5
  53. package/dist/esm/pages/network/base-network-graph.js.map +1 -1
  54. package/dist/esm/pages/network/device-panel.d.ts +1 -0
  55. package/dist/esm/pages/network/device-panel.d.ts.map +1 -1
  56. package/dist/esm/pages/network/device-panel.js +19 -5
  57. package/dist/esm/pages/network/device-panel.js.map +1 -1
  58. package/dist/esm/pages/network/network-details.d.ts +1 -1
  59. package/dist/esm/pages/network/network-details.d.ts.map +1 -1
  60. package/dist/esm/pages/network/network-details.js +275 -272
  61. package/dist/esm/pages/network/network-details.js.map +1 -1
  62. package/dist/esm/pages/network/network-utils.d.ts +5 -0
  63. package/dist/esm/pages/network/network-utils.d.ts.map +1 -1
  64. package/dist/esm/pages/network/network-utils.js +47 -17
  65. package/dist/esm/pages/network/network-utils.js.map +1 -1
  66. package/dist/esm/pages/network/update-connections-dialog.d.ts +1 -1
  67. package/dist/esm/pages/network/update-connections-dialog.d.ts.map +1 -1
  68. package/dist/esm/pages/network/update-connections-dialog.js +51 -47
  69. package/dist/esm/pages/network/update-connections-dialog.js.map +1 -1
  70. package/dist/esm/util/device-icons.d.ts.map +1 -1
  71. package/dist/esm/util/device-icons.js +6 -6
  72. package/dist/esm/util/device-icons.js.map +1 -1
  73. package/dist/esm/util/shared-styles.d.ts +10 -0
  74. package/dist/esm/util/shared-styles.d.ts.map +1 -0
  75. package/dist/esm/util/shared-styles.js +56 -0
  76. package/dist/esm/util/shared-styles.js.map +6 -0
  77. package/dist/web/index.html +53 -1
  78. package/dist/web/js/{commission-node-dialog-ByflSEDK.js → commission-node-dialog-DfwKU9qk.js} +4 -4
  79. package/dist/web/js/{commission-node-existing-CD6-Epwb.js → commission-node-existing-C7ITvNfj.js} +6 -3
  80. package/dist/web/js/{commission-node-thread-CekKshVL.js → commission-node-thread-D-icSzto.js} +23 -7
  81. package/dist/web/js/{commission-node-wifi-D_VKTWwF.js → commission-node-wifi-DwUkXlWz.js} +29 -11
  82. package/dist/web/js/{dialog-box-DdVdxz2_.js → dialog-box-BmpaTrvT.js} +16 -2
  83. package/dist/web/js/{fire_event-uMluKQub.js → fire_event-2ZxL-AHZ.js} +1 -1
  84. package/dist/web/js/{log-level-dialog-BO1OSL0z.js → log-level-dialog-D4hubdib.js} +5 -2
  85. package/dist/web/js/main.js +2 -2
  86. package/dist/web/js/{matter-dashboard-app-b1R3Pout.js → matter-dashboard-app-BtHTmAPq.js} +874 -788
  87. package/dist/web/js/{node-binding-dialog-rikORH9_.js → node-binding-dialog-MMx9rkCF.js} +40 -20
  88. package/package.json +4 -4
  89. package/src/components/dialog-box/dialog-box.ts +16 -1
  90. package/src/components/dialogs/binding/node-binding-dialog.ts +15 -15
  91. package/src/components/dialogs/commission-node-dialog/commission-node-existing.ts +2 -1
  92. package/src/components/dialogs/commission-node-dialog/commission-node-thread.ts +13 -5
  93. package/src/components/dialogs/commission-node-dialog/commission-node-wifi.ts +13 -9
  94. package/src/components/dialogs/settings/log-level-dialog.ts +2 -1
  95. package/src/components/ha-svg-icon.ts +0 -1
  96. package/src/entrypoint/main.ts +1 -1
  97. package/src/pages/cluster-commands/base-cluster-commands.ts +84 -80
  98. package/src/pages/components/header.ts +59 -55
  99. package/src/pages/components/node-details.ts +1 -1
  100. package/src/pages/components/server-details.ts +2 -0
  101. package/src/pages/matter-cluster-view.ts +49 -39
  102. package/src/pages/matter-endpoint-view.ts +49 -40
  103. package/src/pages/matter-network-view.ts +200 -191
  104. package/src/pages/matter-node-view.ts +94 -84
  105. package/src/pages/network/base-network-graph.ts +12 -5
  106. package/src/pages/network/device-panel.ts +20 -5
  107. package/src/pages/network/network-details.ts +236 -231
  108. package/src/pages/network/network-utils.ts +51 -17
  109. package/src/pages/network/update-connections-dialog.ts +51 -47
  110. package/src/util/device-icons.ts +12 -6
  111. package/src/util/shared-styles.ts +58 -0
@@ -7,6 +7,7 @@
7
7
  import { MatterClient, MatterNode } from "@matter-server/ws-client";
8
8
  import { LitElement, css, type CSSResultGroup } from "lit";
9
9
  import { property } from "lit/decorators.js";
10
+ import { reducedMotionStyles } from "../../util/shared-styles.js";
10
11
 
11
12
  /**
12
13
  * Base class for cluster-specific command panels.
@@ -39,84 +40,87 @@ export abstract class BaseClusterCommands extends LitElement {
39
40
  }
40
41
  }
41
42
 
42
- static override styles: CSSResultGroup = css`
43
- :host {
44
- display: block;
45
- }
46
-
47
- details.command-panel {
48
- background-color: var(--md-sys-color-surface-container);
49
- border-radius: 12px;
50
- overflow: hidden;
51
- }
52
-
53
- details.command-panel summary {
54
- padding: 16px;
55
- font-weight: 500;
56
- color: var(--md-sys-color-on-surface);
57
- cursor: pointer;
58
- user-select: none;
59
- display: flex;
60
- align-items: center;
61
- gap: 8px;
62
- }
63
-
64
- details.command-panel summary:hover {
65
- background-color: var(--md-sys-color-surface-container-high);
66
- }
67
-
68
- details.command-panel summary::before {
69
- content: "▶";
70
- font-size: 12px;
71
- transition: transform 0.2s ease;
72
- }
73
-
74
- details.command-panel[open] summary::before {
75
- transform: rotate(90deg);
76
- }
77
-
78
- details.command-panel summary::-webkit-details-marker {
79
- display: none;
80
- }
81
-
82
- .command-content {
83
- padding: 0 16px 16px 16px;
84
- }
85
-
86
- .command-row {
87
- display: flex;
88
- align-items: center;
89
- gap: 12px;
90
- flex-wrap: wrap;
91
- }
92
-
93
- .command-row label {
94
- font-size: 14px;
95
- color: var(--md-sys-color-on-surface-variant);
96
- display: flex;
97
- align-items: center;
98
- gap: 4px;
99
- }
100
-
101
- .command-row input[type="number"] {
102
- width: 70px;
103
- padding: 8px;
104
- border: 1px solid var(--md-sys-color-outline);
105
- border-radius: 4px;
106
- background: var(--md-sys-color-surface);
107
- color: var(--md-sys-color-on-surface);
108
- }
109
-
110
- .command-row input[type="checkbox"] {
111
- width: 16px;
112
- height: 16px;
113
- margin: 0;
114
- }
115
-
116
- md-filled-button,
117
- md-outlined-button {
118
- --md-filled-button-container-height: 36px;
119
- --md-outlined-button-container-height: 36px;
120
- }
121
- `;
43
+ static override styles: CSSResultGroup = [
44
+ reducedMotionStyles,
45
+ css`
46
+ :host {
47
+ display: block;
48
+ }
49
+
50
+ details.command-panel {
51
+ background-color: var(--md-sys-color-surface-container);
52
+ border-radius: 12px;
53
+ overflow: hidden;
54
+ }
55
+
56
+ details.command-panel summary {
57
+ padding: 16px;
58
+ font-weight: 500;
59
+ color: var(--md-sys-color-on-surface);
60
+ cursor: pointer;
61
+ user-select: none;
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 8px;
65
+ }
66
+
67
+ details.command-panel summary:hover {
68
+ background-color: var(--md-sys-color-surface-container-high);
69
+ }
70
+
71
+ details.command-panel summary::before {
72
+ content: "▶";
73
+ font-size: 12px;
74
+ transition: transform 0.2s ease;
75
+ }
76
+
77
+ details.command-panel[open] summary::before {
78
+ transform: rotate(90deg);
79
+ }
80
+
81
+ details.command-panel summary::-webkit-details-marker {
82
+ display: none;
83
+ }
84
+
85
+ .command-content {
86
+ padding: 0 16px 16px 16px;
87
+ }
88
+
89
+ .command-row {
90
+ display: flex;
91
+ align-items: center;
92
+ gap: 12px;
93
+ flex-wrap: wrap;
94
+ }
95
+
96
+ .command-row label {
97
+ font-size: 14px;
98
+ color: var(--md-sys-color-on-surface-variant);
99
+ display: flex;
100
+ align-items: center;
101
+ gap: 4px;
102
+ }
103
+
104
+ .command-row input[type="number"] {
105
+ width: 70px;
106
+ padding: 8px;
107
+ border: 1px solid var(--md-sys-color-outline);
108
+ border-radius: 4px;
109
+ background: var(--md-sys-color-surface);
110
+ color: var(--md-sys-color-on-surface);
111
+ }
112
+
113
+ .command-row input[type="checkbox"] {
114
+ width: 16px;
115
+ height: 16px;
116
+ margin: 0;
117
+ }
118
+
119
+ md-filled-button,
120
+ md-outlined-button {
121
+ --md-filled-button-container-height: 36px;
122
+ --md-outlined-button-container-height: 36px;
123
+ }
124
+ `,
125
+ ];
122
126
  }
@@ -15,6 +15,7 @@ import { LitElement, css, html, nothing } from "lit";
15
15
  import { customElement, property, state } from "lit/decorators.js";
16
16
  import { showLogLevelDialog } from "../../components/dialogs/settings/show-log-level-dialog.js";
17
17
  import "../../components/ha-svg-icon";
18
+ import { reducedMotionStyles } from "../../util/shared-styles.js";
18
19
  import { EffectiveTheme, ThemePreference, ThemeService } from "../../util/theme-service.js";
19
20
 
20
21
  interface HeaderAction {
@@ -174,68 +175,71 @@ export class DashboardHeader extends LitElement {
174
175
  `;
175
176
  }
176
177
 
177
- static override styles = css`
178
- .header {
179
- background-color: var(--md-sys-color-primary);
180
- color: var(--md-sys-color-on-primary);
181
- --icon-primary-color: var(--md-sys-color-on-primary);
182
- font-weight: 400;
183
- display: flex;
184
- align-items: center;
185
- padding-left: 18px;
186
- padding-right: 8px;
187
- min-height: 48px;
188
- }
178
+ static override styles = [
179
+ reducedMotionStyles,
180
+ css`
181
+ .header {
182
+ background-color: var(--md-sys-color-primary);
183
+ color: var(--md-sys-color-on-primary);
184
+ --icon-primary-color: var(--md-sys-color-on-primary);
185
+ font-weight: 400;
186
+ display: flex;
187
+ align-items: center;
188
+ padding-left: 18px;
189
+ padding-right: 8px;
190
+ min-height: 48px;
191
+ }
189
192
 
190
- md-icon-button {
191
- margin-right: 8px;
192
- }
193
+ md-icon-button {
194
+ margin-right: 8px;
195
+ }
193
196
 
194
- .title {
195
- flex: 1;
196
- min-width: 0;
197
- overflow: hidden;
198
- text-overflow: ellipsis;
199
- white-space: nowrap;
200
- }
197
+ .title {
198
+ flex: 1;
199
+ min-width: 0;
200
+ overflow: hidden;
201
+ text-overflow: ellipsis;
202
+ white-space: nowrap;
203
+ }
201
204
 
202
- .actions {
203
- display: flex;
204
- max-width: 100%;
205
- align-items: center;
206
- }
205
+ .actions {
206
+ display: flex;
207
+ max-width: 100%;
208
+ align-items: center;
209
+ }
207
210
 
208
- .nav-tabs {
209
- display: flex;
210
- margin-left: 24px;
211
- gap: 4px;
212
- }
211
+ .nav-tabs {
212
+ display: flex;
213
+ margin-left: 24px;
214
+ gap: 4px;
215
+ }
213
216
 
214
- .nav-tab {
215
- padding: 8px 16px;
216
- color: var(--md-sys-color-on-primary);
217
- text-decoration: none;
218
- font-size: 0.875rem;
219
- font-weight: 500;
220
- border-radius: 4px 4px 0 0;
221
- opacity: 0.7;
222
- transition: opacity 0.2s;
223
- }
217
+ .nav-tab {
218
+ padding: 8px 16px;
219
+ color: var(--md-sys-color-on-primary);
220
+ text-decoration: none;
221
+ font-size: 0.875rem;
222
+ font-weight: 500;
223
+ border-radius: 4px 4px 0 0;
224
+ opacity: 0.7;
225
+ transition: opacity 0.2s;
226
+ }
224
227
 
225
- .nav-tab:hover {
226
- opacity: 0.9;
227
- }
228
+ .nav-tab:hover {
229
+ opacity: 0.9;
230
+ }
228
231
 
229
- .nav-tab.active {
230
- opacity: 1;
231
- background-color: rgba(255, 255, 255, 0.15);
232
- border-bottom: 2px solid var(--md-sys-color-on-primary);
233
- }
232
+ .nav-tab.active {
233
+ opacity: 1;
234
+ background-color: rgba(255, 255, 255, 0.15);
235
+ border-bottom: 2px solid var(--md-sys-color-on-primary);
236
+ }
234
237
 
235
- @media (max-width: 768px) {
236
- .nav-tabs {
237
- display: none;
238
+ @media (max-width: 768px) {
239
+ .nav-tabs {
240
+ display: none;
241
+ }
238
242
  }
239
- }
240
- `;
243
+ `,
244
+ ];
241
245
  }
@@ -166,7 +166,7 @@ export class NodeDetails extends LitElement {
166
166
  title: "Reinterview node",
167
167
  text: "Success!",
168
168
  });
169
- location.reload();
169
+ location.hash = "#";
170
170
  } catch (err: any) {
171
171
  showAlertDialog({
172
172
  title: "Failed to reinterview node",
@@ -102,6 +102,8 @@ export class ServerDetails extends LitElement {
102
102
  title: "Failed to import test node",
103
103
  text: err.message,
104
104
  });
105
+ } finally {
106
+ fileElem.value = "";
105
107
  }
106
108
  };
107
109
  }
@@ -5,11 +5,13 @@
5
5
  */
6
6
 
7
7
  import { provide } from "@lit/context";
8
+ import "@material/web/button/outlined-button";
8
9
  import "@material/web/divider/divider";
9
10
  import "@material/web/iconbutton/icon-button";
10
11
  import "@material/web/list/list";
11
12
  import "@material/web/list/list-item";
12
13
  import { isTestNodeId, MatterClient, MatterNode, toBigIntAwareJson } from "@matter-server/ws-client";
14
+ import { mdiAlertCircleOutline } from "@mdi/js";
13
15
  import { css, html, LitElement } from "lit";
14
16
  import { customElement, property } from "lit/decorators.js";
15
17
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
@@ -19,6 +21,7 @@ import "../components/ha-svg-icon";
19
21
  import "../pages/components/node-details";
20
22
  // Cluster command components (auto-register on import)
21
23
  import { formatHex, formatNodeAddress, getEffectiveFabricIndex } from "../util/format_hex.js";
24
+ import { notFoundStyles } from "../util/shared-styles.js";
22
25
  import { getClusterCommandsTag } from "./cluster-commands/index.js";
23
26
  import { bindingContext } from "./components/context.js";
24
27
 
@@ -74,8 +77,12 @@ class MatterClusterView extends LitElement {
74
77
  override render() {
75
78
  if (!this.node || this.endpoint == undefined || this.cluster == undefined) {
76
79
  return html`
77
- <p>Node, endpoint or cluster not found!</p>
78
- <button @click=${this._goBack}>Back</button>
80
+ <dashboard-header title="Not found" .client=${this.client} backButton="#"></dashboard-header>
81
+ <div class="not-found">
82
+ <ha-svg-icon .path=${mdiAlertCircleOutline}></ha-svg-icon>
83
+ <p>Node, endpoint, or cluster not found</p>
84
+ <md-outlined-button @click=${this._goBack}>Back</md-outlined-button>
85
+ </div>
79
86
  `;
80
87
  }
81
88
 
@@ -127,13 +134,13 @@ class MatterClusterView extends LitElement {
127
134
  </div>
128
135
  <div slot="end">
129
136
  ${toBigIntAwareJson(attribute.value).length > 30
130
- ? html`<button
137
+ ? html`<md-outlined-button
131
138
  @click=${() => {
132
139
  this._showAttributeValue(attribute.value);
133
140
  }}
134
141
  >
135
142
  Show value
136
- </button>`
143
+ </md-outlined-button>`
137
144
  : html`<code>${toBigIntAwareJson(attribute.value)}</code>`}
138
145
  </div>
139
146
  </md-list-item>
@@ -190,45 +197,48 @@ class MatterClusterView extends LitElement {
190
197
  history.back();
191
198
  }
192
199
 
193
- static override styles = css`
194
- :host {
195
- display: block;
196
- background-color: var(--md-sys-color-background);
197
- }
200
+ static override styles = [
201
+ notFoundStyles,
202
+ css`
203
+ :host {
204
+ display: block;
205
+ background-color: var(--md-sys-color-background);
206
+ }
198
207
 
199
- .header {
200
- background-color: var(--md-sys-color-primary);
201
- color: var(--md-sys-color-on-primary);
202
- --icon-primary-color: var(--md-sys-color-on-primary);
203
- font-weight: 400;
204
- display: flex;
205
- align-items: center;
206
- padding-right: 8px;
207
- height: 48px;
208
- }
208
+ .header {
209
+ background-color: var(--md-sys-color-primary);
210
+ color: var(--md-sys-color-on-primary);
211
+ --icon-primary-color: var(--md-sys-color-on-primary);
212
+ font-weight: 400;
213
+ display: flex;
214
+ align-items: center;
215
+ padding-right: 8px;
216
+ height: 48px;
217
+ }
209
218
 
210
- md-icon-button {
211
- margin-right: 8px;
212
- }
219
+ md-icon-button {
220
+ margin-right: 8px;
221
+ }
213
222
 
214
- .flex {
215
- flex: 1;
216
- }
223
+ .flex {
224
+ flex: 1;
225
+ }
217
226
 
218
- .container {
219
- padding: 16px;
220
- max-width: 95%;
221
- margin: 0 auto;
222
- }
227
+ .container {
228
+ padding: 16px;
229
+ max-width: 95%;
230
+ margin: 0 auto;
231
+ }
223
232
 
224
- .status {
225
- color: var(--danger-color);
226
- font-weight: bold;
227
- font-size: 0.8em;
228
- }
233
+ .status {
234
+ color: var(--danger-color);
235
+ font-weight: bold;
236
+ font-size: 0.8em;
237
+ }
229
238
 
230
- md-list-item.alternate-row {
231
- background-color: rgba(128, 128, 128, 0.1);
232
- }
233
- `;
239
+ md-list-item.alternate-row {
240
+ background-color: var(--md-sys-color-surface-container-low);
241
+ }
242
+ `,
243
+ ];
234
244
  }
@@ -4,18 +4,20 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import "@material/web/button/outlined-button";
7
8
  import "@material/web/divider/divider";
8
9
  import "@material/web/iconbutton/icon-button";
9
10
  import "@material/web/list/list";
10
11
  import "@material/web/list/list-item";
11
12
  import { MatterClient, MatterNode, isTestNodeId } from "@matter-server/ws-client";
12
- import { mdiChevronRight } from "@mdi/js";
13
+ import { mdiAlertCircleOutline, mdiChevronRight } from "@mdi/js";
13
14
  import { LitElement, css, html } from "lit";
14
15
  import { customElement, property } from "lit/decorators.js";
15
16
  import { guard } from "lit/directives/guard.js";
16
17
  import { DeviceType, clusters, device_types } from "../client/models/descriptions.js";
17
18
  import "../components/ha-svg-icon";
18
19
  import { formatHex, formatNodeAddress, getEffectiveFabricIndex } from "../util/format_hex.js";
20
+ import { notFoundStyles } from "../util/shared-styles.js";
19
21
 
20
22
  declare global {
21
23
  interface HTMLElementTagNameMap {
@@ -57,8 +59,12 @@ class MatterEndpointView extends LitElement {
57
59
  override render() {
58
60
  if (!this.node || this.endpoint == undefined) {
59
61
  return html`
60
- <p>Node or endpoint not found!</p>
61
- <button @click=${this._goBack}>Back</button>
62
+ <dashboard-header title="Not found" .client=${this.client} backButton="#"></dashboard-header>
63
+ <div class="not-found">
64
+ <ha-svg-icon .path=${mdiAlertCircleOutline}></ha-svg-icon>
65
+ <p>Node or endpoint not found</p>
66
+ <md-outlined-button @click=${this._goBack}>Back</md-outlined-button>
67
+ </div>
62
68
  `;
63
69
  }
64
70
 
@@ -120,41 +126,44 @@ class MatterEndpointView extends LitElement {
120
126
  history.back();
121
127
  }
122
128
 
123
- static override styles = css`
124
- :host {
125
- display: block;
126
- background-color: var(--md-sys-color-background);
127
- }
128
-
129
- .header {
130
- background-color: var(--md-sys-color-primary);
131
- color: var(--md-sys-color-on-primary);
132
- --icon-primary-color: var(--md-sys-color-on-primary);
133
- font-weight: 400;
134
- display: flex;
135
- align-items: center;
136
- padding-right: 8px;
137
- height: 48px;
138
- }
139
-
140
- md-icon-button {
141
- margin-right: 8px;
142
- }
143
-
144
- .flex {
145
- flex: 1;
146
- }
147
-
148
- .container {
149
- padding: 16px;
150
- max-width: 95%;
151
- margin: 0 auto;
152
- }
153
-
154
- .status {
155
- color: var(--danger-color);
156
- font-weight: bold;
157
- font-size: 0.8em;
158
- }
159
- `;
129
+ static override styles = [
130
+ notFoundStyles,
131
+ css`
132
+ :host {
133
+ display: block;
134
+ background-color: var(--md-sys-color-background);
135
+ }
136
+
137
+ .header {
138
+ background-color: var(--md-sys-color-primary);
139
+ color: var(--md-sys-color-on-primary);
140
+ --icon-primary-color: var(--md-sys-color-on-primary);
141
+ font-weight: 400;
142
+ display: flex;
143
+ align-items: center;
144
+ padding-right: 8px;
145
+ height: 48px;
146
+ }
147
+
148
+ md-icon-button {
149
+ margin-right: 8px;
150
+ }
151
+
152
+ .flex {
153
+ flex: 1;
154
+ }
155
+
156
+ .container {
157
+ padding: 16px;
158
+ max-width: 95%;
159
+ margin: 0 auto;
160
+ }
161
+
162
+ .status {
163
+ color: var(--danger-color);
164
+ font-weight: bold;
165
+ font-size: 0.8em;
166
+ }
167
+ `,
168
+ ];
160
169
  }