@bbki.ng/site 2.0.7 → 2.0.8

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,7 @@
1
1
  # @bbki.ng/site
2
2
 
3
+ ## 2.0.8
4
+
3
5
  ## 2.0.7
4
6
 
5
7
  ## 2.0.6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/site",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "code behind bbki.ng",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,29 +18,29 @@ export const LoginMenuItem = () => {
18
18
 
19
19
  if (sess?.user != null) {
20
20
  return (
21
- <ContextMenuItem
22
- inset
23
- onClick={() => {
24
- confirm("确定退出登录吗?", () => {
25
- supabase.auth.signOut().then(() => {
26
- toast.success("已退出登录", {
27
- position: "bottom-right",
28
- });
21
+ <ContextMenuItem
22
+ inset
23
+ onClick={() => {
24
+ confirm("确定退出登录吗?", () => {
25
+ supabase.auth.signOut().then(() => {
26
+ toast.success("已退出登录", {
27
+ position: "bottom-right",
29
28
  });
30
- })
31
- }}
32
- >
33
- {sess?.user?.user_metadata && (
34
- <img
35
- src={sess?.user?.user_metadata.avatar_url}
36
- alt="avatar"
37
- style={{ width: 16, height: 16 }}
38
- className="rounded-full absolute left-2.5"
39
- crossOrigin="anonymous"
40
- />
41
- )}
42
- {sess?.user?.email ?? ""}
43
- </ContextMenuItem>
29
+ });
30
+ });
31
+ }}
32
+ >
33
+ {sess?.user?.user_metadata && (
34
+ <img
35
+ src={sess?.user?.user_metadata.avatar_url}
36
+ alt="avatar"
37
+ style={{ width: 16, height: 16 }}
38
+ className="rounded-full mr-8"
39
+ crossOrigin="anonymous"
40
+ />
41
+ )}
42
+ {sess?.user?.email ?? ""}
43
+ </ContextMenuItem>
44
44
  );
45
45
  }
46
46
 
@@ -49,10 +49,25 @@ export const LoginMenuItem = () => {
49
49
  onClick={() => {
50
50
  nav("/login");
51
51
  }}
52
- inset
53
52
  >
53
+ <svg
54
+ xmlns="http://www.w3.org/2000/svg"
55
+ width="16"
56
+ height="16"
57
+ viewBox="0 0 24 24"
58
+ fill="none"
59
+ stroke="currentColor"
60
+ strokeWidth="2"
61
+ strokeLinecap="round"
62
+ strokeLinejoin="round"
63
+ className="feather feather-log-in mr-8"
64
+ >
65
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
66
+ <polyline points="10 17 15 12 10 7"></polyline>
67
+ <line x1="15" y1="12" x2="3" y2="12"></line>
68
+ </svg>
54
69
  login
55
- <ContextMenuShortcut>l</ContextMenuShortcut>
70
+ <ContextMenuShortcut className="mr-1">l</ContextMenuShortcut>
56
71
  </ContextMenuItem>
57
72
  );
58
73
  };
@@ -13,18 +13,22 @@ export const ViewSourceMenuItem = () => {
13
13
  }}
14
14
  >
15
15
  <svg
16
- height="16"
17
- aria-hidden="true"
18
- viewBox="0 0 16 16"
19
- version="1.1"
16
+ xmlns="http://www.w3.org/2000/svg"
20
17
  width="16"
21
- data-view-component="true"
22
- className="mr-8"
18
+ height="16"
19
+ viewBox="0 0 24 24"
20
+ fill="none"
21
+ stroke="currentColor"
22
+ strokeWidth="2"
23
+ strokeLinecap="round"
24
+ strokeLinejoin="round"
25
+ className="feather feather-code mr-8"
23
26
  >
24
- <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
27
+ <polyline points="16 18 22 12 16 6"></polyline>
28
+ <polyline points="8 6 2 12 8 18"></polyline>
25
29
  </svg>
26
30
  v{appVer}
27
- <ContextMenuShortcut>s</ContextMenuShortcut>
31
+ <ContextMenuShortcut className="mr-1">s</ContextMenuShortcut>
28
32
  </ContextMenuItem>
29
33
  );
30
34
  };
@@ -19,15 +19,15 @@ export const AppCtxMenu = (props: { children: ReactElement }) => {
19
19
 
20
20
  const showEntry = () => {
21
21
  setShowPluginEntry(true);
22
- }
22
+ };
23
23
 
24
24
  useEffect(() => {
25
25
  PluginManager.addEventListener(PluginEvent.INIT, showEntry);
26
26
 
27
27
  return () => {
28
28
  PluginManager.removeEventListener(PluginEvent.INIT, showEntry);
29
- }
30
- }, [])
29
+ };
30
+ }, []);
31
31
 
32
32
  return (
33
33
  <ContextMenu>
@@ -35,12 +35,7 @@ export const AppCtxMenu = (props: { children: ReactElement }) => {
35
35
  <ContextMenuContent className="w-256">
36
36
  <LoginMenuItem />
37
37
  <ViewSourceMenuItem />
38
- {showPluginEntry && (
39
- <>
40
- <ContextMenuSeparator />
41
- <PluginsMenuItem />
42
- </>
43
- )}
38
+ {showPluginEntry && <PluginsMenuItem />}
44
39
  </ContextMenuContent>
45
40
  </ContextMenu>
46
41
  );
@@ -18,7 +18,7 @@ export const PluginsMenuItem = () => {
18
18
  }, []);
19
19
  return (
20
20
  <ContextMenuSub>
21
- <ContextMenuSubTrigger inset>
21
+ <ContextMenuSubTrigger>
22
22
  <svg
23
23
  xmlns="http://www.w3.org/2000/svg"
24
24
  width="16"
@@ -28,14 +28,20 @@ export const PluginsMenuItem = () => {
28
28
  stroke="currentColor"
29
29
  strokeWidth="2"
30
30
  strokeLinecap="round"
31
- strokeLinejoin="round"
32
- className="lucide lucide-plug rotate-90 absolute left-2.5"
33
- >
34
- <path d="M12 22v-5"></path>
35
- <path d="M9 8V2"></path>
36
- <path d="M15 8V2"></path>
37
- <path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"></path>
38
- </svg>
31
+ stroke-linejoin="round"
32
+ className="feather feather-cpu mr-8"
33
+ >
34
+ <rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect>
35
+ <rect x="9" y="9" width="6" height="6"></rect>
36
+ <line x1="9" y1="1" x2="9" y2="4"></line>
37
+ <line x1="15" y1="1" x2="15" y2="4"></line>
38
+ <line x1="9" y1="20" x2="9" y2="23"></line>
39
+ <line x1="15" y1="20" x2="15" y2="23"></line>
40
+ <line x1="20" y1="9" x2="23" y2="9"></line>
41
+ <line x1="20" y1="14" x2="23" y2="14"></line>
42
+ <line x1="1" y1="9" x2="4" y2="9"></line>
43
+ <line x1="1" y1="14" x2="4" y2="14"></line>
44
+ </svg>
39
45
  Plugins
40
46
  </ContextMenuSubTrigger>
41
47
  <ContextMenuSubContent className="w-48">