Skip to content

Commit 6dc4289

Browse files
committed
feat: 增加离线状态指示
1 parent af6bbb2 commit 6dc4289

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
&.bb-nt-indicator-2g {
2121
background-color: var(--bs-danger);
2222
}
23+
24+
&.offline {
25+
background-color: var(--bs-secondary) !important;
26+
}
2327
}
2428

2529
.bb-nt-main {

src/BootstrapBlazor/wwwroot/modules/net.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export function init(id, options) {
1717
const el = document.getElementById(indicator);
1818
if (el) {
1919
el.classList.remove('offline');
20-
el.classList.add('online');
2120
}
2221
});
2322
}
@@ -28,7 +27,6 @@ export function init(id, options) {
2827
indicators.forEach(indicator => {
2928
const el = document.getElementById(indicator);
3029
if (el) {
31-
el.classList.remove('online');
3230
el.classList.add('offline');
3331
}
3432
});

0 commit comments

Comments
 (0)