[Inject] +[NotNull] +private IBrowserFingerService? BrowserFingerService { get; set; } + +private async Task GetFingerCodeAsync() +{ + await BrowserFingerService.GetFingerCodeAsync(); +}+
Height
value",
"CustomComponentTitle": "Custom Components",
"CustomComponentIntro": "Any component can be placed in a dropdown box, and a callback is required for assignment or window closure"
+ },
+ "BootstrapBlazor.Server.Components.Samples.BrowserFingers": {
+ "BrowserFingerTitle": "Browser fingerprint",
+ "BrowserFingerIntro": "Obtain the client browser fingerprint by calling the IBrowserFingerService
service instance method GetFingerCodeAsync
. The fingerprint is consistent in privacy mode",
+ "GetFingerCodeAsync": "Method for obtaining fingerprints"
}
}
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index 9a2a6570bfd..1f84a374729 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -4557,7 +4557,8 @@
"Services": "内置服务",
"AzureTranslator": "翻译服务 AzureTranslator",
"BarcodeGenerator": "条码生成器 BarcodeGenerator",
- "ZipArchive": "压缩归档服务 IZipArchiveService"
+ "ZipArchive": "压缩归档服务 IZipArchiveService",
+ "BrowserFinger": "浏览器指纹 BrowserFingerService"
},
"BootstrapBlazor.Server.Components.Samples.Table.TablesHeader": {
"TablesHeaderTitle": "表头分组功能",
@@ -6183,5 +6184,10 @@
"HeightIntro": "通过设置 Height
值,来改变下拉框高度",
"CustomComponentTitle": "自定义组件",
"CustomComponentIntro": "任意组件均可放入下拉框内,需要有一个回调进行赋值或者关窗即可"
+ },
+ "BootstrapBlazor.Server.Components.Samples.BrowserFingers": {
+ "BrowserFingerTitle": "浏览器指纹",
+ "BrowserFingerIntro": "通过调用 IBrowserFingerService
服务实例方法 GetFingerCodeAsync
获得客户端浏览器指纹,隐私模式下指纹是一致的",
+ "GetFingerCodeAsync": "获得指纹方法"
}
}
diff --git a/src/BootstrapBlazor.Server/docs.json b/src/BootstrapBlazor.Server/docs.json
index 751b7ebd2f3..59b0d852789 100644
--- a/src/BootstrapBlazor.Server/docs.json
+++ b/src/BootstrapBlazor.Server/docs.json
@@ -13,6 +13,7 @@
"block": "Blocks",
"blue-tooth": "Bluetooth",
"breadcrumb": "Breadcrumbs",
+ "browser-fingter": "BrowserFingers",
"button": "Buttons",
"calendar": "Calendars",
"camera": "Cameras",
diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj
index f28c04a03ba..0d830c754ad 100644
--- a/src/BootstrapBlazor/BootstrapBlazor.csproj
+++ b/src/BootstrapBlazor/BootstrapBlazor.csproj
@@ -1,7 +1,7 @@