dsh-fish-soul 0.19.24 → 0.19.26
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/README.md +3 -1
- package/lib/bili-playback.js +5 -2
- package/lib/client.behavior.js +32 -16
- package/lib/client.diag.js +17 -6
- package/lib/client.douyin.js +38 -32
- package/lib/client.js +112 -90
- package/lib/client.models.js +337 -56
- package/lib/client.persona.js +69 -42
- package/lib/client.scheduled-tasks.js +12 -13
- package/lib/client.soul.js +212 -73
- package/lib/config-schema.js +5 -0
- package/lib/data-dir.js +190 -0
- package/lib/db.js +29 -2
- package/lib/douyin-http.js +2 -2
- package/lib/index.js +3 -3
- package/lib/panel.css +290 -32
- package/lib/routes-soul.js +20 -0
- package/lib/storage.js +3 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
让一个 QQ 小号背后有"同一个人":固定人格、按人记记忆、有自己的生活节奏、会主动开口;同一个"她"同时出现在 QQ、B站、抖音。
|
|
4
4
|
|
|
5
|
-
DSH 插件(单角色 `feiyu`)。版本 **0.19.
|
|
5
|
+
DSH 插件(单角色 `feiyu`)。版本 **0.19.26**。
|
|
6
6
|
|
|
7
7
|
QQ 交流群:**1125962189**
|
|
8
8
|
|
|
@@ -51,6 +51,8 @@ dsh plugin --profile desktop add dsh-fish-soul
|
|
|
51
51
|
|
|
52
52
|
`$DSH_HOME` 缺省 `~/.dsh`。
|
|
53
53
|
|
|
54
|
+
**数据目录可以搬到别处**:设置页「记忆存档 → 数据目录」填一个完整路径(例如 `D:\fish-soul-data`),保存后**重启插件**生效。记忆库、人格卡、备份、存档、两个浏览器 profile 和各类缓存全部跟着走(配置键 `dataDir`;`fish-soul-config.json` 本身留在 `$DSH_HOME`,不改)。改名/搬家只在下次启动时做:先复制到 `<目标>.incoming` 并逐文件核对字节数,通过后才切换;旧目录改名为 `<原名>.moved-<时间戳>` 留档,确认没问题后自行删除。任何一步失败都会继续用旧目录,不会空库启动 —— 浏览器 profile 动辄几百 MB,搬家时保证目标盘有足够空间,也别让两个进程同时写它。
|
|
55
|
+
|
|
54
56
|
### 可选:语音文件(#101)
|
|
55
57
|
|
|
56
58
|
「模型 → 语音」里两项独立开关均默认关闭。保存 QQ 语音时,只处理原本会回复、已识别说话人的好友私聊和明确白名单群;不处理未获允许、暂停或无需回复的消息。优先保存消息提供的原始音频,无法取得原件时退回 `get_record` 转出的音频;文件名标 `original` 或 `converted`,扩展名按音频头判断,无法识别时为 `.bin`。原件为 SILK 或未知格式时,会尝试同时保存配对的转码分析文件(`analysis`),供音频插件使用。`voice-in` 最多保存 30 条,可以在设置里清空;文件未加密,清理不包含备份和复制件。为限制资源,单条消息最多处理前 30 段语音,STT 仍只转写前 2 段。
|
package/lib/bili-playback.js
CHANGED
|
@@ -22,7 +22,7 @@ import { spawn } from 'node:child_process';
|
|
|
22
22
|
import { mkdirSync, readFileSync, rmSync } from 'node:fs';
|
|
23
23
|
import { join } from 'node:path';
|
|
24
24
|
import { detectBrowsers, pickBrowser } from './browsers.js';
|
|
25
|
-
import { dshHome } from './db.js';
|
|
25
|
+
import { dshHome, fishSoulDir } from './db.js';
|
|
26
26
|
|
|
27
27
|
const CDP_READY_TIMEOUT_MS = 15_000;
|
|
28
28
|
const VIDEO_READY_TIMEOUT_MS = 25_000;
|
|
@@ -175,6 +175,7 @@ export class BiliPlayback {
|
|
|
175
175
|
// 起进程这一步可替换,测试才能验「ensureBrowser 真的用了 playbackBrowserArgs」
|
|
176
176
|
// 而不只是验那个函数返回了什么(本项目栽过好几次「函数对、没接线」)。
|
|
177
177
|
this.spawn = spawnImpl;
|
|
178
|
+
this.homeOverride = homedirOverride;
|
|
178
179
|
this.home = homedirOverride !== '' ? homedirOverride : dshHome();
|
|
179
180
|
this.browserPath = '';
|
|
180
181
|
this.launching = null;
|
|
@@ -205,7 +206,9 @@ export class BiliPlayback {
|
|
|
205
206
|
userDataDir() {
|
|
206
207
|
const configured = String(this.cfg().userDataDir ?? '').trim();
|
|
207
208
|
if (configured !== '') return configured;
|
|
208
|
-
|
|
209
|
+
// `this.home` 是测试注入的假 DSH_HOME;没注入时跟着数据目录走(可能被改到别的盘)
|
|
210
|
+
if (this.homeOverride !== '') return join(this.home, 'fish-soul', 'bili-playback');
|
|
211
|
+
return join(fishSoulDir(), 'bili-playback');
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
/** 找浏览器(配置指定的优先,否则按 detectBrowsers 的顺序挑第一个)。 */
|
package/lib/client.behavior.js
CHANGED
|
@@ -148,23 +148,39 @@ window.__ModuleLoader__.load({
|
|
|
148
148
|
if (r?.ok) { notify("写好了"); load(); } else notify(r?.error ?? "没写成");
|
|
149
149
|
}
|
|
150
150
|
const topics = d.topics?.items ?? [];
|
|
151
|
+
const entries = d.entries ?? [];
|
|
151
152
|
const now = Date.now();
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
:
|
|
166
|
-
h("
|
|
167
|
-
|
|
153
|
+
const splitEntry = (text) => {
|
|
154
|
+
const raw = String(text ?? "");
|
|
155
|
+
const m = /^(\d{4}-\d{2}-\d{2}) 的日记:([\s\S]*)$/.exec(raw);
|
|
156
|
+
return m ? { date: m[1], body: m[2] } : { date: null, body: raw };
|
|
157
|
+
};
|
|
158
|
+
return h(react.Fragment, null,
|
|
159
|
+
Group({ title: "每晚记录", aside: Button({ disabled: busy, onClick: writeNow }, busy ? "在写…" : "现在写一篇") },
|
|
160
|
+
Row({ title: "每晚写日记", desc: "记成她自己的私密记忆(群里不会想起),顺便想想明天想跟谁聊什么" },
|
|
161
|
+
h(Switch, { label: "每晚写日记", checked: c.enabled, onChange: (v) => save({ diary: { enabled: v } }) })),
|
|
162
|
+
c.enabled ? Row({ title: "几点写" }, h(NumField, { ui, value: c.hour, min: 18, max: 23, step: 1, label: "几点写", onSave: (n) => save({ diary: { hour: n } }) }), Muted("点以后")) : null,
|
|
163
|
+
Row({ title: "发到 QQ 空间", desc: "默认关;SnowLuma 不支持的话会在动态里记一条失败" },
|
|
164
|
+
h(Switch, { label: "发到 QQ 空间", checked: c.qzone, onChange: (v) => save({ diary: { qzone: v } }) }))),
|
|
165
|
+
topics.length === 0 ? null : Group({ title: "明天想聊的话题", aside: Tag(String(topics.length), "outline") },
|
|
166
|
+
h("div", { className: "fs-list" }, topics.map((x) => h("div", { className: "fs-read-item", key: `${x.who ?? ""}:${x.topic}` },
|
|
167
|
+
h("div", { className: "fs-read-head" },
|
|
168
|
+
Tag("想聊", "info"),
|
|
169
|
+
h("span", { className: "fs-read-text" }, `${x.who ? `${x.who}:` : ""}${x.topic}`),
|
|
170
|
+
h("span", { className: "fs-read-actions" }, IconButton("close", "删除", async () => {
|
|
171
|
+
const r = await api("POST", "/diary/topic-remove", { who: x.who ?? "", topic: x.topic });
|
|
172
|
+
if (r?.ok) { notify("删掉了"); load(); } else notify(r?.error ?? "删除失败");
|
|
173
|
+
}))))))),
|
|
174
|
+
Group({ title: "日记本", aside: entries.length ? Tag(String(entries.length), "outline") : null },
|
|
175
|
+
entries.length === 0 ? Empty("还没写过日记")
|
|
176
|
+
: entries.map((e) => {
|
|
177
|
+
const parsed = splitEntry(e.content);
|
|
178
|
+
return h("div", { className: "fs-diary-card", key: e.id },
|
|
179
|
+
h("div", { className: "fs-diary-head" },
|
|
180
|
+
h("span", { className: "fs-diary-date" }, parsed.date ?? "随笔"),
|
|
181
|
+
h("span", { className: "fs-diary-time" }, relTime(e.at, now))),
|
|
182
|
+
h("div", { className: "fs-diary-body" }, parsed.body));
|
|
183
|
+
})));
|
|
168
184
|
}
|
|
169
185
|
|
|
170
186
|
function BehaviorPane({ api, notify, relTime, ui, section = "habits" }) {
|
package/lib/client.diag.js
CHANGED
|
@@ -43,6 +43,7 @@ window.__ModuleLoader__.load({
|
|
|
43
43
|
function DiagPane({ api, notify, ui }) {
|
|
44
44
|
const { h, Group, Tag, Button, useConfirm = () => [async () => true, null] } = ui;
|
|
45
45
|
const [raw, setRaw] = react.useState(false);
|
|
46
|
+
const [level, setLevel] = react.useState("all");
|
|
46
47
|
const [data, load, err] = usePoll(api, "/diag-log", 15000);
|
|
47
48
|
const [confirm, confirmNode] = useConfirm();
|
|
48
49
|
if (!data) {
|
|
@@ -51,6 +52,9 @@ window.__ModuleLoader__.load({
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
const entries = data.entries ?? [];
|
|
55
|
+
const warnCount = entries.filter((e) => e.level === "warn").length;
|
|
56
|
+
const errCount = entries.filter((e) => e.level === "error").length;
|
|
57
|
+
const shownEntries = level === "all" ? entries : entries.filter((e) => e.level === level);
|
|
54
58
|
const pad = (n) => String(n).padStart(2, "0");
|
|
55
59
|
const fmtTime = (ms) => {
|
|
56
60
|
const d = new Date(ms);
|
|
@@ -95,12 +99,19 @@ window.__ModuleLoader__.load({
|
|
|
95
99
|
? h("div", { className: "fs-empty" }, "还没有记录。重启宿主后回来就能看到启动过程。")
|
|
96
100
|
: raw
|
|
97
101
|
? h("pre", { className: "fs-report fs-diag-raw" }, JSON.stringify(entries, null, 2))
|
|
98
|
-
: h(
|
|
99
|
-
|
|
100
|
-
h("
|
|
101
|
-
|
|
102
|
-
h("
|
|
103
|
-
|
|
102
|
+
: h(react.Fragment, null,
|
|
103
|
+
h("div", { className: "fs-pills fs-filter-bar", role: "group", "aria-label": "日志级别筛选" },
|
|
104
|
+
h("button", { type: "button", className: "fs-pill", "aria-pressed": level === "all", onClick: () => setLevel("all") }, `全部 ${entries.length}`),
|
|
105
|
+
h("button", { type: "button", className: "fs-pill", "aria-pressed": level === "warn", onClick: () => setLevel("warn") }, `警告 ${warnCount}`),
|
|
106
|
+
h("button", { type: "button", className: "fs-pill", "aria-pressed": level === "error", onClick: () => setLevel("error") }, `错误 ${errCount}`)),
|
|
107
|
+
shownEntries.length === 0
|
|
108
|
+
? h("div", { className: "fs-empty" }, "这个级别下没有日志。")
|
|
109
|
+
: h("div", { className: "fs-diag-list" },
|
|
110
|
+
shownEntries.map((e, i) => h("div", { key: `${e.at}-${e.key ?? i}`, className: "fs-diag-row", "data-level": e.level },
|
|
111
|
+
h("span", { className: "fs-diag-time" }, fmtTime(e.at)),
|
|
112
|
+
e.level === "error" ? Tag("错误", "danger") : e.level === "warn" ? Tag("警告", "warning") : null,
|
|
113
|
+
h("span", { className: "fs-diag-label", "data-level": e.level }, e.label),
|
|
114
|
+
h("span", { className: "fs-diag-detail" }, describe(e)))))),
|
|
104
115
|
confirmNode);
|
|
105
116
|
}
|
|
106
117
|
|
package/lib/client.douyin.js
CHANGED
|
@@ -225,31 +225,31 @@ window.__ModuleLoader__.load({
|
|
|
225
225
|
`你填的 ${d.channel.identityState.masterUidMismatch.filled} 跟已学到的抖音身份对不上,多半填成了账号短号。留空就行;已学到的身份:${d.channel.identityState.masterUidMismatch.learned.join(" / ")}`,
|
|
226
226
|
undefined, true))
|
|
227
227
|
: null,
|
|
228
|
-
(candidates ?? []).length === 0 ? null : Group({ title: "待确认的抖音身份" },
|
|
229
|
-
Muted("请核对 uid 是不是你自己,确认后点「是我」。"),
|
|
230
|
-
...(candidates ?? []).map((c) => Row({ key: c.name, title: `${c.name} → QQ ${c.qq}`,
|
|
231
|
-
meta: `抖音 uid ${c.uid}${c.at ? ` · ${new Date(c.at).toLocaleString()}` : ""}` },
|
|
232
|
-
Button({ variant: "primary", disabled: busy, onClick: async () => {
|
|
233
|
-
setBusy(true);
|
|
234
|
-
try {
|
|
235
|
-
const r = await api("POST", "/douyin/uin-confirm", { name: c.name });
|
|
236
|
-
if (r?.ok) { notify(`已确认:${c.name}`); await loadCandidates(); refresh(); }
|
|
237
|
-
else notify(r?.error ?? "没确认成");
|
|
238
|
-
} finally { setBusy(false); }
|
|
239
|
-
} }, "是我"),
|
|
240
|
-
Button({ variant: "outline", disabled: busy, onClick: async () => {
|
|
241
|
-
setBusy(true);
|
|
242
|
-
try {
|
|
243
|
-
const r = await api("POST", "/douyin/uin-dismiss", { name: c.name });
|
|
244
|
-
if (r?.ok) { notify(`已忽略:${c.name}`); await loadCandidates(); refresh(); }
|
|
245
|
-
else notify(r?.error ?? "操作失败");
|
|
246
|
-
} finally { setBusy(false); }
|
|
247
|
-
} }, "不是我")))),
|
|
248
228
|
Row({ title: "回所有能私信她的人", desc: d.replyAll ? "建议在抖音隐私设置里把「谁可以私信我」设为互关好友" : null },
|
|
249
229
|
sw("回所有能私信她的人", d.replyAll === true, (v) => save({ top: { replyAll: v } }))),
|
|
250
230
|
Row({ title: "超过多久的消息只记不回", desc: "断线补拉或重启后积压的老消息,超过这个时间就只记进记忆、不回复" },
|
|
251
231
|
Num({ min: 1, max: 1440, value: form.replyWindowMinutes, "aria-label": "分钟", onChange: (e) => patch({ replyWindowMinutes: e.target.value }), onBlur: () => save({ top: { replyWindowMinutes: form.replyWindowMinutes === "" ? 120 : Number(form.replyWindowMinutes) } }) }), Muted("分钟")),
|
|
252
232
|
d.replyAll ? null : Row({ title: "白名单", stack: true }, Area({ ...bind("allowList"), "aria-label": "白名单", placeholder: "对方的抖音数字 uid,每行一个;昵称不参与放行" }))),
|
|
233
|
+
(candidates ?? []).length === 0 ? null : Group({ title: "待确认的抖音身份" },
|
|
234
|
+
Muted("请核对 uid 是不是你自己,确认后点「是我」。"),
|
|
235
|
+
...(candidates ?? []).map((c) => Row({ key: c.name, title: `${c.name} → QQ ${c.qq}`,
|
|
236
|
+
meta: `抖音 uid ${c.uid}${c.at ? ` · ${new Date(c.at).toLocaleString()}` : ""}` },
|
|
237
|
+
Button({ variant: "primary", disabled: busy, onClick: async () => {
|
|
238
|
+
setBusy(true);
|
|
239
|
+
try {
|
|
240
|
+
const r = await api("POST", "/douyin/uin-confirm", { name: c.name });
|
|
241
|
+
if (r?.ok) { notify(`已确认:${c.name}`); await loadCandidates(); refresh(); }
|
|
242
|
+
else notify(r?.error ?? "没确认成");
|
|
243
|
+
} finally { setBusy(false); }
|
|
244
|
+
} }, "是我"),
|
|
245
|
+
Button({ variant: "outline", disabled: busy, onClick: async () => {
|
|
246
|
+
setBusy(true);
|
|
247
|
+
try {
|
|
248
|
+
const r = await api("POST", "/douyin/uin-dismiss", { name: c.name });
|
|
249
|
+
if (r?.ok) { notify(`已忽略:${c.name}`); await loadCandidates(); refresh(); }
|
|
250
|
+
else notify(r?.error ?? "操作失败");
|
|
251
|
+
} finally { setBusy(false); }
|
|
252
|
+
} }, "不是我")))),
|
|
253
253
|
Group({ title: "群聊" },
|
|
254
254
|
Row({ title: "群里被叫到时回", desc: "群聊按说话的人分开认,不会当成一个人;没人 @ 她或叫她名字时只看不说" },
|
|
255
255
|
sw("群里被叫到时回", d.groupReply === true, (v) => save({ top: { groupReply: v } }))),
|
|
@@ -272,9 +272,7 @@ window.__ModuleLoader__.load({
|
|
|
272
272
|
browseOn ? Row({ title: "刷到有意思的发给你", desc: br.shareInDm !== false ? "带链接和感受发到你的抖音私信,没连上就发 QQ;一天最多 2 条" : "带链接和感受发到你的 QQ 私聊;一天最多 2 条" }, sw("刷到有意思的发给你", br.share !== false, (v) => save({ browse: { share: v } }))) : null,
|
|
273
273
|
browseOn && br.share !== false ? Row({ title: "在抖音私信里分享", desc: "要填「主人的名字」、开自动回复" }, sw("在抖音私信里分享", br.shareInDm !== false, (v) => save({ browse: { shareInDm: v } }))) : null,
|
|
274
274
|
browseOn && br.share !== false && br.shareInDm !== false ? Row({ title: "发原生视频卡片", desc: "在抖音私信里发点开就播的原生卡片;需专用浏览器开着,且按收件人身份锁定" }, sw("发原生视频卡片", d.shareCard === true, (v) => save({ top: { shareCard: v } }))) : null),
|
|
275
|
-
Group({ title: "
|
|
276
|
-
post.enabled ? Tag(`今天发了 ${so.post?.todayCount ?? 0} / ${post.perDay ?? 1}`, "outline") : null,
|
|
277
|
-
video.enabled ? Tag(`今天视频 ${so.video?.todayCount ?? 0} / ${video.perDay ?? 1}`, "outline") : null) : null },
|
|
275
|
+
Group({ title: "图文发布", aside: post.enabled ? Tag(`今天发了 ${so.post?.todayCount ?? 0} / ${post.perDay ?? 1}`, "outline") : null },
|
|
278
276
|
Row({ title: "自己发图文", desc: "把想说的话做成文字卡片,在创作者中心发图文;创作者中心可能要单独登录一次" },
|
|
279
277
|
post.enabled ? Button({ disabled: busy || so.post?.running === true || so.video?.running === true || Boolean(so.postPending) || d.enabled !== true || !running, onClick: async () => {
|
|
280
278
|
if (await confirm({ title: "现在发一条图文?", description: "将在抖音创作者中心公开发布一条图文动态。", confirmLabel: "发布" })) await act("/douyin/post-now", { text: noteText.trim() }, "发出去了", "没发成");
|
|
@@ -282,6 +280,10 @@ window.__ModuleLoader__.load({
|
|
|
282
280
|
sw("自己发图文", post.enabled === true, (v) => save({ post: { enabled: v } }))),
|
|
283
281
|
post.enabled ? Row({ title: "指定内容", desc: "留空则按她此刻的心情随机写一条" }, Input({ value: noteText, onChange: (e) => setNoteText(e.target.value), placeholder: "想发什么就写在这里", "aria-label": "图文指定内容" })) : null,
|
|
284
282
|
post.enabled ? Row({ title: "每天最多" }, Num({ min: 0, max: 5, "aria-label": "每天最多几条", ...bind("postPerDay") }), Muted("条")) : null,
|
|
283
|
+
so.postPending && so.postPending.kind !== "video" ? Row({ title: "图文结果待核实", meta: so.postPending.text || "先到创作者中心核实,不会自动重发" },
|
|
284
|
+
Button({ disabled: busy || so.postPending.status !== "unknown", onClick: () => act("/douyin/post-resolve", { jobId: so.postPending.id, outcome: "not_published" }, "已记录为未发布", "记录失败") }, "已核实未发布"),
|
|
285
|
+
Button({ disabled: busy || so.postPending.status !== "unknown", onClick: () => act("/douyin/post-resolve", { jobId: so.postPending.id, outcome: "published" }, "已记录为已发布", "记录失败") }, "已核实已发布")) : null),
|
|
286
|
+
Group({ title: "AI 视频生成", aside: video.enabled ? Tag(`今天视频 ${so.video?.todayCount ?? 0} / ${video.perDay ?? 1}`, "outline") : null },
|
|
285
287
|
// 视频:生成要调付费接口(按条计费)—— 开关旁边必须写清楚这是花钱的操作,点击前也要二次确认。
|
|
286
288
|
Row({ title: "自己发视频", desc: "生成视频要调用付费接口(按条计费),每发一条都真花钱;创作者中心也要先登录过" },
|
|
287
289
|
video.enabled ? Button({ variant: "ghost", disabled: busy || so.video?.running === true || so.post?.running === true || Boolean(so.postPending) || d.enabled !== true || !running, onClick: async () => {
|
|
@@ -304,9 +306,10 @@ window.__ModuleLoader__.load({
|
|
|
304
306
|
Select({ value: form.videoResolution, "aria-label": "分辨率", onChange: (e) => { const v = e.target.value; patch({ videoResolution: v }); save({ video: { resolution: v } }); } },
|
|
305
307
|
...VIDEO_RESOLUTIONS.map((o) => h("option", { key: o.value, value: o.value }, o.label)))) : null,
|
|
306
308
|
video.enabled ? Row({ title: "每天最多" }, Num({ min: 0, max: 5, "aria-label": "每天最多几条视频", ...bind("videoPerDay") }), Muted("条")) : null,
|
|
307
|
-
so.postPending
|
|
309
|
+
so.postPending && so.postPending.kind === "video" ? Row({ title: "视频结果待核实", meta: so.postPending.text || "先到创作者中心核实,不会自动重发" },
|
|
308
310
|
Button({ disabled: busy || so.postPending.status !== "unknown", onClick: () => act("/douyin/post-resolve", { jobId: so.postPending.id, outcome: "not_published" }, "已记录为未发布", "记录失败") }, "已核实未发布"),
|
|
309
|
-
Button({ disabled: busy || so.postPending.status !== "unknown", onClick: () => act("/douyin/post-resolve", { jobId: so.postPending.id, outcome: "published" }, "已记录为已发布", "记录失败") }, "已核实已发布")) : null,
|
|
311
|
+
Button({ disabled: busy || so.postPending.status !== "unknown", onClick: () => act("/douyin/post-resolve", { jobId: so.postPending.id, outcome: "published" }, "已记录为已发布", "记录失败") }, "已核实已发布")) : null),
|
|
312
|
+
Group({ title: "评论互动" },
|
|
310
313
|
Row({ title: "回评论", desc: "每 20 分钟看看最近 3 个作品的评论区;抖音可能要短信验证,碰到会停下来提醒你" },
|
|
311
314
|
cm.enabled ? Button({ disabled: busy || d.enabled !== true || !running, onClick: () => act("/douyin/comments-now", {}, "看完了", "没看成") }, "现在看一眼") : null,
|
|
312
315
|
sw("回评论", cm.enabled === true, (v) => save({ comments: { enabled: v } }))),
|
|
@@ -315,14 +318,17 @@ window.__ModuleLoader__.load({
|
|
|
315
318
|
sw("允许发表情", cm.emoji === true, (v) => save({ comments: { emoji: v } }))) : null,
|
|
316
319
|
so.blockedUntil ? Row({ title: "等验证" }, State("error", `抖音要验证,${Math.max(1, Math.ceil((so.blockedUntil - Date.now()) / 3600000))} 小时内先不试;去浏览器里验证一下`, undefined, true)) : null,
|
|
317
320
|
so.lastError ? Row({ title: "上次出错" }, State("error", so.lastError)) : null,
|
|
318
|
-
socialLog.length === 0 ? null : h("div", { className: "fs-list" }, socialLog.map((x) =>
|
|
321
|
+
socialLog.length === 0 ? null : h("div", { className: "fs-list" }, socialLog.map((x) => h("div", { className: "fs-read-item", key: x.key },
|
|
322
|
+
h("div", { className: "fs-read-head" }, x.tag, h("span", { className: "fs-read-text" }, x.text)),
|
|
323
|
+
h("div", { className: "fs-read-foot" }, h("span", null, relTime(x.at, Date.now()))))))),
|
|
319
324
|
recent.length === 0 ? null : Group({ title: "最近看过" },
|
|
320
|
-
h("div", { className: "fs-list" }, recent.map((v) =>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
h("div", { className: "fs-list" }, recent.map((v) => h("div", { className: "fs-read-item", key: v.id },
|
|
326
|
+
h("div", { className: "fs-read-head" },
|
|
327
|
+
Tag(v.liked ? "赞" : v.skipped ? "划走" : "推荐", v.liked ? "danger" : undefined),
|
|
328
|
+
h("span", { className: "fs-read-text" }, `${v.title || "没写文案"}${v.impression ? ` · ${v.impression}` : ""}`)),
|
|
329
|
+
h("div", { className: "fs-read-foot" },
|
|
330
|
+
h("a", { href: `https://www.douyin.com/video/${v.id}`, target: "_blank", rel: "noreferrer" }, v.author || "打开"),
|
|
331
|
+
h("span", null, relTime(v.seenAt, Date.now()))))))),
|
|
326
332
|
Group({ title: "页面自检" },
|
|
327
333
|
Row({ title: "能否认出私信页" },
|
|
328
334
|
ch.canary ? State(ch.canary.ok ? "done" : "error", relTime(ch.canary.at, Date.now()), ch.canary.ok ? (ch.canary.recovered?.ok === true ? "上次没通过,刷新后好了" : "上次通过") : "上次没通过") : null,
|