@bbki.ng/site 1.1.16 → 1.1.18

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
@@ -1,5 +1,9 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 1.1.18
4
+
5
+ ## 1.1.17
6
+
3
7
  ## 1.1.16
4
8
 
5
9
  ## 1.1.15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,4 +1,3 @@
1
- import React, { useEffect } from "react";
2
1
  import { toast } from "sonner";
3
2
 
4
3
  // @ts-ignore
@@ -22,16 +21,28 @@ export const ReloadPrompt = () => {
22
21
  return null;
23
22
  }
24
23
 
25
- updateServiceWorker(false).then(() => {
26
- // @ts-ignore
27
- const appVer = GLOBAL_BBKING_VERSION;
28
-
29
- toast("", {
30
- description: "已自动更新到 v" + appVer + "。",
31
- position: "bottom-center",
32
- });
33
-
34
- setNeedRefresh(false);
24
+ toast("", {
25
+ description: "发现新版本,是否更新?",
26
+ duration: 10000,
27
+ position: "bottom-center",
28
+ actionButtonStyle: {
29
+ backgroundColor: "#fff",
30
+ color: "rgb(37,99,235)",
31
+ },
32
+ action: {
33
+ label: "是",
34
+ onClick: () => {
35
+ updateServiceWorker(false).then(() => {
36
+ // @ts-ignore
37
+ const appVer = GLOBAL_BBKING_VERSION;
38
+ toast("", {
39
+ description: `已更新到 v${appVer}`,
40
+ position: "bottom-center",
41
+ });
42
+ setNeedRefresh(false);
43
+ });
44
+ },
45
+ },
35
46
  });
36
47
 
37
48
  return null;
@@ -24,7 +24,7 @@ const Posts = (props: TxtProps) => {
24
24
  );
25
25
  }
26
26
 
27
- const links = [...ArticleList, ...titleList];
27
+ const links = [...titleList, ...ArticleList];
28
28
 
29
29
  return <CenterLinkList links={props.articleList || links} title=" " />;
30
30
  };