@bbki.ng/site 5.5.2 → 5.5.3
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.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/src/blog/utils/fingerprints.ts +2 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/site",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.3",
|
|
4
4
|
"description": "code behind bbki.ng",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"react-dom": "^18.0.0",
|
|
15
15
|
"react-router-dom": "6",
|
|
16
16
|
"swr": "^2.2.5",
|
|
17
|
-
"@bbki.ng/ui": "0.2.
|
|
17
|
+
"@bbki.ng/ui": "0.2.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@eslint/compat": "^1.0.0",
|
|
@@ -330,11 +330,12 @@ export async function getStableDeviceId(): Promise<{ id: string; fp: Fingerprint
|
|
|
330
330
|
|
|
331
331
|
// 生成新ID
|
|
332
332
|
const fp = await getFingerprint();
|
|
333
|
+
const id = fp.hash.slice(0, 16);
|
|
333
334
|
|
|
334
335
|
localStorage.setItem(
|
|
335
336
|
STORAGE_KEY,
|
|
336
337
|
JSON.stringify({
|
|
337
|
-
id
|
|
338
|
+
id,
|
|
338
339
|
ts: Date.now(),
|
|
339
340
|
ua: navigator.userAgent.slice(0, 50),
|
|
340
341
|
})
|