dsh-account-pool 0.2.5 → 0.2.6
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/lib/client.js +11 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -639,14 +639,23 @@ window.__ModuleLoader__.load({ id: "dsh-account-pool", factory: (require) => {
|
|
|
639
639
|
* 三态刻意区分开:
|
|
640
640
|
* 有数字 → +N(有收益为绿);0 也显示 +0,因为「确实没加」与
|
|
641
641
|
* 「不知道」不同
|
|
642
|
-
* 没数字 →
|
|
642
|
+
* 没数字 → —,并说明原因(见下)
|
|
643
643
|
*/
|
|
644
644
|
function earnedCell(account, lastRun) {
|
|
645
645
|
const run = lastRun?.[account.accountId];
|
|
646
646
|
const earned = typeof account.earnedCredits === "number"
|
|
647
647
|
? account.earnedCredits
|
|
648
648
|
: run?.earnedCredits;
|
|
649
|
-
if (typeof earned !== "number")
|
|
649
|
+
if (typeof earned !== "number") {
|
|
650
|
+
// 说明为什么没有数字,避免误以为功能坏了:
|
|
651
|
+
// 台账只记录「本功能上线之后」发生的收益,历史签到的奖励
|
|
652
|
+
// 无法回溯(上游只给累计总量,分不出是哪天签的)。
|
|
653
|
+
return h("span", {
|
|
654
|
+
title: "今天还没有记录到收益。台账从本功能启用后开始累计;"
|
|
655
|
+
+ "今天之前已经领取的奖励无法回溯。点「全部执行」后即可记录。",
|
|
656
|
+
style: { opacity: 0.5, cursor: "help" },
|
|
657
|
+
}, "—");
|
|
658
|
+
}
|
|
650
659
|
return h("span", {
|
|
651
660
|
style: { color: earned > 0 ? "var(--dsw-alias-state-success-primary)" : "inherit" },
|
|
652
661
|
}, "+" + formatNumber(earned));
|