@ichaingo/header 1.4.43 → 1.4.45
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/dist/lib/User/MainTrigger.js +8 -8
- package/dist/lib/User/Pc.js +4 -4
- package/package.json +15 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { useState as m, useMemo as c, useEffect as s } from "react";
|
|
4
4
|
import p from "@ichaingo/link";
|
|
5
5
|
import l from "@ichaingo/translation";
|
|
@@ -7,25 +7,25 @@ import u from "@ichaingo/better-link";
|
|
|
7
7
|
import { useLocale as f } from "next-intl";
|
|
8
8
|
import g from "@ichaingo/avatar";
|
|
9
9
|
function v({
|
|
10
|
-
userInfo:
|
|
10
|
+
userInfo: r
|
|
11
11
|
}) {
|
|
12
|
-
const { gotoLogin: e } = u(), [i,
|
|
12
|
+
const { gotoLogin: e } = u(), [i, n] = m(""), o = f(), a = c(() => r == null ? void 0 : r.id, [r]);
|
|
13
13
|
return s(() => {
|
|
14
|
-
|
|
14
|
+
n(e({
|
|
15
15
|
locale: o,
|
|
16
16
|
redirect: window.location.href
|
|
17
17
|
}));
|
|
18
|
-
}, [o, e]),
|
|
18
|
+
}, [o, e]), a ? (
|
|
19
19
|
// userInfo?.profileUrl
|
|
20
20
|
// https://images.ichatgo.ai/user-profile/100000201.png
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
) : /* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ t(g, { userInfo: r, className: "w-8 h-8 cursor-pointer" })
|
|
22
|
+
) : /* @__PURE__ */ t(
|
|
23
23
|
p,
|
|
24
24
|
{
|
|
25
25
|
href: i,
|
|
26
26
|
className: "cursor-pointer text-sm text-white bg-primary py-2 px-3 rounded-lg",
|
|
27
27
|
replace: !0,
|
|
28
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ t(l, { value: "signIn", parentKey: "account" })
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
package/dist/lib/User/Pc.js
CHANGED
|
@@ -4,16 +4,16 @@ import d from "@ichaingo/link";
|
|
|
4
4
|
import i from "@ichaingo/translation";
|
|
5
5
|
import m from "./MainTrigger.js";
|
|
6
6
|
import c from "./Logout.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import s from "@ichaingo/avatar";
|
|
8
|
+
import n from "@ichaingo/tooltip";
|
|
9
9
|
function u({
|
|
10
10
|
list: t,
|
|
11
11
|
userInfo: e,
|
|
12
12
|
onClick: o
|
|
13
13
|
}) {
|
|
14
|
-
return /* @__PURE__ */ l(
|
|
14
|
+
return /* @__PURE__ */ l(n, { trigger: /* @__PURE__ */ l(m, { userInfo: e }), arrowClassName: "fill-module", contentClassName: "text-title w-75 p-0 border-transparent outline-none border border-stroke", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-2 p-3 bg-module rounded-md text-sm", children: [
|
|
15
15
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-3 w-full bg-background rounded-lg p-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
16
|
-
/* @__PURE__ */ l(
|
|
16
|
+
/* @__PURE__ */ l(s, { userInfo: e, className: "w-8 h-8" }),
|
|
17
17
|
/* @__PURE__ */ a("div", { className: "flex flex-col overflow-hidden", children: [
|
|
18
18
|
/* @__PURE__ */ l("div", { className: "text-sm font-medium", children: (e == null ? void 0 : e.username) || "--" }),
|
|
19
19
|
/* @__PURE__ */ l("div", { className: "text-xs text-muted-foreground w-full truncate", children: (e == null ? void 0 : e.email) || (e == null ? void 0 : e.walletAddress) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichaingo/header",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"rollup-plugin-preserve-use-client": "^1.0.0",
|
|
30
30
|
"tailwind-merge": "^2.5.5",
|
|
31
31
|
"next": "15.1.6",
|
|
32
|
-
"@ichaingo/auth": "1.4.
|
|
33
|
-
"@ichaingo/
|
|
34
|
-
"@ichaingo/
|
|
35
|
-
"@ichaingo/image": "1.4.
|
|
36
|
-
"@ichaingo/theme-toggle": "1.4.
|
|
37
|
-
"@ichaingo/
|
|
38
|
-
"@ichaingo/
|
|
39
|
-
"@ichaingo/
|
|
40
|
-
"@ichaingo/
|
|
41
|
-
"@ichaingo/
|
|
42
|
-
"@ichaingo/
|
|
43
|
-
"@ichaingo/iconfont": "1.4.
|
|
44
|
-
"@ichaingo/
|
|
45
|
-
"@ichaingo/
|
|
32
|
+
"@ichaingo/auth": "1.4.45",
|
|
33
|
+
"@ichaingo/better-link": "1.4.45",
|
|
34
|
+
"@ichaingo/avatar": "1.4.45",
|
|
35
|
+
"@ichaingo/image": "1.4.45",
|
|
36
|
+
"@ichaingo/theme-toggle": "1.4.45",
|
|
37
|
+
"@ichaingo/link": "1.4.45",
|
|
38
|
+
"@ichaingo/ui": "1.4.45",
|
|
39
|
+
"@ichaingo/translation": "1.4.45",
|
|
40
|
+
"@ichaingo/request": "1.4.45",
|
|
41
|
+
"@ichaingo/i18n": "1.4.45",
|
|
42
|
+
"@ichaingo/with-login": "1.4.45",
|
|
43
|
+
"@ichaingo/iconfont": "1.4.45",
|
|
44
|
+
"@ichaingo/providers": "1.4.45",
|
|
45
|
+
"@ichaingo/tooltip": "1.4.45"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/js-cookie": "^3.0.6"
|