@bbki.ng/site 1.1.9 → 1.1.11
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
CHANGED
package/dev-dist/sw.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/site",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "code behind bbki.ng",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "git+https://github.com/bbbottle/bbki.ng.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@bbki.ng/components": "workspace:2.1.
|
|
19
|
+
"@bbki.ng/components": "workspace:2.1.38",
|
|
20
20
|
"@supabase/supabase-js": "^1.30.6",
|
|
21
21
|
"classnames": "2.3.1",
|
|
22
22
|
"react": "^18.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext } from "react";
|
|
2
|
-
import { Link } from "@bbki.ng/components";
|
|
2
|
+
import { Link, Tag } from "@bbki.ng/components";
|
|
3
3
|
import { useLocation } from "react-router-dom";
|
|
4
4
|
import { usePaths } from "@/hooks";
|
|
5
5
|
import { GlobalLoadingContext } from "@/global_loading_state_provider";
|
|
@@ -10,7 +10,17 @@ export const Footer = () => {
|
|
|
10
10
|
const { isLoading } = useContext(GlobalLoadingContext);
|
|
11
11
|
|
|
12
12
|
if (isRoot || isLoading) {
|
|
13
|
-
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
const appVer = GLOBAL_BBKING_VERSION;
|
|
15
|
+
|
|
16
|
+
const tagUrl = `https://github.com/bbbottle/bottle/releases/tag/@bbki.ng/site@${appVer}`;
|
|
17
|
+
return (
|
|
18
|
+
<div className="w-full flex justify-center">
|
|
19
|
+
<Tag to={tagUrl} prefix="v" external>
|
|
20
|
+
{appVer}
|
|
21
|
+
</Tag>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
14
24
|
}
|
|
15
25
|
|
|
16
26
|
const paths = usePaths();
|
|
@@ -15,43 +15,30 @@ export const ReloadPrompt = () => {
|
|
|
15
15
|
onOfflineReady() {
|
|
16
16
|
console.log("App is offline-ready");
|
|
17
17
|
toast("", {
|
|
18
|
-
description: "
|
|
18
|
+
description: "已支持离线访问",
|
|
19
19
|
position: "bottom-center",
|
|
20
|
-
actionButtonStyle: {
|
|
21
|
-
backgroundColor: "#fff",
|
|
22
|
-
color: "rgb(37,99,235)",
|
|
23
|
-
},
|
|
24
20
|
});
|
|
25
21
|
},
|
|
26
22
|
});
|
|
27
23
|
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
const appVer = GLOBAL_BBKING_VERSION;
|
|
30
|
-
|
|
31
24
|
useEffect(() => {
|
|
32
25
|
if (!needRefresh) {
|
|
33
|
-
console.log("
|
|
26
|
+
console.log("无需更新");
|
|
34
27
|
return;
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
setNeedRefresh(false);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
updateServiceWorker(true);
|
|
53
|
-
},
|
|
54
|
-
},
|
|
30
|
+
updateServiceWorker(true).then(() => {
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
const appVer = GLOBAL_BBKING_VERSION;
|
|
33
|
+
|
|
34
|
+
toast("", {
|
|
35
|
+
description: "已自动更新到 v" + appVer + "。",
|
|
36
|
+
position: "bottom-center",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
if (!needRefresh) {
|
|
40
|
+
setNeedRefresh(false);
|
|
41
|
+
}
|
|
55
42
|
});
|
|
56
43
|
}, [needRefresh]);
|
|
57
44
|
|
|
@@ -3,7 +3,7 @@ import { useProjects } from "@/hooks/use_projects";
|
|
|
3
3
|
import { CenterLinkList, MySuspense } from "@/components";
|
|
4
4
|
|
|
5
5
|
const Projects = () => {
|
|
6
|
-
const { projects } = useProjects(
|
|
6
|
+
const { projects } = useProjects();
|
|
7
7
|
|
|
8
8
|
const links = projects.map((p: any) => ({
|
|
9
9
|
to: `/projects/${p.name}`,
|