dsh-neartoken 0.17.1 → 0.18.0
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 +24 -1
- package/lib/client.js +182 -133
- package/lib/client.js.map +1 -1
- package/lib/index.js +58 -6
- package/lib/types/affiliate.d.ts +38 -0
- package/lib/types/client/api.d.ts +6 -2
- package/lib/types/host/account.d.ts +4 -1
- package/lib/types/host/device-flow.d.ts +4 -12
- package/lib/types/protocol.d.ts +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,29 @@
|
|
|
58
58
|
|
|
59
59
|
分组路由按同一文档:请求头 `x-neartoken-group` 的值是 `/api/pricing` 的 `group_refs` 给出的 **`#<id>`**(纯 ASCII),分组名只用于展示;某分组没有 ref 时不发该头,按令牌自身分组路由。
|
|
60
60
|
|
|
61
|
+
## 邀请码(`window.NEARTOKEN_AFF`)
|
|
62
|
+
|
|
63
|
+
引导用户来到 DSH 的页面可以在窗口上留一个邀请码:`window.NEARTOKEN_AFF = '<code>'`。插件在发起设备授权时读取它,并作为 `aff` 参数拼到站点确认页地址上 —— 卡片里「打开浏览器确认」和「复制链接」用的都是这个带参数的地址:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
https://<site>/dsh/device?user_code=K7QM-3XPD&aff=<code>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
站点侧不需要为插件做任何改动:New API 前端本来就会把任意页面上的 `?aff=` 存进浏览器 localStorage,注册表单与第三方账号首次登录都从那里取,落库为邀请人。三种情形:
|
|
70
|
+
|
|
71
|
+
| 用户在站点上的状态 | 结果 |
|
|
72
|
+
|---|---|
|
|
73
|
+
| 已登录 | 设备授权照常完成,`aff` 不参与,无副作用 |
|
|
74
|
+
| 未登录、自己注册 | 注册请求带 `aff_code`,绑定邀请人(奖励按站点后台配置发放) |
|
|
75
|
+
| 未登录、用第三方账号 | 首次登录自动建号时按 `aff` 绑定邀请人 |
|
|
76
|
+
|
|
77
|
+
边界:
|
|
78
|
+
|
|
79
|
+
- 只接受 `[A-Za-z0-9_-]{1,64}` 的取值,其它值整条丢弃,**连接照常发起** —— 一个坏邀请码不该让授权失败。
|
|
80
|
+
- 窗口上没有这个全局变量时,地址与以前完全一样(不带 `aff`)。
|
|
81
|
+
- 已有进行中的授权时再点「连接」不会重启,沿用第一次的地址与其中的 `aff`。
|
|
82
|
+
- 站点的 `/sign-in` 页本身没有注册入口:未登录用户从确认页被跳到这里后,只能登录或走第三方账号(首次登录会在站点上自动建号,`aff` 照样生效);要密码注册就自己打开 `/sign-up?aff=<code>`(确认页已经把取值写进 localStorage,参数可省)。
|
|
83
|
+
|
|
61
84
|
## 配置
|
|
62
85
|
|
|
63
86
|
| 字段 | 默认 | 说明 |
|
|
@@ -254,7 +277,7 @@ Gemini 系走原生 surface 而不是 openai 兼容层:同模型同提示词
|
|
|
254
277
|
```sh
|
|
255
278
|
pnpm install
|
|
256
279
|
pnpm run typecheck
|
|
257
|
-
pnpm run test # vitest:account / pricing / adapter / model-caps / groups / whitelist / routes / config / wire-parse / images / image-settings / image-tool
|
|
280
|
+
pnpm run test # vitest:account / pricing / adapter / model-caps / groups / whitelist / routes / config / affiliate / wire-parse / images / image-settings / image-tool
|
|
258
281
|
pnpm run typecheck # 两个 face 分别检查(host 与 client 的 ctx.sessions 声明互相冲突,不能同 program)
|
|
259
282
|
pnpm run build # lib/index.js (host) + lib/client.js (client) + lib/types
|
|
260
283
|
```
|
package/lib/client.js
CHANGED
|
@@ -124,8 +124,12 @@ window.__ModuleLoader__.load({
|
|
|
124
124
|
async refreshAccount() {
|
|
125
125
|
return await post(REFRESH_PATH);
|
|
126
126
|
},
|
|
127
|
-
async begin() {
|
|
128
|
-
return await
|
|
127
|
+
async begin(affCode) {
|
|
128
|
+
return await jsonOf(await fetcher(AUTHORIZE_PATH, {
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers: { "content-type": "application/json" },
|
|
131
|
+
body: JSON.stringify({ affCode })
|
|
132
|
+
}));
|
|
129
133
|
},
|
|
130
134
|
async cancel() {
|
|
131
135
|
await post(CANCEL_PATH);
|
|
@@ -401,23 +405,23 @@ window.__ModuleLoader__.load({
|
|
|
401
405
|
document.head.appendChild(tag);
|
|
402
406
|
}
|
|
403
407
|
var group_tags_module_css_default = {
|
|
404
|
-
"
|
|
405
|
-
"toneLime": "FotuUq_toneLime",
|
|
406
|
-
"toneAmber": "FotuUq_toneAmber",
|
|
407
|
-
"ratioPricey": "FotuUq_ratioPricey",
|
|
408
|
-
"toneCyan": "FotuUq_toneCyan",
|
|
409
|
-
"toneTeal": "FotuUq_toneTeal",
|
|
410
|
-
"tonePink": "FotuUq_tonePink",
|
|
411
|
-
"tag": "FotuUq_tag",
|
|
412
|
-
"toneFuchsia": "FotuUq_toneFuchsia",
|
|
408
|
+
"ratioChip": "FotuUq_ratioChip",
|
|
413
409
|
"ratioBase": "FotuUq_ratioBase",
|
|
414
410
|
"toneRose": "FotuUq_toneRose",
|
|
415
411
|
"toneViolet": "FotuUq_toneViolet",
|
|
416
|
-
"
|
|
417
|
-
"toneEmerald": "FotuUq_toneEmerald",
|
|
412
|
+
"toneCyan": "FotuUq_toneCyan",
|
|
418
413
|
"toneSky": "FotuUq_toneSky",
|
|
419
|
-
"
|
|
420
|
-
"
|
|
414
|
+
"ratioPricey": "FotuUq_ratioPricey",
|
|
415
|
+
"toneEmerald": "FotuUq_toneEmerald",
|
|
416
|
+
"toneLime": "FotuUq_toneLime",
|
|
417
|
+
"toneOrange": "FotuUq_toneOrange",
|
|
418
|
+
"toneFuchsia": "FotuUq_toneFuchsia",
|
|
419
|
+
"toneIndigo": "FotuUq_toneIndigo",
|
|
420
|
+
"tag": "FotuUq_tag",
|
|
421
|
+
"tonePink": "FotuUq_tonePink",
|
|
422
|
+
"toneTeal": "FotuUq_toneTeal",
|
|
423
|
+
"toneAmber": "FotuUq_toneAmber",
|
|
424
|
+
"ratioCheap": "FotuUq_ratioCheap"
|
|
421
425
|
};
|
|
422
426
|
//#endregion
|
|
423
427
|
//#region src/client/group-tags.tsx
|
|
@@ -472,39 +476,39 @@ window.__ModuleLoader__.load({
|
|
|
472
476
|
document.head.appendChild(tag);
|
|
473
477
|
}
|
|
474
478
|
var ModelGroupSelect_module_css_default = {
|
|
479
|
+
"modelOption": "_2pt-bW_modelOption",
|
|
480
|
+
"optionTrailing": "_2pt-bW_optionTrailing",
|
|
481
|
+
"groupInline": "_2pt-bW_groupInline",
|
|
482
|
+
"chevron": "_2pt-bW_chevron",
|
|
483
|
+
"check": "_2pt-bW_check",
|
|
484
|
+
"cellValue": "_2pt-bW_cellValue",
|
|
485
|
+
"selected": "_2pt-bW_selected",
|
|
486
|
+
"variantCount": "_2pt-bW_variantCount",
|
|
487
|
+
"error": "_2pt-bW_error",
|
|
488
|
+
"triggerIcon": "_2pt-bW_triggerIcon",
|
|
489
|
+
"optionActive": "_2pt-bW_optionActive",
|
|
490
|
+
"cell": "_2pt-bW_cell",
|
|
491
|
+
"retry": "_2pt-bW_retry",
|
|
475
492
|
"groups": "_2pt-bW_groups",
|
|
493
|
+
"cellChevron": "_2pt-bW_cellChevron",
|
|
494
|
+
"triggerEffort": "_2pt-bW_triggerEffort",
|
|
495
|
+
"warning": "_2pt-bW_warning",
|
|
476
496
|
"groupOptionLabel": "_2pt-bW_groupOptionLabel",
|
|
477
|
-
"
|
|
478
|
-
"empty": "_2pt-bW_empty",
|
|
479
|
-
"optionCopy": "_2pt-bW_optionCopy",
|
|
497
|
+
"trigger": "_2pt-bW_trigger",
|
|
480
498
|
"root": "_2pt-bW_root",
|
|
499
|
+
"searchRow": "_2pt-bW_searchRow",
|
|
500
|
+
"option": "_2pt-bW_option",
|
|
501
|
+
"modelName": "_2pt-bW_modelName",
|
|
502
|
+
"empty": "_2pt-bW_empty",
|
|
503
|
+
"menu": "_2pt-bW_menu",
|
|
481
504
|
"cellLabel": "_2pt-bW_cellLabel",
|
|
505
|
+
"status": "_2pt-bW_status",
|
|
506
|
+
"search": "_2pt-bW_search",
|
|
482
507
|
"searchClear": "_2pt-bW_searchClear",
|
|
483
|
-
"toast": "_2pt-bW_toast",
|
|
484
|
-
"retry": "_2pt-bW_retry",
|
|
485
508
|
"groupName": "_2pt-bW_groupName",
|
|
486
|
-
"
|
|
487
|
-
"
|
|
488
|
-
"
|
|
489
|
-
"error": "_2pt-bW_error",
|
|
490
|
-
"triggerEffort": "_2pt-bW_triggerEffort",
|
|
491
|
-
"modelName": "_2pt-bW_modelName",
|
|
492
|
-
"variantCount": "_2pt-bW_variantCount",
|
|
493
|
-
"option": "_2pt-bW_option",
|
|
494
|
-
"cellValue": "_2pt-bW_cellValue",
|
|
495
|
-
"warning": "_2pt-bW_warning",
|
|
496
|
-
"optionTrailing": "_2pt-bW_optionTrailing",
|
|
497
|
-
"selected": "_2pt-bW_selected",
|
|
498
|
-
"cellChevron": "_2pt-bW_cellChevron",
|
|
499
|
-
"triggerLabel": "_2pt-bW_triggerLabel",
|
|
500
|
-
"search": "_2pt-bW_search",
|
|
501
|
-
"chevron": "_2pt-bW_chevron",
|
|
502
|
-
"optionActive": "_2pt-bW_optionActive",
|
|
503
|
-
"groupInline": "_2pt-bW_groupInline",
|
|
504
|
-
"check": "_2pt-bW_check",
|
|
505
|
-
"searchRow": "_2pt-bW_searchRow",
|
|
506
|
-
"cell": "_2pt-bW_cell",
|
|
507
|
-
"status": "_2pt-bW_status"
|
|
509
|
+
"optionCopy": "_2pt-bW_optionCopy",
|
|
510
|
+
"toast": "_2pt-bW_toast",
|
|
511
|
+
"triggerLabel": "_2pt-bW_triggerLabel"
|
|
508
512
|
};
|
|
509
513
|
//#endregion
|
|
510
514
|
//#region src/client/ModelGroupSelect.tsx
|
|
@@ -1059,8 +1063,47 @@ window.__ModuleLoader__.load({
|
|
|
1059
1063
|
});
|
|
1060
1064
|
}
|
|
1061
1065
|
//#endregion
|
|
1066
|
+
//#region src/affiliate.ts
|
|
1067
|
+
/**
|
|
1068
|
+
* The invite code a referring page may leave on the browser window, and how it
|
|
1069
|
+
* reaches the site's own sign-up pages.
|
|
1070
|
+
*
|
|
1071
|
+
* The plugin never reads the site's invite configuration and never decides who
|
|
1072
|
+
* invited whom: a page that referred the user puts its code on `window`, this
|
|
1073
|
+
* module recognizes it, and the confirmation address handed to the site carries
|
|
1074
|
+
* it as the `aff` query parameter — the parameter the site's own front end saves
|
|
1075
|
+
* for its sign-up form and for the first sign-in of a third-party account. A
|
|
1076
|
+
* value that is not a code is dropped rather than repaired: an unusable code must
|
|
1077
|
+
* never turn into a failed connection.
|
|
1078
|
+
*
|
|
1079
|
+
* @module
|
|
1080
|
+
*/
|
|
1081
|
+
/** The global a referring page leaves its invite code on. */
|
|
1082
|
+
const AFFILIATE_GLOBAL = "NEARTOKEN_AFF";
|
|
1083
|
+
/** What is forwarded: the site's own codes are four characters, so this is slack, not a format. */
|
|
1084
|
+
const AFFILIATE_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
1085
|
+
/**
|
|
1086
|
+
* One value accepted as an invite code.
|
|
1087
|
+
* @param value - whatever a page or a request body offered.
|
|
1088
|
+
* @returns the trimmed code, or undefined when the value is not one.
|
|
1089
|
+
*/
|
|
1090
|
+
function normalizeAffiliateCode(value) {
|
|
1091
|
+
if (typeof value !== "string") return void 0;
|
|
1092
|
+
const code = value.trim();
|
|
1093
|
+
return AFFILIATE_PATTERN.test(code) ? code : void 0;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* The invite code a referring page left on a browser window.
|
|
1097
|
+
* @param scope - the global object to read (`globalThis` in the browser).
|
|
1098
|
+
* @returns the code, or undefined when this window carries none.
|
|
1099
|
+
*/
|
|
1100
|
+
function readAffiliateCode(scope) {
|
|
1101
|
+
if (typeof scope !== "object" || scope === null) return void 0;
|
|
1102
|
+
return normalizeAffiliateCode(scope[AFFILIATE_GLOBAL]);
|
|
1103
|
+
}
|
|
1104
|
+
//#endregion
|
|
1062
1105
|
//#region \0dsh-css:D:\Projects\deepseek-harness\dsh-neartoken\src\client\NearTokenSection.module.css.mjs
|
|
1063
|
-
const css = "._02HI2q_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}._02HI2q_title{margin:0;font-size:16px;font-weight:500;line-height:24px}._02HI2q_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}._02HI2q_card{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:12px;padding:14px 16px;display:flex}._02HI2q_cardHead{align-items:baseline;gap:10px;display:flex}._02HI2q_name{font-size:15px;font-weight:500;line-height:22px}._02HI2q_handle{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._02HI2q_badge{background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-secondary);border-radius:999px;margin-left:auto;padding:2px 8px;font-size:12px;line-height:18px}._02HI2q_badgeOn{color:var(--dsw-alias-state-success-primary)}._02HI2q_facts{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:14px 18px;margin:0;padding:12px 14px;display:grid}._02HI2q_fact{flex-direction:column;gap:2px;display:flex}._02HI2q_factLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._02HI2q_factValue{font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--dsw-alias-label-primary);font-size:15px;font-weight:500;line-height:22px}._02HI2q_valueRow{align-items:center;gap:6px;display:flex}._02HI2q_refresh{border-radius:var(--dsw-radius-sm);width:22px;height:22px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}._02HI2q_refresh:hover:not(:disabled){background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-primary)}._02HI2q_refresh:disabled{opacity:.55;cursor:default}._02HI2q_voucherFact{grid-column:1/-1}._02HI2q_voucherList{flex-direction:column;gap:2px;margin:0;display:flex}._02HI2q_voucherRow{justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;line-height:20px;display:flex}._02HI2q_voucherGroup{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._02HI2q_voucherAmount{color:var(--dsw-alias-state-success-primary);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:500}._02HI2q_voucherEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}._02HI2q_invite{color:var(--dsw-alias-label-primary);text-underline-offset:2px;text-decoration:underline}._02HI2q_form{flex-direction:column;gap:10px;display:flex}._02HI2q_label{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._02HI2q_codeRow{align-items:center;gap:10px;display:flex}._02HI2q_code{font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);letter-spacing:.08em;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-primary);user-select:all;padding:4px 12px;font-size:18px;line-height:26px}._02HI2q_linkRow{flex-direction:column;gap:4px;display:flex}._02HI2q_linkLine{align-items:flex-start;gap:8px;display:flex}._02HI2q_link{min-width:0;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);word-break:break-all;color:var(--dsw-alias-label-secondary);user-select:all;flex:auto;font-size:12px;line-height:18px}._02HI2q_actions{flex-wrap:wrap;align-items:center;gap:10px;display:flex}._02HI2q_topup{flex-direction:column;gap:8px;padding-top:2px;display:flex}._02HI2q_topupChips,._02HI2q_topupBar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._02HI2q_topupChip{font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);min-width:48px;height:30px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;padding:0 12px;font-size:13px}._02HI2q_topupChip:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._02HI2q_topupChipActive,._02HI2q_topupChipActive:hover:not(:disabled){background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-color:#0000}._02HI2q_topupInput{font-variant-numeric:tabular-nums;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);width:140px;height:32px;color:var(--dsw-alias-label-primary);outline:none;flex:0 140px;padding:0 10px;font-size:13px}._02HI2q_topupInput:focus{border-color:var(--dsw-alias-button-primary-fill)}._02HI2q_topupInput::placeholder{color:var(--dsw-alias-label-dimmed)}._02HI2q_metaBtn{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-tertiary);cursor:pointer;border-radius:9px;margin-left:auto;padding:1px 8px;font-size:11px;line-height:18px}._02HI2q_metaBtn:hover{color:var(--dsw-alias-label-primary)}._02HI2q_metaBtnOn{border-color:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-button-primary-fill)}._02HI2q_metaEditor{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);flex-direction:column;gap:8px;margin:2px 0 6px 26px;padding:10px 12px;display:flex}._02HI2q_metaTitle{font-weight:600}._02HI2q_metaIntro{color:var(--dsw-alias-label-tertiary);margin:0}._02HI2q_metaField{flex-wrap:wrap;align-items:center;gap:10px;display:flex}._02HI2q_metaLabel{min-width:120px;color:var(--dsw-alias-label-secondary)}._02HI2q_metaInput{width:140px;padding:2px 6px}._02HI2q_metaHint{color:var(--dsw-alias-label-tertiary);font-size:11px}._02HI2q_metaCheck{align-items:center;gap:4px;display:inline-flex}._02HI2q_metaActions{align-items:center;gap:8px;display:flex}._02HI2q_button{white-space:nowrap;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);height:32px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;padding:0 14px;font-size:14px}._02HI2q_buttonPrimary{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-color:#0000}._02HI2q_button:disabled{opacity:.55;cursor:default}._02HI2q_notice{color:var(--dsw-alias-state-warn-label);margin:0;font-size:12px;line-height:18px}._02HI2q_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._02HI2q_search{border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);height:32px;color:var(--dsw-alias-label-primary);padding:0 10px;font-size:14px}._02HI2q_search::placeholder{color:var(--dsw-alias-label-dimmed)}._02HI2q_toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._02HI2q_autosave{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;line-height:18px}._02HI2q_list{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);flex-direction:column;max-height:320px;padding:4px;display:flex;overflow-y:auto}._02HI2q_row{border-radius:var(--dsw-radius-sm);cursor:pointer;align-items:baseline;gap:8px;padding:4px 6px;font-size:13px;line-height:20px;display:flex}._02HI2q_row:hover{background:var(--dsw-alias-interactive-bg-hover)}._02HI2q_row input{accent-color:var(--dsw-alias-button-primary-fill);align-self:center}._02HI2q_rowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);flex:auto;overflow:hidden}._02HI2q_rowMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;align-items:baseline;gap:8px;font-size:12px;display:flex}._02HI2q_rowRatio{color:var(--dsw-alias-label-secondary)}._02HI2q_tip{z-index:40;border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-settings-card-fill);pointer-events:none;flex-direction:column;gap:2px;width:280px;max-height:240px;padding:8px 10px;font-size:12px;line-height:18px;display:flex;position:fixed;overflow-y:auto;box-shadow:0 8px 24px #00000024}._02HI2q_tipTitle{color:var(--dsw-alias-label-tertiary)}._02HI2q_tipRow{justify-content:space-between;align-items:baseline;gap:10px;display:flex}._02HI2q_tipGroup{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:4px;display:flex;overflow:hidden}._02HI2q_tipGroupName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._02HI2q_select{border:1px solid var(--dsw-color-border-subtle,#0000001f);max-width:60%;color:inherit;font:inherit;background:0 0;border-radius:6px;margin-left:auto;padding:2px 6px;font-size:12px}._02HI2q_select:disabled{opacity:.5}._02HI2q_cardToggle{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:0;display:flex}._02HI2q_cardToggle:hover ._02HI2q_name{color:var(--dsw-alias-label-primary)}._02HI2q_count{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin-left:auto;font-size:12px;line-height:18px;display:inline-flex}._02HI2q_countDot{background:var(--dsw-alias-label-dimmed);border-radius:50%;width:3px;height:3px}._02HI2q_countPicked{color:var(--dsw-alias-label-secondary)}._02HI2q_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s}._02HI2q_chevronOpen{transform:rotate(180deg)}";
|
|
1106
|
+
const css = "._02HI2q_section{max-width:720px;color:var(--dsw-alias-label-primary);flex-direction:column;gap:12px;display:flex}._02HI2q_title{margin:0;font-size:16px;font-weight:500;line-height:24px}._02HI2q_intro{color:var(--dsw-alias-label-tertiary);margin:0;font-size:14px;line-height:22px}._02HI2q_card{border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-settings-card-fill);border-radius:var(--dsw-radius-xl);flex-direction:column;gap:12px;padding:14px 16px;display:flex}._02HI2q_cardHead{align-items:baseline;gap:10px;display:flex}._02HI2q_name{font-size:15px;font-weight:500;line-height:22px}._02HI2q_handle{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._02HI2q_badge{background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-secondary);border-radius:999px;margin-left:auto;padding:2px 8px;font-size:12px;line-height:18px}._02HI2q_badgeOn{color:var(--dsw-alias-state-success-primary)}._02HI2q_facts{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:14px 18px;margin:0;padding:12px 14px;display:grid}._02HI2q_fact{flex-direction:column;gap:2px;display:flex}._02HI2q_factLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._02HI2q_factValue{font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--dsw-alias-label-primary);font-size:15px;font-weight:500;line-height:22px}._02HI2q_valueRow{align-items:center;gap:6px;display:flex}._02HI2q_refresh{border-radius:var(--dsw-radius-sm);width:22px;height:22px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}._02HI2q_refresh:hover:not(:disabled){background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-primary)}._02HI2q_refresh:disabled{opacity:.55;cursor:default}._02HI2q_voucherFact{grid-column:1/-1}._02HI2q_voucherList{flex-direction:column;gap:2px;margin:0;display:flex}._02HI2q_voucherRow{justify-content:space-between;align-items:baseline;gap:10px;font-size:13px;line-height:20px;display:flex}._02HI2q_voucherGroup{color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._02HI2q_voucherAmount{color:var(--dsw-alias-state-success-primary);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:500}._02HI2q_voucherEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:13px;line-height:20px}._02HI2q_invite{color:var(--dsw-alias-label-primary);text-underline-offset:2px;text-decoration:underline}._02HI2q_form{flex-direction:column;gap:10px;display:flex}._02HI2q_label{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}._02HI2q_codeRow{align-items:center;gap:10px;display:flex}._02HI2q_code{font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);letter-spacing:.08em;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-primary);user-select:all;padding:4px 12px;font-size:18px;line-height:26px}._02HI2q_linkRow{flex-direction:column;gap:4px;display:flex}._02HI2q_linkLine{align-items:flex-start;gap:8px;display:flex}._02HI2q_link{min-width:0;font-family:var(--dsw-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);word-break:break-all;color:var(--dsw-alias-label-secondary);user-select:all;flex:auto;font-size:12px;line-height:18px}._02HI2q_actions{flex-wrap:wrap;align-items:center;gap:10px;display:flex}._02HI2q_topup{flex-direction:column;gap:8px;padding-top:2px;display:flex}._02HI2q_topupChips,._02HI2q_topupBar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._02HI2q_topupChip{font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);min-width:48px;height:30px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;padding:0 12px;font-size:13px}._02HI2q_topupChip:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._02HI2q_topupChipActive,._02HI2q_topupChipActive:hover:not(:disabled){background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-color:#0000}._02HI2q_topupInput{font-variant-numeric:tabular-nums;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);width:140px;height:32px;color:var(--dsw-alias-label-primary);outline:none;flex:0 140px;padding:0 10px;font-size:13px}._02HI2q_topupInput:focus{border-color:var(--dsw-alias-button-primary-fill)}._02HI2q_topupInput::placeholder{color:var(--dsw-alias-label-dimmed)}._02HI2q_metaBtn{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-button-elevated-fill);color:var(--dsw-alias-label-tertiary);cursor:pointer;margin-left:auto;padding:1px 8px;font-size:11px;line-height:18px}._02HI2q_metaBtn:hover{color:var(--dsw-alias-label-primary)}._02HI2q_metaBtnOn{border-color:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-button-primary-fill)}._02HI2q_metaEditor{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);flex-direction:column;flex:none;gap:10px;margin:4px 0 6px;padding:12px 14px;display:flex}._02HI2q_metaHead{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}._02HI2q_metaTitle{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}._02HI2q_metaIntro{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._02HI2q_metaField{grid-template-columns:132px 132px minmax(0,1fr);align-items:center;gap:12px;font-size:13px;line-height:20px;display:grid}._02HI2q_metaLabel{color:var(--dsw-alias-label-secondary);white-space:nowrap}._02HI2q_metaInput{box-sizing:border-box;font-variant-numeric:tabular-nums;border-radius:var(--dsw-radius-sm);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);width:100%;height:30px;color:var(--dsw-alias-label-primary);outline:none;padding:0 10px;font-family:inherit;font-size:13px}._02HI2q_metaInput:focus{border-color:var(--dsw-alias-button-primary-fill)}._02HI2q_metaInput::placeholder{color:var(--dsw-alias-label-dimmed)}._02HI2q_metaHint{min-width:0;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._02HI2q_metaChecks{align-items:center;gap:18px;display:flex}._02HI2q_metaCheck{color:var(--dsw-alias-label-primary);cursor:pointer;align-items:center;gap:6px;display:inline-flex}._02HI2q_metaCheck input{accent-color:var(--dsw-alias-button-primary-fill);margin:0}._02HI2q_metaActions{align-items:center;gap:8px;margin-top:2px;display:flex}._02HI2q_metaActions ._02HI2q_button{height:28px;padding:0 12px;font-size:13px}._02HI2q_button{white-space:nowrap;border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);height:32px;color:var(--dsw-alias-label-primary);cursor:pointer;flex:none;padding:0 14px;font-size:14px}._02HI2q_buttonPrimary{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-color:#0000}._02HI2q_button:disabled{opacity:.55;cursor:default}._02HI2q_notice{color:var(--dsw-alias-state-warn-label);margin:0;font-size:12px;line-height:18px}._02HI2q_hint{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._02HI2q_search{border-radius:var(--dsw-radius-md);border:.5px solid var(--dsw-alias-settings-card-stroke);background:var(--dsw-alias-button-elevated-fill);height:32px;color:var(--dsw-alias-label-primary);padding:0 10px;font-size:14px}._02HI2q_search::placeholder{color:var(--dsw-alias-label-dimmed)}._02HI2q_toolbar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._02HI2q_autosave{color:var(--dsw-alias-label-tertiary);margin-left:auto;font-size:12px;line-height:18px}._02HI2q_list{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);flex-direction:column;max-height:320px;padding:4px;display:flex;overflow-y:auto}._02HI2q_list:has(._02HI2q_metaEditor){max-height:520px}._02HI2q_row{border-radius:var(--dsw-radius-sm);cursor:pointer;align-items:baseline;gap:8px;padding:4px 6px;font-size:13px;line-height:20px;display:flex}._02HI2q_row:hover{background:var(--dsw-alias-interactive-bg-hover)}._02HI2q_row input{accent-color:var(--dsw-alias-button-primary-fill);align-self:center}._02HI2q_rowName{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-primary);flex:auto;overflow:hidden}._02HI2q_rowMeta{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;align-items:baseline;gap:8px;font-size:12px;display:flex}._02HI2q_rowRatio{color:var(--dsw-alias-label-secondary)}._02HI2q_tip{z-index:40;border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-settings-card-fill);pointer-events:none;flex-direction:column;gap:2px;width:280px;max-height:240px;padding:8px 10px;font-size:12px;line-height:18px;display:flex;position:fixed;overflow-y:auto;box-shadow:0 8px 24px #00000024}._02HI2q_tipTitle{color:var(--dsw-alias-label-tertiary)}._02HI2q_tipRow{justify-content:space-between;align-items:baseline;gap:10px;display:flex}._02HI2q_tipGroup{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:4px;display:flex;overflow:hidden}._02HI2q_tipGroupName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._02HI2q_select{border:1px solid var(--dsw-color-border-subtle,#0000001f);max-width:60%;color:inherit;font:inherit;background:0 0;border-radius:6px;margin-left:auto;padding:2px 6px;font-size:12px}._02HI2q_select:disabled{opacity:.5}._02HI2q_cardToggle{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:0;display:flex}._02HI2q_cardToggle:hover ._02HI2q_name{color:var(--dsw-alias-label-primary)}._02HI2q_count{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-tertiary);align-items:center;gap:8px;margin-left:auto;font-size:12px;line-height:18px;display:inline-flex}._02HI2q_countDot{background:var(--dsw-alias-label-dimmed);border-radius:50%;width:3px;height:3px}._02HI2q_countPicked{color:var(--dsw-alias-label-secondary)}._02HI2q_chevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .12s}._02HI2q_chevronOpen{transform:rotate(180deg)}";
|
|
1064
1107
|
const tagId = "dsh-neartoken/NearTokenSection.module.css";
|
|
1065
1108
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
1066
1109
|
const tag = document.createElement("style");
|
|
@@ -1070,77 +1113,79 @@ window.__ModuleLoader__.load({
|
|
|
1070
1113
|
document.head.appendChild(tag);
|
|
1071
1114
|
}
|
|
1072
1115
|
var NearTokenSection_module_css_default = {
|
|
1116
|
+
"tip": "_02HI2q_tip",
|
|
1117
|
+
"voucherAmount": "_02HI2q_voucherAmount",
|
|
1118
|
+
"button": "_02HI2q_button",
|
|
1119
|
+
"topupChipActive": "_02HI2q_topupChipActive",
|
|
1073
1120
|
"metaLabel": "_02HI2q_metaLabel",
|
|
1074
|
-
"codeRow": "_02HI2q_codeRow",
|
|
1075
|
-
"tipTitle": "_02HI2q_tipTitle",
|
|
1076
|
-
"name": "_02HI2q_name",
|
|
1077
|
-
"linkLine": "_02HI2q_linkLine",
|
|
1078
|
-
"metaEditor": "_02HI2q_metaEditor",
|
|
1079
|
-
"fact": "_02HI2q_fact",
|
|
1080
|
-
"chevronOpen": "_02HI2q_chevronOpen",
|
|
1081
|
-
"valueRow": "_02HI2q_valueRow",
|
|
1082
1121
|
"form": "_02HI2q_form",
|
|
1083
|
-
"
|
|
1084
|
-
"
|
|
1085
|
-
"
|
|
1086
|
-
"metaTitle": "_02HI2q_metaTitle",
|
|
1087
|
-
"metaIntro": "_02HI2q_metaIntro",
|
|
1088
|
-
"countPicked": "_02HI2q_countPicked",
|
|
1122
|
+
"metaInput": "_02HI2q_metaInput",
|
|
1123
|
+
"hint": "_02HI2q_hint",
|
|
1124
|
+
"codeRow": "_02HI2q_codeRow",
|
|
1089
1125
|
"linkRow": "_02HI2q_linkRow",
|
|
1090
|
-
"
|
|
1091
|
-
"
|
|
1092
|
-
"
|
|
1126
|
+
"section": "_02HI2q_section",
|
|
1127
|
+
"rowMeta": "_02HI2q_rowMeta",
|
|
1128
|
+
"search": "_02HI2q_search",
|
|
1129
|
+
"valueRow": "_02HI2q_valueRow",
|
|
1130
|
+
"rowRatio": "_02HI2q_rowRatio",
|
|
1093
1131
|
"title": "_02HI2q_title",
|
|
1094
|
-
"metaField": "_02HI2q_metaField",
|
|
1095
|
-
"factValue": "_02HI2q_factValue",
|
|
1096
|
-
"cardToggle": "_02HI2q_cardToggle",
|
|
1097
1132
|
"topupBar": "_02HI2q_topupBar",
|
|
1098
|
-
"
|
|
1099
|
-
"
|
|
1100
|
-
"search": "_02HI2q_search",
|
|
1101
|
-
"voucherAmount": "_02HI2q_voucherAmount",
|
|
1102
|
-
"topupInput": "_02HI2q_topupInput",
|
|
1103
|
-
"notice": "_02HI2q_notice",
|
|
1104
|
-
"tipRow": "_02HI2q_tipRow",
|
|
1105
|
-
"autosave": "_02HI2q_autosave",
|
|
1106
|
-
"metaHint": "_02HI2q_metaHint",
|
|
1133
|
+
"factValue": "_02HI2q_factValue",
|
|
1134
|
+
"voucherEmpty": "_02HI2q_voucherEmpty",
|
|
1107
1135
|
"chevron": "_02HI2q_chevron",
|
|
1108
|
-
"
|
|
1136
|
+
"rowName": "_02HI2q_rowName",
|
|
1137
|
+
"autosave": "_02HI2q_autosave",
|
|
1138
|
+
"countDot": "_02HI2q_countDot",
|
|
1109
1139
|
"facts": "_02HI2q_facts",
|
|
1110
|
-
"badge": "_02HI2q_badge",
|
|
1111
|
-
"rowMeta": "_02HI2q_rowMeta",
|
|
1112
|
-
"select": "_02HI2q_select",
|
|
1113
1140
|
"voucherGroup": "_02HI2q_voucherGroup",
|
|
1114
|
-
"
|
|
1115
|
-
"
|
|
1116
|
-
"
|
|
1117
|
-
"
|
|
1118
|
-
"
|
|
1119
|
-
"
|
|
1141
|
+
"linkLine": "_02HI2q_linkLine",
|
|
1142
|
+
"metaBtn": "_02HI2q_metaBtn",
|
|
1143
|
+
"factLabel": "_02HI2q_factLabel",
|
|
1144
|
+
"metaField": "_02HI2q_metaField",
|
|
1145
|
+
"count": "_02HI2q_count",
|
|
1146
|
+
"handle": "_02HI2q_handle",
|
|
1147
|
+
"tipTitle": "_02HI2q_tipTitle",
|
|
1148
|
+
"badgeOn": "_02HI2q_badgeOn",
|
|
1120
1149
|
"topupChips": "_02HI2q_topupChips",
|
|
1121
|
-
"
|
|
1122
|
-
"
|
|
1123
|
-
"topup": "_02HI2q_topup",
|
|
1150
|
+
"label": "_02HI2q_label",
|
|
1151
|
+
"metaChecks": "_02HI2q_metaChecks",
|
|
1124
1152
|
"intro": "_02HI2q_intro",
|
|
1125
|
-
"metaInput": "_02HI2q_metaInput",
|
|
1126
|
-
"badgeOn": "_02HI2q_badgeOn",
|
|
1127
|
-
"handle": "_02HI2q_handle",
|
|
1128
1153
|
"refresh": "_02HI2q_refresh",
|
|
1129
|
-
"
|
|
1130
|
-
"
|
|
1131
|
-
"
|
|
1132
|
-
"
|
|
1133
|
-
"card": "_02HI2q_card",
|
|
1134
|
-
"button": "_02HI2q_button",
|
|
1135
|
-
"section": "_02HI2q_section",
|
|
1136
|
-
"voucherFact": "_02HI2q_voucherFact",
|
|
1154
|
+
"link": "_02HI2q_link",
|
|
1155
|
+
"notice": "_02HI2q_notice",
|
|
1156
|
+
"voucherRow": "_02HI2q_voucherRow",
|
|
1157
|
+
"toolbar": "_02HI2q_toolbar",
|
|
1137
1158
|
"topupChip": "_02HI2q_topupChip",
|
|
1159
|
+
"metaHint": "_02HI2q_metaHint",
|
|
1160
|
+
"code": "_02HI2q_code",
|
|
1161
|
+
"voucherFact": "_02HI2q_voucherFact",
|
|
1162
|
+
"voucherList": "_02HI2q_voucherList",
|
|
1163
|
+
"topupInput": "_02HI2q_topupInput",
|
|
1164
|
+
"cardHead": "_02HI2q_cardHead",
|
|
1165
|
+
"metaHead": "_02HI2q_metaHead",
|
|
1138
1166
|
"tipGroupName": "_02HI2q_tipGroupName",
|
|
1139
|
-
"
|
|
1167
|
+
"select": "_02HI2q_select",
|
|
1168
|
+
"topup": "_02HI2q_topup",
|
|
1169
|
+
"metaIntro": "_02HI2q_metaIntro",
|
|
1170
|
+
"chevronOpen": "_02HI2q_chevronOpen",
|
|
1171
|
+
"name": "_02HI2q_name",
|
|
1172
|
+
"metaEditor": "_02HI2q_metaEditor",
|
|
1173
|
+
"card": "_02HI2q_card",
|
|
1174
|
+
"metaBtnOn": "_02HI2q_metaBtnOn",
|
|
1175
|
+
"tipRow": "_02HI2q_tipRow",
|
|
1176
|
+
"cardToggle": "_02HI2q_cardToggle",
|
|
1140
1177
|
"actions": "_02HI2q_actions",
|
|
1178
|
+
"invite": "_02HI2q_invite",
|
|
1179
|
+
"metaActions": "_02HI2q_metaActions",
|
|
1180
|
+
"list": "_02HI2q_list",
|
|
1181
|
+
"metaTitle": "_02HI2q_metaTitle",
|
|
1182
|
+
"fact": "_02HI2q_fact",
|
|
1141
1183
|
"metaCheck": "_02HI2q_metaCheck",
|
|
1142
|
-
"
|
|
1143
|
-
"
|
|
1184
|
+
"buttonPrimary": "_02HI2q_buttonPrimary",
|
|
1185
|
+
"tipGroup": "_02HI2q_tipGroup",
|
|
1186
|
+
"row": "_02HI2q_row",
|
|
1187
|
+
"badge": "_02HI2q_badge",
|
|
1188
|
+
"countPicked": "_02HI2q_countPicked"
|
|
1144
1189
|
};
|
|
1145
1190
|
//#endregion
|
|
1146
1191
|
//#region src/client/NearTokenSection.tsx
|
|
@@ -1242,7 +1287,7 @@ window.__ModuleLoader__.load({
|
|
|
1242
1287
|
}, [t]);
|
|
1243
1288
|
const connect = () => {
|
|
1244
1289
|
run(async () => {
|
|
1245
|
-
const outcome = await api.begin();
|
|
1290
|
+
const outcome = await api.begin(readAffiliateCode(globalThis));
|
|
1246
1291
|
if (outcome.status === "failed") setError(t("account.failed", { message: outcome.message }));
|
|
1247
1292
|
await refresh();
|
|
1248
1293
|
});
|
|
@@ -1915,13 +1960,15 @@ window.__ModuleLoader__.load({
|
|
|
1915
1960
|
}), editing !== entry.model ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1916
1961
|
className: NearTokenSection_module_css_default.metaEditor,
|
|
1917
1962
|
children: [
|
|
1918
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1919
|
-
className: NearTokenSection_module_css_default.
|
|
1920
|
-
children:
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1963
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1964
|
+
className: NearTokenSection_module_css_default.metaHead,
|
|
1965
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1966
|
+
className: NearTokenSection_module_css_default.metaTitle,
|
|
1967
|
+
children: t("meta.editorTitle")
|
|
1968
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1969
|
+
className: NearTokenSection_module_css_default.metaIntro,
|
|
1970
|
+
children: t("meta.editorIntro")
|
|
1971
|
+
})]
|
|
1925
1972
|
}),
|
|
1926
1973
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1927
1974
|
className: NearTokenSection_module_css_default.metaField,
|
|
@@ -1984,31 +2031,33 @@ window.__ModuleLoader__.load({
|
|
|
1984
2031
|
className: NearTokenSection_module_css_default.metaLabel,
|
|
1985
2032
|
children: t("meta.input")
|
|
1986
2033
|
}),
|
|
1987
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
1988
|
-
className: NearTokenSection_module_css_default.
|
|
1989
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2034
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2035
|
+
className: NearTokenSection_module_css_default.metaChecks,
|
|
2036
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2037
|
+
className: NearTokenSection_module_css_default.metaCheck,
|
|
2038
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2039
|
+
type: "checkbox",
|
|
2040
|
+
checked: draft.text,
|
|
2041
|
+
onChange: (event) => {
|
|
2042
|
+
setDraft((current) => ({
|
|
2043
|
+
...current,
|
|
2044
|
+
text: event.target.checked
|
|
2045
|
+
}));
|
|
2046
|
+
}
|
|
2047
|
+
}), t("meta.inputText")]
|
|
2048
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2049
|
+
className: NearTokenSection_module_css_default.metaCheck,
|
|
2050
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2051
|
+
type: "checkbox",
|
|
2052
|
+
checked: draft.image,
|
|
2053
|
+
onChange: (event) => {
|
|
2054
|
+
setDraft((current) => ({
|
|
2055
|
+
...current,
|
|
2056
|
+
image: event.target.checked
|
|
2057
|
+
}));
|
|
2058
|
+
}
|
|
2059
|
+
}), t("meta.inputImage")]
|
|
2060
|
+
})]
|
|
2012
2061
|
}),
|
|
2013
2062
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2014
2063
|
className: NearTokenSection_module_css_default.metaHint,
|
|
@@ -2021,7 +2070,7 @@ window.__ModuleLoader__.load({
|
|
|
2021
2070
|
children: [
|
|
2022
2071
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2023
2072
|
type: "button",
|
|
2024
|
-
className: NearTokenSection_module_css_default.buttonPrimary
|
|
2073
|
+
className: `${NearTokenSection_module_css_default.button} ${NearTokenSection_module_css_default.buttonPrimary}`,
|
|
2025
2074
|
disabled: saving,
|
|
2026
2075
|
onClick: () => {
|
|
2027
2076
|
saveEditor(entry);
|