1339 lines
55 KiB
JavaScript
1339 lines
55 KiB
JavaScript
/*
|
||
* Extracted from browser-delivered Turbopack chunk: 5abe5d57a9f648de.55a495b94b.js
|
||
* Module id: 68058
|
||
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
||
*/
|
||
|
||
const moduleFactory = (e) => {
|
||
"use strict";
|
||
var t,
|
||
a,
|
||
l,
|
||
s,
|
||
r = e.i(462214),
|
||
n = e.i(358379),
|
||
i = e.i(837411),
|
||
o = e.i(549116),
|
||
c = e.i(963527),
|
||
d = e.i(325528);
|
||
e.i(606823);
|
||
var u = e.i(687517),
|
||
x = e.i(841183),
|
||
m = e.i(978547);
|
||
e.i(370357);
|
||
var h = e.i(492394);
|
||
e.i(693602);
|
||
var p = e.i(452678),
|
||
f = e.i(40456),
|
||
v = e.i(691411),
|
||
g = e.i(124859),
|
||
b = e.i(422676),
|
||
w = e.i(844567),
|
||
y = e.i(477714),
|
||
j = e.i(650348),
|
||
N = e.i(313500),
|
||
_ = e.i(407519),
|
||
k = e.i(41671),
|
||
C = e.i(91920),
|
||
S = e.i(646554),
|
||
M = e.i(256422),
|
||
E = e.i(211478),
|
||
T = e.i(904908),
|
||
I = e.i(944733),
|
||
A = e.i(908184);
|
||
e.i(204347);
|
||
var L = e.i(579959),
|
||
D = e.i(92591),
|
||
F = e.i(734911),
|
||
V = e.i(720601),
|
||
z = e.i(608619),
|
||
R = e.i(890889),
|
||
H = e.i(777784),
|
||
W = e.i(268145),
|
||
O = e.i(791997),
|
||
$ = e.i(41114),
|
||
G = e.i(553361),
|
||
P = e.i(255806),
|
||
B = e.i(290456),
|
||
U = e.i(30548),
|
||
K = e.i(323448);
|
||
let Y = ({
|
||
className: e = "",
|
||
isCanvasLight: t,
|
||
handleReadMail: a,
|
||
markAllReadTimestamp: l,
|
||
}) => {
|
||
let { currentLoginUserInfo: s } = (0, h.usePersonalInfo)(),
|
||
{ mailList: i, nextPage: o } = (0, W.useMailList)(1, -1),
|
||
c = s?.uuid
|
||
? `${d.config.siteUrl}/userpage/${s.uuid}/publish/libtv`
|
||
: null,
|
||
[u, x] = (0, n.useState)([]),
|
||
[m, p] = (0, n.useState)(-1),
|
||
f = (0, n.useRef)(null),
|
||
{ refreshMailCountInfo: v } = (0, W.useMailCountInfo)(),
|
||
g = (0, n.useCallback)(() => {
|
||
let e = f.current;
|
||
if (!e) return;
|
||
let { scrollTop: t, scrollHeight: a, clientHeight: l } = e;
|
||
a - t - l <= 20 && o();
|
||
}, [o]);
|
||
return (
|
||
(0, n.useEffect)(() => {
|
||
let e = f.current;
|
||
if (e)
|
||
return (
|
||
e.addEventListener("scroll", g),
|
||
() => {
|
||
e.removeEventListener("scroll", g);
|
||
}
|
||
);
|
||
}, [g]),
|
||
(0, n.useEffect)(() => {
|
||
l &&
|
||
i?.length &&
|
||
x((e) => {
|
||
let t = new Set(e);
|
||
return (
|
||
i.forEach((e) => {
|
||
t.add(e.id);
|
||
}),
|
||
Array.from(t)
|
||
);
|
||
});
|
||
}, [l, i]),
|
||
(0, r.jsx)("div", {
|
||
className: `flex h-full flex-col ${e}`,
|
||
children: (0, r.jsxs)("div", {
|
||
className: "h-full overflow-y-hidden",
|
||
children: [
|
||
" ",
|
||
(0, r.jsx)("div", {
|
||
ref: f,
|
||
className:
|
||
"tiny-scrollbar flex h-full flex-col gap-2 overflow-y-scroll px-4 py-4",
|
||
children:
|
||
i?.length === 0
|
||
? (0, r.jsx)(U.Empty, { isCanvasLight: t })
|
||
: i.map((e, l) =>
|
||
(0, r.jsxs)(
|
||
"div",
|
||
{
|
||
className: (0, $.cn)(
|
||
"flex flex-col gap-2 rounded-lg border p-4",
|
||
t
|
||
? "border-canvas-controls-border bg-canvas-node-bg"
|
||
: "border-[rgba(255,255,255,0.06)] bg-[#2a2a2a]",
|
||
),
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className:
|
||
"flex items-center justify-between",
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className: (0, $.cn)(
|
||
"text-xs font-semibold",
|
||
t
|
||
? "text-canvas-controls-text"
|
||
: "text-white",
|
||
),
|
||
children: e.title,
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: (0, $.cn)(
|
||
"flex cursor-pointer items-center gap-1 text-xs font-normal transition-colors",
|
||
t
|
||
? "text-canvas-controls-text/60 hover:text-canvas-controls-text"
|
||
: "text-[#888888] hover:text-white",
|
||
),
|
||
onClick: () => {
|
||
m === l
|
||
? p(-1)
|
||
: (p(l),
|
||
0 === e.readStatus &&
|
||
(0, D.readAllMail)({
|
||
msgIds: [String(e.id)],
|
||
}).then(() => {
|
||
x((t) => [...t, e.id]),
|
||
v(),
|
||
a();
|
||
}));
|
||
},
|
||
children: [
|
||
"展开",
|
||
(0, r.jsx)(P.default, {
|
||
className: `${m === l ? "rotate-180" : ""}`,
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className:
|
||
"flex items-center justify-between",
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className: (0, $.cn)(
|
||
"text-xs",
|
||
t
|
||
? "text-canvas-controls-text/50"
|
||
: "text-[#666666]",
|
||
),
|
||
children: (0, K.transformTimeString)(
|
||
e.createTime,
|
||
),
|
||
}),
|
||
0 === e.readStatus &&
|
||
!u.includes(e.id) &&
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"h-1 w-1 rounded-full bg-[#F53F3F]",
|
||
}),
|
||
],
|
||
}),
|
||
m === l &&
|
||
((0, K.isHtmlContent)(e.content)
|
||
? (0, r.jsx)("div", {
|
||
className: (0, $.cn)(
|
||
"mail-content text-[13px]",
|
||
t
|
||
? "text-canvas-controls-text/70"
|
||
: "text-white/70",
|
||
),
|
||
dangerouslySetInnerHTML: {
|
||
__html: (0, B.sanitizeHtml)(
|
||
e.content,
|
||
),
|
||
},
|
||
})
|
||
: (0, r.jsxs)(r.Fragment, {
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className: (0, $.cn)(
|
||
"text-[13px]",
|
||
t
|
||
? "text-canvas-controls-text/70"
|
||
: "text-white/70",
|
||
),
|
||
children: e.content,
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: (0, $.cn)(
|
||
"text-[13px]",
|
||
t
|
||
? "text-canvas-controls-text/70"
|
||
: "text-white/70",
|
||
),
|
||
children: [
|
||
"为保障社区良好的创作氛围,请遵守",
|
||
(0, r.jsx)("a", {
|
||
href: "https://www.liblib.art/us/user",
|
||
target: "_blank",
|
||
rel: "noreferrer",
|
||
className:
|
||
"text-[var(--color-primary)] hover:underline",
|
||
children: "《用户协议》",
|
||
}),
|
||
"及",
|
||
(0, r.jsx)("a", {
|
||
href: "https://liblibai.feishu.cn/wiki/FZgqwtcN0iR9dHkKZD6cuGdtnPf",
|
||
target: "_blank",
|
||
rel: "noreferrer",
|
||
className:
|
||
"text-[var(--color-primary)] hover:underline",
|
||
children: "《创作者规范》",
|
||
}),
|
||
",感谢你的理解和支持。",
|
||
],
|
||
}),
|
||
c &&
|
||
(0, r.jsx)("a", {
|
||
href: c,
|
||
target: "_blank",
|
||
rel: "noreferrer",
|
||
className:
|
||
"bg-canvas-primary-btn text-canvas-primary-btn-icon hover:bg-canvas-primary-btn-hover w-max rounded-md px-3 py-1.5 text-[12px] font-medium transition-colors",
|
||
children: "个人中心",
|
||
}),
|
||
],
|
||
})),
|
||
],
|
||
},
|
||
String(e.id),
|
||
),
|
||
),
|
||
}),
|
||
],
|
||
}),
|
||
})
|
||
);
|
||
},
|
||
q = "#1c1c1c",
|
||
J = "rgba(255, 255, 255, 0.08)",
|
||
X = "#ffffff",
|
||
Z = [
|
||
{ type: 0, name: "官方通知", icon: z.default },
|
||
{ type: 1, name: "收到的喜欢", icon: V.default },
|
||
],
|
||
Q = ({ isOpen: e, onClose: t, handleReadMail: a }) => {
|
||
let l = "light" === (0, O.useCanvasThemeStore)((e) => e.theme),
|
||
[s, i] = (0, n.useState)(0),
|
||
[o, c] = (0, n.useState)(0),
|
||
{ mailCountInfo: d, refreshMailCountInfo: u } = (0,
|
||
W.useMailCountInfo)(),
|
||
{ officialMsgCount: x, likeMsgCount: m } = d || {},
|
||
{ changeMailType: h } = (0, W.useMailList)(1, -1),
|
||
p = (0, n.useMemo)(
|
||
() =>
|
||
l
|
||
? {
|
||
title: {
|
||
fontSize: "16px",
|
||
fontWeight: 600,
|
||
color: "var(--canvas-controls-text)",
|
||
},
|
||
header: {
|
||
padding: "15px 24px",
|
||
borderBottom: "1px solid var(--canvas-controls-border)",
|
||
backgroundColor: "var(--canvas-controls-bg)",
|
||
color: "var(--canvas-controls-text)",
|
||
},
|
||
content: {
|
||
borderRadius: "12px",
|
||
overflow: "hidden",
|
||
height: "609px",
|
||
backgroundColor: "var(--canvas-controls-bg)",
|
||
border: "0.5px solid var(--canvas-controls-border)",
|
||
boxShadow: "var(--canvas-shadow-dropdown)",
|
||
color: "var(--canvas-controls-text)",
|
||
},
|
||
body: {
|
||
height: "calc(100% - 60px)",
|
||
padding: 0,
|
||
color: "var(--canvas-controls-text)",
|
||
},
|
||
overlay: {
|
||
backgroundColor: "rgba(0, 0, 0, 0.75)",
|
||
backdropFilter: "blur(4px)",
|
||
},
|
||
}
|
||
: {
|
||
title: { fontSize: "16px", fontWeight: 600, color: X },
|
||
header: {
|
||
padding: "15px 24px",
|
||
borderBottom: `1px solid ${J}`,
|
||
backgroundColor: q,
|
||
color: X,
|
||
},
|
||
content: {
|
||
borderRadius: "12px",
|
||
overflow: "hidden",
|
||
height: "609px",
|
||
backgroundColor: q,
|
||
border: `1px solid ${J}`,
|
||
boxShadow: "0 4px 24px rgba(0, 0, 0, 0.45)",
|
||
color: X,
|
||
},
|
||
body: { height: "calc(100% - 60px)", padding: 0, color: X },
|
||
overlay: {
|
||
backgroundColor: "rgba(0, 0, 0, 0.75)",
|
||
backdropFilter: "blur(4px)",
|
||
},
|
||
},
|
||
[l],
|
||
);
|
||
return (0, r.jsx)(F.Modal, {
|
||
centered: !0,
|
||
title: "通知",
|
||
opened: e,
|
||
onClose: t,
|
||
trapFocus: !1,
|
||
size: 800,
|
||
classNames: {
|
||
content: (0, $.cn)(l && "canvas-light"),
|
||
close: (0, $.cn)(
|
||
"m-0",
|
||
l
|
||
? "text-canvas-controls-text/70 hover:bg-canvas-controls-hover hover:text-canvas-controls-text"
|
||
: "text-white/60 hover:bg-white/10 hover:text-white",
|
||
),
|
||
},
|
||
styles: p,
|
||
children: (0, r.jsxs)("div", {
|
||
className: "flex h-full",
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: (0, $.cn)(
|
||
"flex w-[200px] flex-col justify-between p-4 text-sm",
|
||
l ? "text-canvas-controls-text" : "text-white",
|
||
),
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className: "flex flex-col gap-4",
|
||
children: Z.map((e) => {
|
||
let t = e.icon,
|
||
a = 0 === e.type ? x : m;
|
||
return (0, r.jsxs)(
|
||
"div",
|
||
{
|
||
className: (0, $.cn)(
|
||
"flex w-full items-center justify-between rounded-lg transition-colors",
|
||
l
|
||
? s === e.type && "bg-canvas-controls-active"
|
||
: s === e.type && "bg-[#333333]",
|
||
),
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: (0, $.cn)(
|
||
"flex w-full cursor-pointer items-center gap-2 px-4 py-2",
|
||
l ? "text-canvas-controls-text" : "text-white",
|
||
),
|
||
onClick: () => {
|
||
i(e.type), 0 === e.type ? h(1, -1) : h(4);
|
||
},
|
||
children: [
|
||
(0, r.jsx)(t, {
|
||
className: (0, $.cn)(
|
||
l
|
||
? s === e.type
|
||
? "text-canvas-controls-text"
|
||
: "text-canvas-controls-text/40"
|
||
: s === e.type
|
||
? "text-white"
|
||
: "text-[#999999]",
|
||
),
|
||
}),
|
||
e.name,
|
||
],
|
||
}),
|
||
a > 0
|
||
? (0, r.jsx)("div", {
|
||
className:
|
||
"mr-4 flex h-3 items-end justify-center rounded-full bg-[#F53F3F] px-1 text-[8px] font-medium text-white",
|
||
children: a > 100 ? "99+" : a,
|
||
})
|
||
: null,
|
||
],
|
||
},
|
||
e.type,
|
||
);
|
||
}),
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: (0, $.cn)(
|
||
"flex cursor-pointer items-center gap-2 text-xs transition-colors",
|
||
l
|
||
? "text-canvas-controls-text/60 hover:text-canvas-controls-text"
|
||
: "text-[#888888] hover:text-[#bbbbbb]",
|
||
),
|
||
onClick: () => {
|
||
0 === x && 0 === m
|
||
? H.Notify.warn("暂无未读消息")
|
||
: (0, D.readAllMail)({ firstType: 0 }).then(() => {
|
||
H.Notify.success("已读成功"),
|
||
c(Date.now()),
|
||
u(),
|
||
a();
|
||
});
|
||
},
|
||
children: [(0, r.jsx)(R.default, {}), "一键已读"],
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className: (0, $.cn)(
|
||
"h-full flex-1 overflow-y-hidden",
|
||
l && "bg-canvas-bg",
|
||
),
|
||
style: l ? void 0 : { backgroundColor: "#141414" },
|
||
children:
|
||
0 === s
|
||
? (0, r.jsx)(Y, {
|
||
isCanvasLight: l,
|
||
markAllReadTimestamp: o,
|
||
handleReadMail: () => {
|
||
a(), u();
|
||
},
|
||
})
|
||
: (0, r.jsx)(G.default, {
|
||
isCanvasLight: l,
|
||
markAllReadTimestamp: o,
|
||
handleReadMail: () => {
|
||
a(), u();
|
||
},
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
});
|
||
};
|
||
var ee = e.i(185264),
|
||
et = e.i(373518);
|
||
function ea() {
|
||
let { isLogin: e } = (0, u.useLoginHook)(),
|
||
[t, a] = (0, n.useState)(!1),
|
||
[l, s] = (0, n.useState)(100),
|
||
i = (0, n.useRef)(null),
|
||
{ syncVipInfo: o } = (0, ee.useUserVipInfo)(),
|
||
c = (0, n.useCallback)(async () => {
|
||
try {
|
||
localStorage.getItem("libtv_free_power_claimed");
|
||
let e = await (0, et.claimLibtvFreePower)();
|
||
e?.code === 0 &&
|
||
e?.data?.freePower > 0 &&
|
||
(s(e.data.freePower),
|
||
a(!0),
|
||
(i.current = setTimeout(() => {
|
||
a(!1), o();
|
||
}, 1e4)));
|
||
} catch (e) {
|
||
console.error("claimLibtvFreePower failed:", e);
|
||
}
|
||
}, []);
|
||
return ((0, n.useEffect)(
|
||
() => (
|
||
e && c(),
|
||
() => {
|
||
i.current && clearTimeout(i.current);
|
||
}
|
||
),
|
||
[e, c],
|
||
),
|
||
t)
|
||
? (0, r.jsx)("div", {
|
||
className:
|
||
"animate-fade-in z-(--z-dropdown) absolute right-0 top-full mt-3",
|
||
children: (0, r.jsxs)("div", {
|
||
className:
|
||
"relative flex w-[344px] flex-col overflow-hidden rounded-2xl bg-white p-1 shadow-2xl dark:bg-[#1a1a1a]",
|
||
children: [
|
||
(0, r.jsx)("button", {
|
||
className:
|
||
"absolute right-3 top-3 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-black/10 text-black/60 backdrop-blur transition-colors hover:bg-black/20 hover:text-black dark:bg-black/65 dark:text-white/80 dark:hover:bg-white/30 dark:hover:text-white",
|
||
onClick: () => a(!1),
|
||
children: "✕",
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: "flex flex-col p-5",
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: "flex items-center gap-2",
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className: "text-fg-default text-xl font-bold",
|
||
children: "欢迎体验LibTV",
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className:
|
||
"rounded-lg bg-[#FFC65D] px-2 py-0.5 text-sm font-semibold text-black",
|
||
children: ["赠", l, "专属积分"],
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: "text-fg-muted mt-4 text-sm leading-relaxed",
|
||
children: [
|
||
"已为您发放LibTV专属积分,仅限LibTV使用,",
|
||
(0, r.jsx)("br", {}),
|
||
"快来试试LibTV的创作能力吧!",
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
})
|
||
: null;
|
||
}
|
||
var el = e.i(930686);
|
||
e.i(135623);
|
||
var es = e.i(168823),
|
||
er = e.i(295085);
|
||
function en() {
|
||
return (en = Object.assign.bind()).apply(null, arguments);
|
||
}
|
||
let ei = function (e) {
|
||
return n.createElement(
|
||
"svg",
|
||
en(
|
||
{
|
||
xmlns: "http://www.w3.org/2000/svg",
|
||
width: 18,
|
||
height: 18,
|
||
fill: "none",
|
||
viewBox: "0 0 18 18",
|
||
},
|
||
e,
|
||
),
|
||
t ||
|
||
(t = n.createElement(
|
||
"g",
|
||
{ clipPath: "url(#dark_svg__a)" },
|
||
n.createElement("path", {
|
||
fill: "#F7F7F7",
|
||
fillRule: "evenodd",
|
||
d: "M9 .75a8.25 8.25 0 1 1 0 16.5A8.25 8.25 0 0 1 9 .75M9 2.1a6.9 6.9 0 0 0 0 13.8z",
|
||
clipRule: "evenodd",
|
||
}),
|
||
)),
|
||
a ||
|
||
(a = n.createElement(
|
||
"defs",
|
||
null,
|
||
n.createElement(
|
||
"clipPath",
|
||
{ id: "dark_svg__a" },
|
||
n.createElement("path", { fill: "#fff", d: "M0 0h18v18H0z" }),
|
||
),
|
||
)),
|
||
);
|
||
};
|
||
function eo() {
|
||
return (eo = Object.assign.bind()).apply(null, arguments);
|
||
}
|
||
let ec = function (e) {
|
||
return n.createElement(
|
||
"svg",
|
||
eo(
|
||
{
|
||
xmlns: "http://www.w3.org/2000/svg",
|
||
width: 18,
|
||
height: 18,
|
||
fill: "none",
|
||
viewBox: "0 0 18 18",
|
||
},
|
||
e,
|
||
),
|
||
l ||
|
||
(l = n.createElement(
|
||
"g",
|
||
{ clipPath: "url(#light_svg__a)" },
|
||
n.createElement("path", {
|
||
fill: "#262626",
|
||
fillRule: "evenodd",
|
||
d: "M9 .75a8.25 8.25 0 1 1 0 16.5A8.25 8.25 0 0 1 9 .75M9 2.1a6.9 6.9 0 0 0 0 13.8z",
|
||
clipRule: "evenodd",
|
||
}),
|
||
)),
|
||
s ||
|
||
(s = n.createElement(
|
||
"defs",
|
||
null,
|
||
n.createElement(
|
||
"clipPath",
|
||
{ id: "light_svg__a" },
|
||
n.createElement("path", { fill: "#fff", d: "M0 0h18v18H0z" }),
|
||
),
|
||
)),
|
||
);
|
||
};
|
||
var ed = e.i(383924),
|
||
eu = e.i(185990);
|
||
let ex = (e) => e > 0 && e < 1e11,
|
||
em = (e) => {
|
||
let t = String(e.id ?? e.keyId ?? e.accessKeyId ?? "");
|
||
return {
|
||
id: t,
|
||
accessKey: String(e.accessKey ?? e.key ?? ""),
|
||
createdAt: ((e) => {
|
||
if ("number" == typeof e) return ex(e) ? 1e3 * e : e;
|
||
if ("string" == typeof e) {
|
||
let t = e.trim();
|
||
if (!t) return "";
|
||
let a = Number(t);
|
||
return Number.isNaN(a) ? t : ex(a) ? 1e3 * a : a;
|
||
}
|
||
return "";
|
||
})(e.createdAt ?? e.createTime ?? e.createdTime),
|
||
};
|
||
};
|
||
async function eh() {
|
||
let e = await ed.apiClient.post(eu.default.libtvAccountKey);
|
||
if (e?.code !== 0) throw Error(e?.msg || "创建 Access key 失败");
|
||
return { accessKey: e?.data?.accessKey };
|
||
}
|
||
async function ep() {
|
||
let e = await ed.apiClient.get(eu.default.libtvAccountKeyList);
|
||
if (e?.code !== 0) throw Error(e?.msg || "获取 Access key 列表失败");
|
||
return {
|
||
maxCount: void 0,
|
||
items: (Array.isArray(e?.data) ? e.data : [])
|
||
.map(em)
|
||
.filter((e) => e.id || e.accessKey),
|
||
};
|
||
}
|
||
async function ef(e) {
|
||
let t = `${eu.default.libtvAccountKeyDelete}/${e}`,
|
||
a = await ed.apiClient.post(t);
|
||
if (a?.code !== 0) throw Error(a?.msg || "删除 Access key 失败");
|
||
}
|
||
var ev = e.i(33725);
|
||
let eg = "b640:grid-cols-[240px_1fr] grid-cols-[176px_1fr]";
|
||
function eb({
|
||
renderTrigger: e = !0,
|
||
renderModal: t = !0,
|
||
opened: a,
|
||
onOpenChange: l,
|
||
onTriggerClick: s,
|
||
}) {
|
||
let i = (0, O.useCanvasThemeStore)((e) => e.theme),
|
||
[o, c] = (0, n.useState)(!1),
|
||
[d, u] = (0, n.useState)(!1),
|
||
[x, m] = (0, n.useState)(!1),
|
||
[h, p] = (0, n.useState)(""),
|
||
[f, v] = (0, n.useState)([]),
|
||
[g, b] = (0, n.useState)(5),
|
||
w = (0, n.useRef)(0),
|
||
y = (0, n.useRef)(null),
|
||
[j, N] = (0, n.useState)(void 0),
|
||
_ = "boolean" == typeof a,
|
||
C = _ ? !!a : o,
|
||
S = (0, n.useCallback)(
|
||
(e) => {
|
||
_ || c(e), l?.(e);
|
||
},
|
||
[_, l],
|
||
),
|
||
M = (0, n.useCallback)(async () => {
|
||
let e = w.current + 1;
|
||
(w.current = e), u(!0);
|
||
try {
|
||
let t = await ep();
|
||
if (w.current !== e) return;
|
||
v(t.items || []), b(t.maxCount ?? 5);
|
||
} catch (e) {
|
||
console.error("listLibTvAccessKeys error", e),
|
||
H.Notify.error("获取 Access key 列表失败,请稍后重试");
|
||
} finally {
|
||
w.current === e && u(!1);
|
||
}
|
||
}, []);
|
||
(0, n.useEffect)(() => {
|
||
C && t && M();
|
||
}, [M, C, t]);
|
||
let E = (0, n.useCallback)(() => {
|
||
s ? s() : S(!0);
|
||
}, [s, S]),
|
||
T = (0, n.useCallback)(async () => {
|
||
if (!(f.length >= g)) {
|
||
m(!0);
|
||
try {
|
||
await eh(), H.Notify.success("创建 Access key 成功"), await M();
|
||
} catch (e) {
|
||
console.error("createLibTvAccessKey error", e),
|
||
H.Notify.error("创建 Access key 失败,请稍后重试");
|
||
} finally {
|
||
m(!1);
|
||
}
|
||
}
|
||
}, [f.length, M, g]),
|
||
A = (0, n.useCallback)(async (e) => {
|
||
if (!e) return void H.Notify.warn("当前暂无可复制的 Access key");
|
||
try {
|
||
await navigator.clipboard.writeText(e),
|
||
H.Notify.success("Access key 复制成功");
|
||
} catch (e) {
|
||
console.error("copy access key error", e),
|
||
H.Notify.error("复制失败,请手动复制");
|
||
}
|
||
}, []),
|
||
L = (0, n.useCallback)(
|
||
(e) => {
|
||
(0, I.confirm)({
|
||
title: "删除 Access key",
|
||
message: "删除后将无法继续使用该 key,是否确认删除?",
|
||
confirmText: "确认",
|
||
cancelText: "取消",
|
||
onConfirm: async () => {
|
||
p(e.id);
|
||
try {
|
||
await ef(e.id),
|
||
H.Notify.success("删除 Access key 成功"),
|
||
await M();
|
||
} catch (e) {
|
||
console.error("deleteLibTvAccessKey error", e),
|
||
H.Notify.error("删除 Access key 失败,请稍后重试");
|
||
} finally {
|
||
p("");
|
||
}
|
||
},
|
||
});
|
||
},
|
||
[M],
|
||
),
|
||
D = (0, n.useMemo)(
|
||
() =>
|
||
f.map((e) => {
|
||
var t;
|
||
return {
|
||
...e,
|
||
createdAtLabel: ((e) => {
|
||
let t = new Date(e);
|
||
if (Number.isNaN(t.getTime())) return "--";
|
||
let a = t.getFullYear(),
|
||
l = String(t.getMonth() + 1).padStart(2, "0"),
|
||
s = String(t.getDate()).padStart(2, "0"),
|
||
r = String(t.getHours()).padStart(2, "0"),
|
||
n = String(t.getMinutes()).padStart(2, "0");
|
||
return `${a}-${l}-${s} ${r}:${n}`;
|
||
})(e.createdAt),
|
||
maskedAccessKey: (t = e.accessKey)
|
||
? t.length <= 8
|
||
? t.length <= 2
|
||
? "*".repeat(t.length)
|
||
: `${t.slice(0, 1)}${"*".repeat(Math.max(1, t.length - 2))}${t.slice(-1)}`
|
||
: `${t.slice(0, 4)}${"*".repeat(20)}${t.slice(-4)}`
|
||
: "--",
|
||
};
|
||
}),
|
||
[f],
|
||
);
|
||
(0, n.useLayoutEffect)(() => {
|
||
let e = y.current;
|
||
e && N(e.scrollHeight);
|
||
}, [D, d]);
|
||
let V = f.length >= g,
|
||
z = (0, r.jsx)("button", {
|
||
type: "button",
|
||
className:
|
||
"bg-canvas-primary-btn text-canvas-primary-btn-icon hover:bg-canvas-primary-btn-hover inline-flex h-7 items-center justify-center rounded-lg px-3 text-[13px] font-medium leading-none transition-colors active:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
|
||
onClick: () => {
|
||
T();
|
||
},
|
||
disabled: V || x || d,
|
||
children: x ? "创建中..." : "创建新Access key",
|
||
});
|
||
return (0, r.jsxs)(r.Fragment, {
|
||
children: [
|
||
e
|
||
? (0, r.jsxs)("button", {
|
||
type: "button",
|
||
className:
|
||
"ml-1 inline-flex items-center gap-1 border-l border-solid border-[#C4C4C4] bg-transparent py-0 pl-2 text-left text-[12px] font-normal leading-none text-neutral-700 transition-opacity hover:opacity-80 dark:border-neutral-700 dark:text-[#A8A8A8]",
|
||
onClick: () => {
|
||
E();
|
||
},
|
||
children: [
|
||
(0, r.jsx)("span", { children: "Access key" }),
|
||
(0, r.jsx)(k.Icons.Right, {
|
||
width: 8,
|
||
height: 8,
|
||
color: "currentColor",
|
||
className: "shrink-0 translate-y-px",
|
||
"aria-hidden": !0,
|
||
}),
|
||
],
|
||
})
|
||
: null,
|
||
t
|
||
? (0, r.jsxs)(F.Modal, {
|
||
opened: C,
|
||
onClose: () => S(!1),
|
||
title: "我的Access key",
|
||
centered: !0,
|
||
size: 600,
|
||
radius: 12,
|
||
withCloseButton: !0,
|
||
overlayProps: { opacity: 0.55, blur: 4 },
|
||
closeOnClickOutside: !1,
|
||
closeOnEscape: !1,
|
||
styles: { content: { color: "var(--canvas-controls-text)" } },
|
||
classNames: {
|
||
content: (0, $.cn)(
|
||
"border-canvas-controls-border border bg-[var(--canvas-controls-bg)] shadow-[var(--canvas-shadow-dropdown)]",
|
||
"light" === i && "canvas-light",
|
||
),
|
||
header: "min-h-0 bg-transparent px-4 pb-0 pt-4",
|
||
title:
|
||
"text-canvas-controls-text text-[14px] font-semibold leading-5",
|
||
close:
|
||
"text-canvas-controls-text/70 hover:bg-canvas-controls-hover hover:text-canvas-controls-text m-0",
|
||
body: "px-4 pb-4 pt-4",
|
||
},
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: "flex flex-col gap-1",
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text text-[12px] leading-[19px]",
|
||
children:
|
||
"· Access key 仅用于 LibTV skills 的调用授权使用,一旦传播给他人,有账号泄露的风险,请谨慎保管!",
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text text-[12px] leading-[19px]",
|
||
children:
|
||
"· LibTVskills :是Libtv提供给agent使用的入口,可在openclaw中调用,完成专业视频创作。",
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className:
|
||
"text-canvas-controls-text flex gap-1 text-[12px] leading-[19px]",
|
||
children: [
|
||
"· 安装使用请戳 →",
|
||
" ",
|
||
(0, r.jsx)("button", {
|
||
onClick: () => {
|
||
window.open(
|
||
"https://liblibai.feishu.cn/wiki/OwYKwl4xoiywU5kklrrcAyVDn7d",
|
||
"_blank",
|
||
);
|
||
},
|
||
className:
|
||
"cursor-pointer text-[12px] leading-[19px] text-blue-500 underline hover:text-blue-400",
|
||
children: "LibTV Skills",
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className: "mt-4 flex justify-end",
|
||
children: V
|
||
? (0, r.jsx)(ev.CanvasTooltip, {
|
||
label: `最多创建 ${g} 个 key`,
|
||
withArrow: !0,
|
||
position: "top",
|
||
children: (0, r.jsx)("span", {
|
||
className: "inline-flex",
|
||
children: z,
|
||
}),
|
||
})
|
||
: z,
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"border-canvas-controls-border mt-4 overflow-x-auto rounded-lg border",
|
||
children: (0, r.jsxs)("div", {
|
||
className: "min-w-[540px]",
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: `bg-canvas-controls-active grid ${eg}`,
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text px-4 py-3 text-[13px] font-normal leading-[18px]",
|
||
children: "创建日期",
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text px-4 py-3 text-[13px] font-normal leading-[18px]",
|
||
children: "Access key",
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
style: {
|
||
height: null != j ? j : void 0,
|
||
transition: "height 0.25s ease-in-out",
|
||
overflow: "hidden",
|
||
},
|
||
children: (0, r.jsx)("div", {
|
||
ref: y,
|
||
children: d
|
||
? (0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text/60 px-4 py-6 text-[12px]",
|
||
children: "加载中...",
|
||
})
|
||
: 0 === D.length
|
||
? (0, r.jsx)("div", {
|
||
className:
|
||
"text-canvas-controls-text/60 px-4 py-6 text-[12px]",
|
||
children: "暂无 Access key",
|
||
})
|
||
: D.map((e) =>
|
||
(0, r.jsxs)(
|
||
"div",
|
||
{
|
||
className: `text-canvas-controls-text border-canvas-controls-border hover:bg-canvas-controls-hover group grid border-t text-[12px] leading-[17px] transition-colors ${eg}`,
|
||
children: [
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"whitespace-nowrap px-4 py-3",
|
||
children: e.createdAtLabel,
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className: "px-4 py-3",
|
||
children: (0, r.jsxs)("div", {
|
||
className:
|
||
"flex items-center justify-between gap-3",
|
||
children: [
|
||
(0, r.jsxs)("button", {
|
||
type: "button",
|
||
className:
|
||
"text-canvas-controls-text flex min-w-0 items-center gap-2 text-left",
|
||
onClick: () => {
|
||
A(e.accessKey);
|
||
},
|
||
children: [
|
||
(0, r.jsx)("span", {
|
||
className: "truncate",
|
||
children:
|
||
e.maskedAccessKey,
|
||
}),
|
||
(0, r.jsx)("span", {
|
||
className:
|
||
"text-canvas-controls-text/60 hover:text-canvas-controls-text opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100",
|
||
children: (0, r.jsx)(
|
||
k.Icons.Copy,
|
||
{
|
||
width: 14,
|
||
height: 14,
|
||
color: "currentColor",
|
||
},
|
||
),
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsx)("button", {
|
||
type: "button",
|
||
className:
|
||
"text-canvas-controls-text/70 hover:text-canvas-controls-text disabled:cursor-not-allowed disabled:opacity-50",
|
||
onClick: () => L(e),
|
||
disabled: h === e.id,
|
||
children:
|
||
h === e.id
|
||
? "删除中..."
|
||
: "删除",
|
||
}),
|
||
],
|
||
}),
|
||
}),
|
||
],
|
||
},
|
||
e.id,
|
||
),
|
||
),
|
||
}),
|
||
}),
|
||
],
|
||
}),
|
||
}),
|
||
],
|
||
})
|
||
: null,
|
||
],
|
||
});
|
||
}
|
||
function ew() {
|
||
let { t: e } = (0, v.useI18n)(),
|
||
[t, a] = (0, n.useState)(!1),
|
||
{ isLogin: l } = (0, u.useLoginHook)(),
|
||
{ currentLoginUserInfo: s } = (0, h.usePersonalInfo)(),
|
||
{ isTeamUser: j, isTeamMember: N } = (0,
|
||
x.useUserIdentificationHooks)(),
|
||
{ vipBtnText: k } = (0, m.useVipBtnText)(),
|
||
D = () => {
|
||
j
|
||
? (0, o.openTeamPaywall)({ paywall: "group" })
|
||
: (0, c.openVipModel)({
|
||
intent: "purchase_vip",
|
||
paywall: "personal",
|
||
});
|
||
},
|
||
{ openLogin: F } = (0, E.useLogin)(),
|
||
V = (0, n.useCallback)(() => {
|
||
(0, c.openVipModel)({
|
||
intent: "purchase_vip",
|
||
isShowChargePop: !0,
|
||
chargeType: 2,
|
||
});
|
||
}, []),
|
||
z = () => {
|
||
(0, f.getSSOClient)({
|
||
siteId: d.config.tv.domain,
|
||
bridgeUrl: d.config.tv.bridgeUrl,
|
||
}).notifyLogout(),
|
||
setTimeout(() => {
|
||
let e = localStorage.getItem("cid");
|
||
localStorage.clear(),
|
||
(0, es.deleteCookie)("usertoken"),
|
||
(0, es.deleteCookie)(d.config.platformTokenCookieKey),
|
||
e && localStorage.setItem("cid", e),
|
||
window.location.reload();
|
||
}, 500);
|
||
},
|
||
[R, H] = (0, n.useState)(!1),
|
||
[O, $] = (0, n.useState)(!1),
|
||
[G, P] = (0, n.useState)(!1),
|
||
{ mailCountInfo: B, refreshMailCountInfo: U } = (0,
|
||
W.useMailCountInfo)(),
|
||
{ officialMsgCount: K, likeMsgCount: Y } = B || {};
|
||
(0, n.useEffect)(() => {
|
||
new URL(window.location.href).searchParams.get("purchasePop");
|
||
}, []),
|
||
(0, n.useEffect)(() => {
|
||
a(!0);
|
||
}, []),
|
||
(0, n.useEffect)(() => {
|
||
s?.avatar &&
|
||
(0, er.imagePrefetch)(
|
||
(0, p.compressByFormatAndResizeWidth)(s.avatar, 100),
|
||
{ timeout: 1e4 },
|
||
).catch((e) => {
|
||
console.error(e), H(!0);
|
||
});
|
||
}, [s?.avatar]);
|
||
let q = (0, n.useCallback)(() => {
|
||
U();
|
||
}, [U]),
|
||
J = (0, n.useCallback)(() => {
|
||
(0, L.openWatermarkSettingModal)();
|
||
}, []),
|
||
[X, Z] = (0, n.useState)(!1),
|
||
ee = (0, n.useCallback)(() => {
|
||
Z(!0);
|
||
}, []),
|
||
et = (0, n.useCallback)(() => {
|
||
Z(!1);
|
||
}, []),
|
||
[en, ei] = (0, n.useState)(!1),
|
||
eo = (0, n.useCallback)(() => ei(!0), []),
|
||
ec = (0, n.useCallback)(() => ei(!1), []);
|
||
(0, n.useMemo)(
|
||
() => (0, r.jsx)(M.default, { visible: en, onInviteClick: ee }),
|
||
[ee, en],
|
||
);
|
||
let ed = (0, r.jsx)(i.AccountCenter, {
|
||
editInfoHandlers: { open: () => {} },
|
||
enterpriseInfo: null,
|
||
modalHandlers: { open: () => {}, close: () => {} },
|
||
onLogout: () => {
|
||
(0, I.confirm)({ message: e("logoutConfirm"), onConfirm: z });
|
||
},
|
||
showOtherLogo: !1,
|
||
extraIdActions: (0, r.jsx)(eb, {
|
||
renderModal: !1,
|
||
onTriggerClick: () => {
|
||
P(!0);
|
||
},
|
||
}),
|
||
extraMenuItems: (0, r.jsx)(eN, { onOpenWatermarkSetting: J }),
|
||
});
|
||
return t
|
||
? (0, r.jsxs)("div", {
|
||
className: "relative",
|
||
children: [
|
||
(0, r.jsx)(b.Group, {
|
||
gap: 8,
|
||
className: "b640:gap-2 gap-2 text-[12px]",
|
||
children: l
|
||
? (0, r.jsxs)(r.Fragment, {
|
||
children: [
|
||
(0, r.jsxs)(g.Box, {
|
||
visibleFrom: "md",
|
||
className:
|
||
"bg-panel-background border-(--topnav-btn-border) border-hair hover:bg-(--topnav-btn-hover-bg) relative flex size-10 cursor-pointer items-center justify-center rounded-xl",
|
||
onClick: () => {
|
||
$(!0);
|
||
},
|
||
children: [
|
||
K > 0 || Y > 0
|
||
? (0, r.jsx)("div", {
|
||
className:
|
||
"absolute right-px top-px h-[5px] w-[5px] rounded-full bg-[#F53F3F]",
|
||
})
|
||
: null,
|
||
(0, r.jsx)(y.default, {}),
|
||
],
|
||
}),
|
||
(0, r.jsx)(e_, { onClick: V }),
|
||
(0, r.jsxs)(g.Box, {
|
||
visibleFrom: "md",
|
||
className:
|
||
"bg-panel-background border-(--topnav-btn-border) border-hair flex h-10 items-center gap-2 rounded-xl px-3 py-[6px]",
|
||
children: [
|
||
(0, r.jsx)(C.default, {
|
||
type: "small",
|
||
className: "-top-5",
|
||
children: (0, r.jsxs)("div", {
|
||
className:
|
||
"relative flex cursor-pointer items-center gap-1 before:absolute before:-inset-x-2 before:-inset-y-1 before:rounded-lg before:content-[''] hover:before:bg-black/5 dark:hover:before:bg-white/10",
|
||
onClick: D,
|
||
children: [(0, r.jsx)(_.default, {}), k],
|
||
}),
|
||
}),
|
||
(0, r.jsx)(A.default, {
|
||
disabled: N,
|
||
onClick: () => {
|
||
N ||
|
||
(0, c.openVipModel)({
|
||
intent: "purchase_vip",
|
||
isShowChargePop: !0,
|
||
chargeType: 1,
|
||
});
|
||
},
|
||
}),
|
||
(0, r.jsxs)(w.HoverCard, {
|
||
position: "bottom",
|
||
radius: 16,
|
||
shadow: "md",
|
||
width: 428,
|
||
offset: {
|
||
mainAxis: 10,
|
||
crossAxis: -20,
|
||
alignmentAxis: 12,
|
||
},
|
||
onOpen: eo,
|
||
onClose: ec,
|
||
children: [
|
||
(0, r.jsx)(w.HoverCard.Target, {
|
||
children: (0, r.jsx)("img", {
|
||
src: (0, p.compressByFormatAndResizeWidth)(
|
||
R || !s?.avatar
|
||
? el.DEFAULT_AVATAR
|
||
: s.avatar,
|
||
100,
|
||
),
|
||
alt: "avatar",
|
||
className:
|
||
"size-7 cursor-pointer rounded-full object-cover",
|
||
onError: () => H(!0),
|
||
}),
|
||
}),
|
||
(0, r.jsx)(w.HoverCard.Dropdown, {
|
||
p: 0,
|
||
className:
|
||
"rounded-2xl border-none bg-transparent",
|
||
children: ed,
|
||
}),
|
||
],
|
||
}),
|
||
],
|
||
}),
|
||
(0, r.jsx)(Q, {
|
||
isOpen: O,
|
||
onClose: () => {
|
||
$(!1);
|
||
},
|
||
handleReadMail: q,
|
||
}),
|
||
(0, r.jsx)(eb, {
|
||
renderTrigger: !1,
|
||
opened: G,
|
||
onOpenChange: P,
|
||
}),
|
||
(0, r.jsx)(S.default, { opened: X, onClose: et }),
|
||
],
|
||
})
|
||
: (0, r.jsxs)("div", {
|
||
className: "flex items-center gap-2",
|
||
children: [
|
||
(0, r.jsx)(e_, { onClick: V }),
|
||
(0, r.jsx)(g.Box, {
|
||
visibleFrom: "md",
|
||
className:
|
||
"bg-panel-background border-(--topnav-btn-border) border-hair flex h-10 items-center gap-3 rounded-xl px-3 py-[6px]",
|
||
children: (0, r.jsx)(C.default, {
|
||
type: "small",
|
||
className: "-top-5",
|
||
children: (0, r.jsxs)("div", {
|
||
className:
|
||
"relative flex cursor-pointer items-center gap-1 before:absolute before:-inset-x-2 before:-inset-y-1 before:rounded-lg before:content-[''] hover:before:bg-black/5 dark:hover:before:bg-white/10",
|
||
onClick: D,
|
||
children: [(0, r.jsx)(_.default, {}), k],
|
||
}),
|
||
}),
|
||
}),
|
||
(0, r.jsx)("div", {
|
||
className:
|
||
"flex h-[40px] cursor-pointer items-center justify-center rounded-xl bg-neutral-900 px-3 text-xs font-normal text-white dark:bg-neutral-50 dark:text-neutral-900 dark:shadow-[0_2px_6px_0_rgba(0,0,0,0.08)]",
|
||
onClick: () => {
|
||
F({ closeOnClickOutside: !1 });
|
||
},
|
||
children: e("singUp"),
|
||
}),
|
||
],
|
||
}),
|
||
}),
|
||
l && (0, r.jsx)(ea, {}),
|
||
!l && (0, r.jsx)(T.default, {}),
|
||
],
|
||
})
|
||
: null;
|
||
}
|
||
e.s(["default", () => eb], 68058);
|
||
let ey =
|
||
"text-(--color-text-img-info) hover:bg-(--bg-topbar-hover) flex min-h-[40px] cursor-pointer items-center gap-[10px] rounded-lg px-2 text-sm font-medium";
|
||
function ej() {
|
||
let e = (0, O.useCanvasThemeStore)((e) => e.theme),
|
||
t = (0, O.useCanvasThemeStore)((e) => e.toggleTheme),
|
||
a = "light" === e;
|
||
return (0, r.jsxs)("button", {
|
||
type: "button",
|
||
className:
|
||
"relative flex h-7 w-[54px] shrink-0 items-center rounded-full bg-black/5 p-0.5 dark:bg-white/10",
|
||
onClick: (e) => {
|
||
e.stopPropagation(), t(!1);
|
||
},
|
||
children: [
|
||
(0, r.jsx)("span", {
|
||
className:
|
||
"absolute top-0.5 h-6 w-6 rounded-full bg-white shadow-sm transition-transform duration-200 dark:bg-neutral-700",
|
||
style: { transform: a ? "translateX(0)" : "translateX(26px)" },
|
||
}),
|
||
(0, r.jsx)("span", {
|
||
className:
|
||
"relative z-10 flex h-6 w-6 items-center justify-center [&_path]:fill-current",
|
||
style: { color: a ? "#262626" : "#737373" },
|
||
children: (0, r.jsx)(N.default, { width: 14, height: 14 }),
|
||
}),
|
||
(0, r.jsx)("span", {
|
||
className:
|
||
"relative z-10 flex h-6 w-6 items-center justify-center [&_path]:fill-current",
|
||
style: { color: a ? "#a3a3a3" : "#ffffff" },
|
||
children: (0, r.jsx)(j.default, { width: 14, height: 14 }),
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
function eN({ onOpenWatermarkSetting: e }) {
|
||
let t = (0, O.useCanvasThemeStore)((e) => e.theme);
|
||
return (0, r.jsxs)(r.Fragment, {
|
||
children: [
|
||
(0, r.jsxs)("div", {
|
||
className: ey,
|
||
children: [
|
||
(0, r.jsx)("span", {
|
||
className: "flex size-5 shrink-0 items-center justify-start",
|
||
children:
|
||
"dark" === t
|
||
? (0, r.jsx)(ei, { width: 16, height: 16 })
|
||
: (0, r.jsx)(ec, { width: 16, height: 16 }),
|
||
}),
|
||
(0, r.jsx)("span", { className: "flex-1", children: "模式切换" }),
|
||
(0, r.jsx)(ej, {}),
|
||
],
|
||
}),
|
||
(0, r.jsxs)("div", {
|
||
className: ey,
|
||
onClick: e,
|
||
children: [
|
||
(0, r.jsx)("span", {
|
||
className: "flex size-5 shrink-0 items-center justify-start",
|
||
children: (0, r.jsx)(k.Icons.Stamp, { width: 16, height: 14 }),
|
||
}),
|
||
"AI 水印设置",
|
||
],
|
||
}),
|
||
],
|
||
});
|
||
}
|
||
function e_({ onClick: e }) {
|
||
return (0, r.jsxs)("button", {
|
||
type: "button",
|
||
className:
|
||
"bg-panel-background border-(--topnav-btn-border) border-hair hover:bg-(--topnav-btn-hover-bg) flex h-10 items-center gap-1 rounded-xl px-3 py-[6px] text-[13px] text-[#05A3C5] dark:text-[#05DFF6]",
|
||
onClick: e,
|
||
children: [
|
||
(0, r.jsx)(k.Icons.MemberStore, { width: 16, height: 16 }),
|
||
(0, r.jsx)("span", { children: "会员超市" }),
|
||
],
|
||
});
|
||
}
|
||
e.s(["default", () => ew], 458390);
|
||
};
|
||
|
||
export default moduleFactory;
|