@bbki.ng/site 1.1.13 → 1.1.15
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/package.json
CHANGED
|
@@ -9,10 +9,9 @@ export const Footer = () => {
|
|
|
9
9
|
const isRoot = location.pathname === "/";
|
|
10
10
|
const { isLoading } = useContext(GlobalLoadingContext);
|
|
11
11
|
|
|
12
|
-
if (isRoot
|
|
12
|
+
if (isRoot) {
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
const appVer = GLOBAL_BBKING_VERSION;
|
|
15
|
-
|
|
16
15
|
const tagUrl = `https://github.com/bbbottle/bottle/releases/tag/@bbki.ng/site@${appVer}`;
|
|
17
16
|
return (
|
|
18
17
|
<div className="w-full flex justify-center">
|
|
@@ -23,6 +22,10 @@ export const Footer = () => {
|
|
|
23
22
|
);
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
if (isLoading) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
26
29
|
const paths = usePaths();
|
|
27
30
|
const prevPath = paths[paths.length - 2];
|
|
28
31
|
|
|
@@ -14,33 +14,25 @@ export const ReloadPrompt = () => {
|
|
|
14
14
|
},
|
|
15
15
|
onOfflineReady() {
|
|
16
16
|
console.log("App is offline-ready");
|
|
17
|
-
toast("", {
|
|
18
|
-
description: "已支持离线访问",
|
|
19
|
-
position: "bottom-center",
|
|
20
|
-
});
|
|
21
17
|
},
|
|
22
18
|
});
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
20
|
+
if (!needRefresh) {
|
|
21
|
+
console.log("无需更新");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
updateServiceWorker(false).then(() => {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const appVer = GLOBAL_BBKING_VERSION;
|
|
33
28
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
if (!needRefresh) {
|
|
40
|
-
setNeedRefresh(false);
|
|
41
|
-
}
|
|
29
|
+
toast("", {
|
|
30
|
+
description: "已自动更新到 v" + appVer + "。",
|
|
31
|
+
position: "bottom-center",
|
|
42
32
|
});
|
|
43
|
-
|
|
33
|
+
|
|
34
|
+
setNeedRefresh(false);
|
|
35
|
+
});
|
|
44
36
|
|
|
45
37
|
return null;
|
|
46
38
|
};
|