@vibedev-si/dsh-vibedev 0.5.2 → 0.5.3
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 +8 -0
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/client/client.account-center.js +29 -16
- package/client/client.js +10 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
本插件由 `dsh-media` 改名而来,见下面的「从 dsh-media 升级」。
|
|
12
12
|
|
|
13
|
+
## 0.5.3 用户可见更新
|
|
14
|
+
|
|
15
|
+
旧充值返利比例为 0 时,邀请返利页对旧充值模式的好友写明“旧充值返利已停止,目前不产生返利”,不再显示“按 0% 返利”;读不到比例时写明暂时无法读取,不再说按充值金额返利。
|
|
16
|
+
|
|
13
17
|
## 0.5.2 用户可见更新
|
|
14
18
|
|
|
15
19
|
账户中心的邀请返利页适配网关的消费返利。页面说明你邀请的好友分别按旧充值模式还是消费返利获得返利,混合时分别给出人数,消费返利已暂停的人数单独说明,并说明新邀请的好友按哪种方式返利。页面新增各模型消费返利比例(含比例来源:模型默认或你的专属比例)和返利记录(计入本金、当时确定的比例、返利或退款冲回、状态和冻结到期时间,可加载更早的记录)。旧充值返利比例不再作为页面的“返利比例”显示,只在说明旧充值模式的好友时标明。「刷新返利」改为「更新并解冻到期返利」。网关尚未提供这些读取接口时,页面提示“网关暂不支持消费返利详情”,其余功能照常。见[返利读取契约](docs/account-affiliate-rebates-contract.md)。
|
|
@@ -295,6 +299,10 @@ npm run build
|
|
|
295
299
|
|
|
296
300
|
## English
|
|
297
301
|
|
|
302
|
+
### What changes in 0.5.3
|
|
303
|
+
|
|
304
|
+
When the old top-up rate is 0, the affiliate page says old top-up rebates have stopped and nothing is earned now for invitees on the old top-up rule, instead of showing a 0% rate. When the rate cannot be read, it says so instead of describing top-up rebates.
|
|
305
|
+
|
|
298
306
|
### What changes in 0.5.2
|
|
299
307
|
|
|
300
308
|
The account center's affiliate page follows the gateway's consumption rebates. It explains whether the people you invited are on the old top-up rebate or consumption rebates, with the count of each for a mix and a separate count of those whose consumption rebates are paused, and which type new invitations get. The page adds the consumption rebate rate for each model with its source (the model default or your custom rate) and rebate records: counted principal, the rate fixed at the time, the rebate or refund reversal, the state and the freeze end, with older records on request. The old top-up rate is no longer shown as the page's rebate rate; it appears only when describing invitees on the old top-up rebate. "Refresh rebates" becomes "Update and release matured rebates". Without these gateway reads the page says the gateway does not provide consumption rebate details yet, and everything else keeps working. See the [rebate read contract](docs/account-affiliate-rebates-contract.md).
|
package/THIRD-PARTY-NOTICES.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.5.
|
|
1
|
+
THIRD-PARTY NOTICES · @vibedev-si/dsh-vibedev 0.5.3
|
|
2
2
|
|
|
3
3
|
This package bundles code from the projects below. Each is used under the licence that
|
|
4
4
|
follows its name; the licence texts are reproduced as the projects ship them.
|
|
@@ -1234,14 +1234,15 @@ window.__ModuleLoader__.load({
|
|
|
1234
1234
|
memberRecordsLimit: "这里最多显示最近 1000 条记录,更早的记录请到官网查看。",
|
|
1235
1235
|
memberProgramDisabled: "邀请返利当前已关闭:新的邀请和消费不会产生返利,已获得的返利不受影响。",
|
|
1236
1236
|
memberProgramNone: "你还没有邀请好友。",
|
|
1237
|
-
memberProgramLegacy: "你邀请的 {total}
|
|
1237
|
+
memberProgramLegacy: "你邀请的 {total} 位好友都是旧充值模式({legacyRule})。",
|
|
1238
1238
|
memberProgramConsumption: "你邀请的 {total} 位好友都按消费返利:好友用充值余额调用模型时,按下方各模型比例返利。",
|
|
1239
|
-
memberProgramMixed: "你邀请的 {total} 位好友中,{legacy}
|
|
1239
|
+
memberProgramMixed: "你邀请的 {total} 位好友中,{legacy} 位是旧充值模式({legacyRule}),{consumption} 位按消费返利(按下方各模型比例)。",
|
|
1240
1240
|
memberProgramPaused: "其中 {paused} 位的消费返利已暂停。",
|
|
1241
1241
|
memberProgramLegacyRule: "好友充值时按 {rate} 返利",
|
|
1242
|
-
|
|
1242
|
+
memberProgramLegacyRuleStopped: "旧充值返利已停止,目前不产生返利",
|
|
1243
|
+
memberProgramLegacyRuleUnknown: "返利比例暂时无法读取",
|
|
1243
1244
|
memberProgramNewConsumption: "新邀请的好友按消费返利。",
|
|
1244
|
-
memberProgramNewLegacy: "
|
|
1245
|
+
memberProgramNewLegacy: "新邀请的好友目前是旧充值模式({legacyRule})。",
|
|
1245
1246
|
memberProgramNewUnavailable: "新邀请好友的返利方式暂未确定。",
|
|
1246
1247
|
memberProgramUnsupported: "网关暂不支持消费返利详情。",
|
|
1247
1248
|
memberProgramUnavailable: "返利方式暂时无法读取,请稍后刷新。",
|
|
@@ -1371,14 +1372,15 @@ window.__ModuleLoader__.load({
|
|
|
1371
1372
|
memberRecordsLimit: "Up to the latest 1,000 records are shown here; see earlier records on the website.",
|
|
1372
1373
|
memberProgramDisabled: "Affiliate rebates are currently off: new invitations and spending earn no rebates. Rebates you already earned are unaffected.",
|
|
1373
1374
|
memberProgramNone: "You have not invited anyone yet.",
|
|
1374
|
-
memberProgramLegacy: "Everyone you invited ({total}) is on the old top-up
|
|
1375
|
+
memberProgramLegacy: "Everyone you invited ({total}) is on the old top-up rule ({legacyRule}).",
|
|
1375
1376
|
memberProgramConsumption: "Everyone you invited ({total}) is on consumption rebates: when they spend paid balance on models, you earn the model rates below.",
|
|
1376
|
-
memberProgramMixed: "Of the {total} people you invited: {legacy} on the old top-up
|
|
1377
|
+
memberProgramMixed: "Of the {total} people you invited: {legacy} on the old top-up rule ({legacyRule}), {consumption} on consumption rebates (the model rates below).",
|
|
1377
1378
|
memberProgramPaused: "Consumption rebates are paused for {paused} of them.",
|
|
1378
1379
|
memberProgramLegacyRule: "{rate} of each top-up they make",
|
|
1379
|
-
|
|
1380
|
+
memberProgramLegacyRuleStopped: "old top-up rebates have stopped, so nothing is earned now",
|
|
1381
|
+
memberProgramLegacyRuleUnknown: "its rate cannot be read right now",
|
|
1380
1382
|
memberProgramNewConsumption: "People you invite from now on get consumption rebates.",
|
|
1381
|
-
memberProgramNewLegacy: "People you invite from now on
|
|
1383
|
+
memberProgramNewLegacy: "People you invite from now on are on the old top-up rule ({legacyRule}).",
|
|
1382
1384
|
memberProgramNewUnavailable: "The rebate type for new invitations is not settled yet.",
|
|
1383
1385
|
memberProgramUnsupported: "This gateway does not provide consumption rebate details yet.",
|
|
1384
1386
|
memberProgramUnavailable: "Rebate modes cannot be read right now. Refresh later.",
|
|
@@ -12326,28 +12328,39 @@ window.__ModuleLoader__.load({
|
|
|
12326
12328
|
const value = numeric(percent);
|
|
12327
12329
|
return value === void 0 || value < 0 || value > 100 ? void 0 : `${count(value)}%`;
|
|
12328
12330
|
}
|
|
12331
|
+
/**
|
|
12332
|
+
* How invitees on the legacy top-up rule earn: the rate when above zero, "stopped" at zero, and "cannot be read" when unknown;
|
|
12333
|
+
* an unknown rate never claims that top-ups still earn rebates.
|
|
12334
|
+
* @param percent - `effective_rebate_rate_percent` from the affiliate summary, or undefined when the summary is not readable.
|
|
12335
|
+
* @param t - translation.
|
|
12336
|
+
* @returns the phrase used inside the legacy sentences.
|
|
12337
|
+
*/
|
|
12338
|
+
function rebateLegacyRule(percent, t) {
|
|
12339
|
+
const rate = rebateLegacyRate(percent);
|
|
12340
|
+
if (rate === void 0) return mt(t, "memberProgramLegacyRuleUnknown");
|
|
12341
|
+
return numeric(percent) === 0 ? mt(t, "memberProgramLegacyRuleStopped") : fill(mt(t, "memberProgramLegacyRule"), { rate });
|
|
12342
|
+
}
|
|
12329
12343
|
/** Whether model consumption rates apply to anyone: current invitees on consumption rebates, or new sign-ups. */
|
|
12330
12344
|
function rebateConsumptionApplies(program) {
|
|
12331
12345
|
return program.enabled === true && (program.invitee_regime === "consumption" || program.invitee_regime === "mixed" || program.new_user_regime === "consumption");
|
|
12332
12346
|
}
|
|
12333
12347
|
/**
|
|
12334
12348
|
* Plain-language lines for the rebate modes of current invitees and new sign-ups. The legacy rate is only ever shown scoped to
|
|
12335
|
-
* invitees on the legacy top-up rule
|
|
12349
|
+
* invitees on the legacy top-up rule, and never as 0%; a switched-off program says so without promising rebates.
|
|
12336
12350
|
* @param program - the `affiliate/program` read.
|
|
12337
|
-
* @param
|
|
12351
|
+
* @param legacyPercent - `effective_rebate_rate_percent` from the affiliate summary, when readable.
|
|
12338
12352
|
* @param t - translation.
|
|
12339
12353
|
* @returns the lines to show; none when the program switch is unknown.
|
|
12340
12354
|
*/
|
|
12341
|
-
function rebateProgramLines(program,
|
|
12355
|
+
function rebateProgramLines(program, legacyPercent, t) {
|
|
12342
12356
|
if (program.enabled === false) return [mt(t, "memberProgramDisabled")];
|
|
12343
12357
|
if (program.enabled !== true) return [];
|
|
12344
12358
|
const invitees = centerObject(program.invitees), consumption = numeric(invitees.consumption), admitted = numeric(invitees.consumption_enabled);
|
|
12345
|
-
const legacyRule = legacyRate === void 0 ? mt(t, "memberProgramLegacyRuleNoRate") : fill(mt(t, "memberProgramLegacyRule"), { rate: legacyRate });
|
|
12346
12359
|
const values = {
|
|
12347
12360
|
total: count(invitees.total),
|
|
12348
12361
|
legacy: count(invitees.legacy_recharge),
|
|
12349
12362
|
consumption: count(invitees.consumption),
|
|
12350
|
-
legacyRule
|
|
12363
|
+
legacyRule: rebateLegacyRule(legacyPercent, t)
|
|
12351
12364
|
};
|
|
12352
12365
|
const lines = [];
|
|
12353
12366
|
const regime = program.invitee_regime;
|
|
@@ -12362,7 +12375,7 @@ window.__ModuleLoader__.load({
|
|
|
12362
12375
|
return lines;
|
|
12363
12376
|
}
|
|
12364
12377
|
/** Which rebate modes apply. An older gateway (no read) or a failed read never falls back to describing the legacy rule. */
|
|
12365
|
-
function AffiliateProgramNotice({ read,
|
|
12378
|
+
function AffiliateProgramNotice({ read, legacyPercent, t }) {
|
|
12366
12379
|
if (read.restricted === true || read.status === "idle" || read.status === "loading" && read.data === void 0) return null;
|
|
12367
12380
|
if (read.status === "unsupported") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
12368
12381
|
className: "center-muted",
|
|
@@ -12376,7 +12389,7 @@ window.__ModuleLoader__.load({
|
|
|
12376
12389
|
"data-member-program": "unavailable",
|
|
12377
12390
|
children: mt(t, "memberProgramUnavailable")
|
|
12378
12391
|
});
|
|
12379
|
-
const lines = rebateProgramLines(centerObject(read.data),
|
|
12392
|
+
const lines = rebateProgramLines(centerObject(read.data), legacyPercent, t);
|
|
12380
12393
|
return lines.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12381
12394
|
className: "member-polish-program",
|
|
12382
12395
|
"data-member-program": "ready",
|
|
@@ -12783,7 +12796,7 @@ window.__ModuleLoader__.load({
|
|
|
12783
12796
|
}),
|
|
12784
12797
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AffiliateProgramNotice, {
|
|
12785
12798
|
read: program,
|
|
12786
|
-
|
|
12799
|
+
legacyPercent: readable ? data.effective_rebate_rate_percent : void 0,
|
|
12787
12800
|
t
|
|
12788
12801
|
}),
|
|
12789
12802
|
!(programData.enabled === false && read.restricted === true) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReadState, {
|
package/client/client.js
CHANGED
|
@@ -1222,14 +1222,15 @@ window.__ModuleLoader__.load({ id: "@vibedev-si/dsh-vibedev", factory: (require)
|
|
|
1222
1222
|
memberRecordsLimit: "这里最多显示最近 1000 条记录,更早的记录请到官网查看。",
|
|
1223
1223
|
memberProgramDisabled: "邀请返利当前已关闭:新的邀请和消费不会产生返利,已获得的返利不受影响。",
|
|
1224
1224
|
memberProgramNone: "你还没有邀请好友。",
|
|
1225
|
-
memberProgramLegacy: "你邀请的 {total}
|
|
1225
|
+
memberProgramLegacy: "你邀请的 {total} 位好友都是旧充值模式({legacyRule})。",
|
|
1226
1226
|
memberProgramConsumption: "你邀请的 {total} 位好友都按消费返利:好友用充值余额调用模型时,按下方各模型比例返利。",
|
|
1227
|
-
memberProgramMixed: "你邀请的 {total} 位好友中,{legacy}
|
|
1227
|
+
memberProgramMixed: "你邀请的 {total} 位好友中,{legacy} 位是旧充值模式({legacyRule}),{consumption} 位按消费返利(按下方各模型比例)。",
|
|
1228
1228
|
memberProgramPaused: "其中 {paused} 位的消费返利已暂停。",
|
|
1229
1229
|
memberProgramLegacyRule: "好友充值时按 {rate} 返利",
|
|
1230
|
-
|
|
1230
|
+
memberProgramLegacyRuleStopped: "旧充值返利已停止,目前不产生返利",
|
|
1231
|
+
memberProgramLegacyRuleUnknown: "返利比例暂时无法读取",
|
|
1231
1232
|
memberProgramNewConsumption: "新邀请的好友按消费返利。",
|
|
1232
|
-
memberProgramNewLegacy: "
|
|
1233
|
+
memberProgramNewLegacy: "新邀请的好友目前是旧充值模式({legacyRule})。",
|
|
1233
1234
|
memberProgramNewUnavailable: "新邀请好友的返利方式暂未确定。",
|
|
1234
1235
|
memberProgramUnsupported: "网关暂不支持消费返利详情。",
|
|
1235
1236
|
memberProgramUnavailable: "返利方式暂时无法读取,请稍后刷新。",
|
|
@@ -1359,14 +1360,15 @@ window.__ModuleLoader__.load({ id: "@vibedev-si/dsh-vibedev", factory: (require)
|
|
|
1359
1360
|
memberRecordsLimit: "Up to the latest 1,000 records are shown here; see earlier records on the website.",
|
|
1360
1361
|
memberProgramDisabled: "Affiliate rebates are currently off: new invitations and spending earn no rebates. Rebates you already earned are unaffected.",
|
|
1361
1362
|
memberProgramNone: "You have not invited anyone yet.",
|
|
1362
|
-
memberProgramLegacy: "Everyone you invited ({total}) is on the old top-up
|
|
1363
|
+
memberProgramLegacy: "Everyone you invited ({total}) is on the old top-up rule ({legacyRule}).",
|
|
1363
1364
|
memberProgramConsumption: "Everyone you invited ({total}) is on consumption rebates: when they spend paid balance on models, you earn the model rates below.",
|
|
1364
|
-
memberProgramMixed: "Of the {total} people you invited: {legacy} on the old top-up
|
|
1365
|
+
memberProgramMixed: "Of the {total} people you invited: {legacy} on the old top-up rule ({legacyRule}), {consumption} on consumption rebates (the model rates below).",
|
|
1365
1366
|
memberProgramPaused: "Consumption rebates are paused for {paused} of them.",
|
|
1366
1367
|
memberProgramLegacyRule: "{rate} of each top-up they make",
|
|
1367
|
-
|
|
1368
|
+
memberProgramLegacyRuleStopped: "old top-up rebates have stopped, so nothing is earned now",
|
|
1369
|
+
memberProgramLegacyRuleUnknown: "its rate cannot be read right now",
|
|
1368
1370
|
memberProgramNewConsumption: "People you invite from now on get consumption rebates.",
|
|
1369
|
-
memberProgramNewLegacy: "People you invite from now on
|
|
1371
|
+
memberProgramNewLegacy: "People you invite from now on are on the old top-up rule ({legacyRule}).",
|
|
1370
1372
|
memberProgramNewUnavailable: "The rebate type for new invitations is not settled yet.",
|
|
1371
1373
|
memberProgramUnsupported: "This gateway does not provide consumption rebate details yet.",
|
|
1372
1374
|
memberProgramUnavailable: "Rebate modes cannot be read right now. Refresh later.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibedev-si/dsh-vibedev",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "VibeDev 账号与模型:在 DeepSeek Harness 里登录 VibeDev,与 DeepSeek 账号并存,使用 VibeDev 网关的模型(Claude、GPT 等),并生成图片、视频、音乐和播客 · VibeDev account and models for DeepSeek Harness: sign in to VibeDev next to the DeepSeek account and use the VibeDev gateway's models (Claude, GPT and more), plus image, video, music and podcast generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|