diff --git a/src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor b/src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor index 139cca04eb4..338f3e9364e 100644 --- a/src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor +++ b/src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor @@ -60,7 +60,7 @@
IsAutoReconnect"
+ },
+ "BootstrapBlazor.Server.Components.Samples.NetworkMonitors": {
+ "NetworkMonitorTitle": "NetworkMonitor",
+ "NetworkMonitorDescription": "Use the browser native API navigator.connection to display the current network status in real time",
+ "NormalTitle": "Basic usage",
+ "NormalIntro": "Use the component NetworkMonitorIndicator to display indicator lights of different colors when the network status changes, and display the network status details when the mouse moves over it",
+ "IndicatorLi1": "Green: Very good network (4G)",
+ "IndicatorLi2": "Yellow: Average network (3G)",
+ "IndicatorLi3": "Red: Poor network (2G)",
+ "IndicatorLi4": "Gray: Offline"
}
}
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index bb25e0b8d19..dfdd1d92a79 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -4840,7 +4840,8 @@
"SocketAutoReceive": "自动接收数据",
"SocketManualReceive": "手动接收数据",
"DataPackageAdapter": "数据处理器",
- "SocketAutoConnect": "自动重连"
+ "SocketAutoConnect": "自动重连",
+ "NetworkMonitor": "网络状态 NetworkMonitor"
},
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
"TablesHeaderTitle": "表头分组功能",
@@ -7119,5 +7120,15 @@
"AutoReconnectsDescription": "链路断开后自动重连示例",
"NormalTitle": "基本用法",
"NormalIntro": "通过设置 IsAutoReconnect 开启自动重连机制"
+ },
+ "BootstrapBlazor.Server.Components.Samples.NetworkMonitors": {
+ "NetworkMonitorTitle": "NetworkMonitor 网络状态",
+ "NetworkMonitorDescription": "使用浏览器原生 api navigator.connection 实时显示当前网络状态",
+ "NormalTitle": "基本用法",
+ "NormalIntro": "使用组件 NetworkMonitorIndicator 当网络状态变化时,显示不同颜色的指示灯,鼠标移动到上面时显示网络状态明细",
+ "IndicatorLi1": "绿色:网络非常好 (4G)",
+ "IndicatorLi2": "黄色:网络一般 (3G)",
+ "IndicatorLi3": "红色:网络差 (2G)",
+ "IndicatorLi4": "灰色:离线状态"
}
}
diff --git a/src/BootstrapBlazor.Server/docs.json b/src/BootstrapBlazor.Server/docs.json
index f0824c531be..f2dff539944 100644
--- a/src/BootstrapBlazor.Server/docs.json
+++ b/src/BootstrapBlazor.Server/docs.json
@@ -246,7 +246,8 @@
"socket/manual-receive": "Sockets\\ManualReceives",
"socket/auto-receive": "Sockets\\AutoReceives",
"socket/adapter": "Sockets\\Adapters",
- "socket/auto-connect": "Sockets\\AutoReconnects"
+ "socket/auto-connect": "Sockets\\AutoReconnects",
+ "network-monitor": "NetworkMonitors"
},
"video": {
"table": "BV1ap4y1x7Qn?p=1",
diff --git a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitor.cs b/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitor.cs
deleted file mode 100644
index 5150d24aa88..00000000000
--- a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitor.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the Apache 2.0 License
-// See the LICENSE file in the project root for more information.
-// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
-
-namespace BootstrapBlazor.Components;
-
-///