@linxin666/dsh-client-ui-task-board-team 0.4.13 → 0.4.14
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 +527 -154
- package/lib/types/client/PluginSettingsCard.d.ts +255 -0
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/locales.d.ts +7 -0
- package/lib/types/client/settings-form.d.ts +235 -0
- package/lib/types/client/team/settings.d.ts +27 -1
- package/package.json +2 -1
- package/src/client/PluginSettingsCard.tsx +838 -0
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/locales.ts +14 -0
- package/src/client/settings-card.module.css +821 -0
- package/src/client/settings-form.ts +510 -0
- package/src/client/team/settings.tsx +207 -101
- package/src/client/team/team.module.css +87 -16
package/lib/client.js
CHANGED
|
@@ -119,12 +119,14 @@ window.__ModuleLoader__.load({
|
|
|
119
119
|
*/
|
|
120
120
|
const zh = {
|
|
121
121
|
"section.title": "团队协作",
|
|
122
|
+
"section.description": "把云端 team-hub 指派给本机 dsh-agents 成员的 issue 领成看板镜像卡并在本机执行",
|
|
122
123
|
"section.hub": "Hub 地址",
|
|
123
124
|
"section.team": "团队 ID",
|
|
124
125
|
"section.token": "Host Token",
|
|
125
126
|
"section.token.configured": "已配置(保存在宿主侧,不回显)",
|
|
126
127
|
"section.token.missing": "未配置",
|
|
127
128
|
"section.token.placeholder": "粘贴 Host Token,保存后只在宿主侧使用",
|
|
129
|
+
"section.token.placeholderShort": "粘贴 Token",
|
|
128
130
|
"section.token.save": "保存 Token",
|
|
129
131
|
"section.token.clear": "清除 Token",
|
|
130
132
|
"section.agents": "团队 Agent 绑定",
|
|
@@ -156,6 +158,11 @@ window.__ModuleLoader__.load({
|
|
|
156
158
|
"section.capability.presetPin": "建卡时钉住预设与模型",
|
|
157
159
|
"section.capability.presetPinMissing": "当前看板版本无法在建卡时钉住 Agent 预设、模型与思考档位,因此领取到的镜像卡没有启动,需要人工处理",
|
|
158
160
|
"section.problems": "配置问题",
|
|
161
|
+
"settings.collapse": "收起设置",
|
|
162
|
+
"settings.expand": "展开设置",
|
|
163
|
+
"settings.notExposed": "当前版本未向设置页暴露本扩展的配置命名空间,配置表单不可用。",
|
|
164
|
+
"settings.readOnly": "当前部署的设置只读。",
|
|
165
|
+
"settings.saveFailed": "部署未接受这次改动。",
|
|
159
166
|
"detail.title": "团队协作",
|
|
160
167
|
"detail.issue": "团队 issue",
|
|
161
168
|
"detail.assignee": "负责人",
|
|
@@ -179,12 +186,14 @@ window.__ModuleLoader__.load({
|
|
|
179
186
|
};
|
|
180
187
|
const en = {
|
|
181
188
|
"section.title": "Team collaboration",
|
|
189
|
+
"section.description": "Claims the issues the cloud team-hub assigns to this machine's dsh-agents members and runs them as board mirror cards",
|
|
182
190
|
"section.hub": "Hub URL",
|
|
183
191
|
"section.team": "Team ID",
|
|
184
192
|
"section.token": "Host Token",
|
|
185
193
|
"section.token.configured": "Configured (kept host-side, never echoed)",
|
|
186
194
|
"section.token.missing": "Not configured",
|
|
187
195
|
"section.token.placeholder": "Paste the Host Token; it is used host-side only",
|
|
196
|
+
"section.token.placeholderShort": "Paste token",
|
|
188
197
|
"section.token.save": "Save token",
|
|
189
198
|
"section.token.clear": "Clear token",
|
|
190
199
|
"section.agents": "Team Agent bindings",
|
|
@@ -216,6 +225,11 @@ window.__ModuleLoader__.load({
|
|
|
216
225
|
"section.capability.presetPin": "Pinning a preset and model on create",
|
|
217
226
|
"section.capability.presetPinMissing": "This board revision cannot pin an agent preset, model or reasoning effort when creating a card, so the mirror card was not started and needs a human",
|
|
218
227
|
"section.problems": "Configuration problems",
|
|
228
|
+
"settings.collapse": "Hide settings",
|
|
229
|
+
"settings.expand": "Show settings",
|
|
230
|
+
"settings.notExposed": "This version does not expose the settings namespace of this extension to the configuration page, so the form is unavailable.",
|
|
231
|
+
"settings.readOnly": "This deployment serves settings read-only.",
|
|
232
|
+
"settings.saveFailed": "The deployment did not accept this change.",
|
|
219
233
|
"detail.title": "Team collaboration",
|
|
220
234
|
"detail.issue": "Team issue",
|
|
221
235
|
"detail.assignee": "Assignee",
|
|
@@ -381,13 +395,13 @@ window.__ModuleLoader__.load({
|
|
|
381
395
|
}
|
|
382
396
|
//#endregion
|
|
383
397
|
//#region \0dsh-css:packages/dsh-task-board-team/src/client/team/team.module.css.mjs
|
|
384
|
-
const css = ".hI068G_section{flex-direction:column;gap:10px;font-size:12px;display:flex}.hI068G_title{color:var(--dsw-alias-label-primary);margin:0;font-size:12px;font-weight:600}.hI068G_row{
|
|
385
|
-
const tagId = "@linxin666/dsh-client-ui-task-board-team/packages/dsh-task-board-team/src/client/team/team.module.css";
|
|
386
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
398
|
+
const css$1 = ".hI068G_section{flex-direction:column;gap:10px;font-size:12px;display:flex}.hI068G_title{color:var(--dsw-alias-label-primary);margin:0;font-size:12px;font-weight:600}.hI068G_row{grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:8px;display:grid}.hI068G_label{color:var(--dsw-alias-label-secondary)}.hI068G_value{min-width:0;color:var(--dsw-alias-label-primary);text-align:right;overflow-wrap:anywhere}.hI068G_status{white-space:nowrap;color:var(--dsw-alias-label-secondary);flex:none;font-size:12px}.hI068G_badge{border:1px solid var(--dsw-alias-border-secondary);color:var(--dsw-alias-label-secondary);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:0 6px;font-size:11px;line-height:18px;display:inline-flex}.hI068G_badge[data-hub-status=in_review]{border-color:var(--dsw-alias-border-primary);color:var(--dsw-alias-label-primary)}.hI068G_badge[data-hub-status=running]{border-color:var(--dsw-alias-border-primary)}.hI068G_badge[data-hub-status=failed]{border-style:dashed}.hI068G_list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.hI068G_entry{border-top:1px solid var(--dsw-alias-border-secondary);flex-direction:column;gap:2px;padding:4px 0;display:flex}.hI068G_meta{color:var(--dsw-alias-label-secondary);font-size:11px}.hI068G_body{color:var(--dsw-alias-label-primary);white-space:pre-wrap;overflow-wrap:anywhere}.hI068G_error{color:var(--dsw-alias-label-secondary);border-left:2px solid var(--dsw-alias-border-primary);overflow-wrap:anywhere;margin:12px 0 0;padding-left:6px;font-size:12px}.hI068G_groupTitle{color:var(--dsw-alias-label-secondary);margin:18px 0 0;font-size:12px;font-weight:600}.hI068G_actions{flex-wrap:wrap;gap:8px;padding:16px 0 4px;display:flex}.hI068G_primaryButton{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary));color:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3));font:inherit;cursor:pointer;border:1px solid #0000;border-radius:8px;padding:4px 14px;font-size:13px;font-weight:500;line-height:18px}.hI068G_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover,var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary)))}.hI068G_primaryButton:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hI068G_button{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:4px 12px;font-size:13px;line-height:18px}.hI068G_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.hI068G_button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.hI068G_primaryButton:disabled,.hI068G_button:disabled{opacity:.45;cursor:default}.hI068G_saved{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:12px}.hI068G_empty{color:var(--dsw-alias-label-secondary);margin:0;padding-top:12px}";
|
|
399
|
+
const tagId$1 = "@linxin666/dsh-client-ui-task-board-team/packages/dsh-task-board-team/src/client/team/team.module.css";
|
|
400
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
387
401
|
const tag = document.createElement("style");
|
|
388
402
|
tag.dataset.plugin = "@linxin666/dsh-client-ui-task-board-team";
|
|
389
|
-
tag.dataset.pluginCss = tagId;
|
|
390
|
-
tag.textContent = css;
|
|
403
|
+
tag.dataset.pluginCss = tagId$1;
|
|
404
|
+
tag.textContent = css$1;
|
|
391
405
|
document.head.appendChild(tag);
|
|
392
406
|
}
|
|
393
407
|
var team_module_css_default = {
|
|
@@ -398,12 +412,15 @@ window.__ModuleLoader__.load({
|
|
|
398
412
|
"empty": "hI068G_empty",
|
|
399
413
|
"entry": "hI068G_entry",
|
|
400
414
|
"error": "hI068G_error",
|
|
401
|
-
"
|
|
415
|
+
"groupTitle": "hI068G_groupTitle",
|
|
402
416
|
"label": "hI068G_label",
|
|
403
417
|
"list": "hI068G_list",
|
|
404
418
|
"meta": "hI068G_meta",
|
|
419
|
+
"primaryButton": "hI068G_primaryButton",
|
|
405
420
|
"row": "hI068G_row",
|
|
421
|
+
"saved": "hI068G_saved",
|
|
406
422
|
"section": "hI068G_section",
|
|
423
|
+
"status": "hI068G_status",
|
|
407
424
|
"title": "hI068G_title",
|
|
408
425
|
"value": "hI068G_value"
|
|
409
426
|
};
|
|
@@ -588,6 +605,286 @@ window.__ModuleLoader__.load({
|
|
|
588
605
|
return link.issueNumber === void 0 ? link.issueId : "issue #" + String(link.issueNumber);
|
|
589
606
|
}
|
|
590
607
|
//#endregion
|
|
608
|
+
//#region \0dsh-css:packages/dsh-task-board-team/src/client/settings-card.module.css.mjs
|
|
609
|
+
const css = ".OjQ_Cq_card{--settings-card-radius:12px;--settings-card-header-pad:16px;--settings-card-header-gap:13px;--settings-card-title-size:15px;--settings-card-description-size:13px;--settings-card-body-inset:16px;--settings-card-motion:.18s;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:var(--settings-card-radius);list-style:none;transition:border-color .16s,background .16s}.OjQ_Cq_card:hover{border-color:var(--dsw-alias-label-dimmed)}.OjQ_Cq_cardOpen{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}.OjQ_Cq_cardNested{--settings-card-radius:10px;--settings-card-header-pad:10px 12px;--settings-card-header-gap:10px;--settings-card-title-size:13px;--settings-card-description-size:12px;--settings-card-body-inset:12px}.OjQ_Cq_cardNested .OjQ_Cq_description{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.OjQ_Cq_header{appearance:none;box-sizing:border-box;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);padding:var(--settings-card-header-pad);background:0 0;border:0;display:flex}.OjQ_Cq_header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}.OjQ_Cq_headerStatic{box-sizing:border-box;border-radius:var(--settings-card-radius);align-items:center;gap:var(--settings-card-header-gap);width:100%;padding:var(--settings-card-header-pad);display:flex}.OjQ_Cq_headText{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.OjQ_Cq_mark{background:var(--dsw-alias-bg-module-platform);width:34px;height:34px;color:var(--dsw-alias-label-secondary);border-radius:10px;flex:none;place-items:center;transition:color .16s;display:grid}.OjQ_Cq_header:hover .OjQ_Cq_mark,.OjQ_Cq_cardOpen .OjQ_Cq_mark{color:var(--dsw-alias-label-primary)}.OjQ_Cq_name{color:var(--dsw-alias-label-primary);font-size:var(--settings-card-title-size);font-weight:600;line-height:1.4}.OjQ_Cq_description{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.OjQ_Cq_headerAction{flex:none;align-items:center;display:inline-flex}.OjQ_Cq_chevron{color:var(--dsw-alias-label-tertiary);flex:none;width:16px;height:16px;transition:transform .16s,color .16s}.OjQ_Cq_header:hover .OjQ_Cq_chevron{color:var(--dsw-alias-label-secondary)}.OjQ_Cq_chevronOpen{transform:rotate(180deg)}.OjQ_Cq_disclosure{opacity:0;transition:grid-template-rows var(--settings-card-motion) ease, opacity var(--settings-card-motion) ease;grid-template-rows:0fr;display:grid}.OjQ_Cq_disclosure[data-state=collapsed],.OjQ_Cq_disclosure[data-state=entering],.OjQ_Cq_disclosure[data-state=closing]{overflow:hidden}.OjQ_Cq_disclosure[data-state=entering],.OjQ_Cq_disclosure[data-state=shown]{opacity:1;grid-template-rows:1fr}.OjQ_Cq_disclosure>.OjQ_Cq_body{min-height:0}.OjQ_Cq_body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 var(--settings-card-body-inset);padding-bottom:8px;container:OjQ_Cq_settings-card/inline-size}.OjQ_Cq_readOnly{color:var(--dsw-alias-label-secondary);margin:12px 0 0;font-size:12px;line-height:1.5}.OjQ_Cq_notExposed{color:var(--dsw-alias-state-warn-primary);margin:12px 0 0;font-size:12px;line-height:1.5}.OjQ_Cq_failed{color:var(--dsw-alias-state-error-primary,#b42318);overflow-wrap:anywhere;margin:8px 0 4px;font-size:12px;line-height:18px}.OjQ_Cq_field{grid-template-columns:minmax(0,1fr) fit-content(50%);grid-template-areas:\"OjQ_Cq_head OjQ_Cq_control\"\"OjQ_Cq_hint OjQ_Cq_control\";align-items:center;gap:4px 24px;padding:16px 0;display:grid}.OjQ_Cq_field>.OjQ_Cq_head{grid-area:OjQ_Cq_head}.OjQ_Cq_field>:is(.OjQ_Cq_hint,.OjQ_Cq_invalid){grid-area:OjQ_Cq_hint}.OjQ_Cq_field>:not(.OjQ_Cq_head,.OjQ_Cq_hint,.OjQ_Cq_invalid){grid-area:OjQ_Cq_control;justify-self:end;max-width:100%}.OjQ_Cq_field+.OjQ_Cq_field{border-top:1px solid var(--dsw-alias-border-l2)}.OjQ_Cq_head{align-items:center;gap:8px;display:flex}.OjQ_Cq_label{min-width:0;color:var(--dsw-alias-label-primary);flex:1;font-size:14px;font-weight:400;line-height:22px}.OjQ_Cq_badges{align-items:center;gap:8px;display:inline-flex}.OjQ_Cq_badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.OjQ_Cq_reset{font:inherit;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;padding:0;font-size:12px;line-height:1.5}.OjQ_Cq_reset:hover:not(:disabled){color:var(--dsw-alias-label-primary)}.OjQ_Cq_reset:disabled{cursor:default}.OjQ_Cq_reset:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.OjQ_Cq_segmentGroup{background:color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent);border-radius:8px;flex-wrap:wrap;align-items:center;gap:2px;padding:2px;display:inline-flex;position:relative}.OjQ_Cq_segment{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:7px;margin:0;padding:3px 12px;font-size:13px;font-weight:500;line-height:18px;transition:background-color .12s,color .12s}.OjQ_Cq_segment:hover:not(:disabled):not([data-active]){color:var(--dsw-alias-label-primary)}.OjQ_Cq_segmentGroup:not([data-pill])>.OjQ_Cq_segment[data-active],.OjQ_Cq_segmentGroup[data-pill]:before{background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-layer-3));box-shadow:0 1px 2px #14141314}body[data-ds-dark-theme] .OjQ_Cq_segmentGroup:not([data-pill])>.OjQ_Cq_segment[data-active],body[data-ds-dark-theme] .OjQ_Cq_segmentGroup[data-pill]:before{box-shadow:none;background:#ffffff24}.OjQ_Cq_segment[data-active]{color:var(--dsw-alias-label-primary)}.OjQ_Cq_segmentGroup[data-pill]:before{content:\"\";width:var(--segment-pill-w,0px);height:var(--segment-pill-h,0px);transform:translate(var(--segment-pill-x,0px), var(--segment-pill-y,0px));pointer-events:none;border-radius:7px;transition:transform .24s cubic-bezier(.22,.61,.36,1),width .24s cubic-bezier(.22,.61,.36,1),height .24s cubic-bezier(.22,.61,.36,1);position:absolute;top:0;left:0}.OjQ_Cq_segmentGroup>*{z-index:1;position:relative}.OjQ_Cq_segment:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px}.OjQ_Cq_segment:disabled{cursor:not-allowed;opacity:.45}.OjQ_Cq_segmentGroup[data-pill]:has(>.OjQ_Cq_segment:disabled):before{opacity:.45}.OjQ_Cq_input,.OjQ_Cq_select{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.OjQ_Cq_input:focus-visible,.OjQ_Cq_select:focus-visible{border-color:var(--dsw-alias-brand-primary);outline:none}.OjQ_Cq_input:disabled,.OjQ_Cq_select:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}.OjQ_Cq_inputInvalid{border:1px solid var(--dsw-alias-state-error-primary,#b42318);background:var(--dsw-alias-bg-layer-3);height:34px;font:inherit;color:var(--dsw-alias-label-primary);border-radius:8px;padding:0 12px;font-size:13px;line-height:1.5}.OjQ_Cq_inputInvalid:focus-visible{outline:2px solid var(--dsw-alias-state-error-primary,#b42318);outline-offset:1px;border-color:var(--dsw-alias-state-error-primary,#b42318)}.OjQ_Cq_field>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid,.OjQ_Cq_select,.OjQ_Cq_selectWrap,.OjQ_Cq_rangeAnchor){box-sizing:border-box;width:220px}.OjQ_Cq_rangeAnchor>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid){box-sizing:border-box;width:100%}@container OjQ_Cq_settings-card (width<=440px){.OjQ_Cq_field{grid-template-columns:minmax(0,1fr);grid-template-areas:\"OjQ_Cq_head\"\"OjQ_Cq_hint\"\"OjQ_Cq_control\";row-gap:8px}.OjQ_Cq_field>:not(.OjQ_Cq_head,.OjQ_Cq_hint,.OjQ_Cq_invalid){justify-self:start}.OjQ_Cq_field>:is(.OjQ_Cq_input,.OjQ_Cq_inputInvalid,.OjQ_Cq_select,.OjQ_Cq_selectWrap,.OjQ_Cq_rangeAnchor){justify-self:stretch;width:auto}}.OjQ_Cq_selectWrap{position:relative}.OjQ_Cq_selectButton{appearance:none;text-align:left;cursor:pointer;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex}.OjQ_Cq_selectLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.OjQ_Cq_selectChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}.OjQ_Cq_selectChevronOpen{transform:rotate(180deg)}.OjQ_Cq_selectPopup{z-index:40;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);max-height:240px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;border-radius:8px;flex-direction:column;padding:4px;transition:opacity .1s,transform .1s;display:flex;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;transform:translateY(-4px)}.OjQ_Cq_selectPopupOpen{opacity:1;transform:none}.OjQ_Cq_selectPopupClose{opacity:0;pointer-events:none;transform:translateY(-4px)}.OjQ_Cq_rangeAnchor{display:inline-flex;position:relative}.OjQ_Cq_rangeBubble{z-index:40;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);width:220px;box-shadow:0 8px 24px var(--dsw-alias-bg-mask-2);opacity:0;visibility:hidden;border-radius:10px;padding:10px 12px 6px;transition:opacity .12s,transform .12s,visibility 0s linear .12s;position:absolute;right:0}.OjQ_Cq_rangeBubble[data-side=above]{bottom:calc(100% + 6px);transform:translateY(4px)}.OjQ_Cq_rangeBubble[data-side=below]{top:calc(100% + 6px);transform:translateY(-4px)}.OjQ_Cq_rangeBubble[data-open]{opacity:1;visibility:visible;transition:opacity .12s,transform .12s,visibility;transform:none}.OjQ_Cq_rangeSlider{appearance:none;cursor:pointer;background:0 0;width:100%;height:18px;margin:0;display:block}.OjQ_Cq_rangeSlider::-webkit-slider-runnable-track{background:linear-gradient(to right, var(--dsw-alias-brand-primary) var(--range-fill,0%), color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent) var(--range-fill,0%));border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-moz-range-track{background:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-moz-range-progress{background:var(--dsw-alias-brand-primary);border-radius:999px;height:4px}.OjQ_Cq_rangeSlider::-webkit-slider-thumb{appearance:none;background:#fff;border:0;border-radius:50%;width:14px;height:14px;margin-top:-5px;transition:transform .12s;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}.OjQ_Cq_rangeSlider::-moz-range-thumb{background:#fff;border:0;border-radius:50%;width:14px;height:14px;box-shadow:0 0 0 1px #0000001f,0 1px 3px #00000040}.OjQ_Cq_rangeSlider:active::-webkit-slider-thumb{transform:scale(1.15)}.OjQ_Cq_rangeSlider:focus-visible{outline:none}.OjQ_Cq_rangeSlider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary)}.OjQ_Cq_rangeSlider:disabled{cursor:not-allowed}.OjQ_Cq_rangeEnds{color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;justify-content:space-between;margin-top:2px;font-size:11px;line-height:16px;display:flex}.OjQ_Cq_selectOption{color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;border-radius:6px;flex-shrink:0;padding:6px 10px;font-size:13px;line-height:1.5;overflow:hidden}.OjQ_Cq_selectOption:hover,.OjQ_Cq_selectOptionActive{background:var(--dsw-alias-interactive-bg-hover)}.OjQ_Cq_selectOptionSelected{color:var(--dsw-alias-brand-primary);background:color-mix(in srgb, var(--dsw-alias-brand-primary) 10%, transparent);font-weight:500}.OjQ_Cq_invalid{color:var(--dsw-alias-state-error-primary,#b42318);margin:0;font-size:12px;line-height:18px}.OjQ_Cq_hint{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}.OjQ_Cq_toggle{appearance:none;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:999px;align-items:center;margin:0;padding:0;display:inline-flex}.OjQ_Cq_toggleTrack{background:var(--dsw-alias-label-dimmed);border-radius:999px;flex:none;width:36px;height:20px;transition:background-color .18s;position:relative}.OjQ_Cq_toggleThumb{--toggle-travel:16px;--toggle-overshoot:1px;background:var(--dsw-alias-bg-layer-3);border-radius:50%;width:16px;height:16px;transition:translate .18s;position:absolute;top:2px;left:2px;translate:0;box-shadow:0 1px 2px #1414132e}.OjQ_Cq_toggle[aria-checked=true] .OjQ_Cq_toggleTrack{background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-label-primary))}.OjQ_Cq_toggle[aria-checked=true] .OjQ_Cq_toggleThumb{translate:var(--toggle-travel) 0;background:var(--dsw-alias-label-primary-foreground,var(--dsw-alias-bg-layer-3))}.OjQ_Cq_toggle[data-moved][aria-checked=true] .OjQ_Cq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both OjQ_Cq_toggle-on}.OjQ_Cq_toggle[data-moved][aria-checked=false] .OjQ_Cq_toggleThumb{animation:.35s cubic-bezier(.34,1.45,.64,1) both OjQ_Cq_toggle-off}@keyframes OjQ_Cq_toggle-on{0%{translate:0}55%{translate:calc(var(--toggle-travel) + var(--toggle-overshoot)) 0}80%,to{translate:var(--toggle-travel) 0}}@keyframes OjQ_Cq_toggle-off{0%{translate:var(--toggle-travel) 0}55%{translate:calc(0px - var(--toggle-overshoot)) 0}80%,to{translate:0}}.OjQ_Cq_toggle:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}.OjQ_Cq_toggle:disabled{opacity:.45;cursor:not-allowed}@media (prefers-reduced-motion:reduce){.OjQ_Cq_card,.OjQ_Cq_header,.OjQ_Cq_mark,.OjQ_Cq_chevron,.OjQ_Cq_chevronOpen,.OjQ_Cq_rangeBubble,.OjQ_Cq_selectChevron,.OjQ_Cq_selectChevronOpen,.OjQ_Cq_selectPopup,.OjQ_Cq_toggleTrack,.OjQ_Cq_toggleThumb{transition:none}.OjQ_Cq_toggle[data-moved] .OjQ_Cq_toggleThumb{animation:none}.OjQ_Cq_disclosure{transition-property:opacity}}";
|
|
610
|
+
const tagId = "@linxin666/dsh-client-ui-task-board-team/packages/dsh-task-board-team/src/client/settings-card.module.css";
|
|
611
|
+
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
612
|
+
const tag = document.createElement("style");
|
|
613
|
+
tag.dataset.plugin = "@linxin666/dsh-client-ui-task-board-team";
|
|
614
|
+
tag.dataset.pluginCss = tagId;
|
|
615
|
+
tag.textContent = css;
|
|
616
|
+
document.head.appendChild(tag);
|
|
617
|
+
}
|
|
618
|
+
var settings_card_module_css_default = {
|
|
619
|
+
"badge": "OjQ_Cq_badge",
|
|
620
|
+
"badges": "OjQ_Cq_badges",
|
|
621
|
+
"body": "OjQ_Cq_body",
|
|
622
|
+
"card": "OjQ_Cq_card",
|
|
623
|
+
"cardNested": "OjQ_Cq_cardNested",
|
|
624
|
+
"cardOpen": "OjQ_Cq_cardOpen",
|
|
625
|
+
"chevron": "OjQ_Cq_chevron",
|
|
626
|
+
"chevronOpen": "OjQ_Cq_chevronOpen",
|
|
627
|
+
"control": "OjQ_Cq_control",
|
|
628
|
+
"description": "OjQ_Cq_description",
|
|
629
|
+
"disclosure": "OjQ_Cq_disclosure",
|
|
630
|
+
"failed": "OjQ_Cq_failed",
|
|
631
|
+
"field": "OjQ_Cq_field",
|
|
632
|
+
"head": "OjQ_Cq_head",
|
|
633
|
+
"headText": "OjQ_Cq_headText",
|
|
634
|
+
"header": "OjQ_Cq_header",
|
|
635
|
+
"headerAction": "OjQ_Cq_headerAction",
|
|
636
|
+
"headerStatic": "OjQ_Cq_headerStatic",
|
|
637
|
+
"hint": "OjQ_Cq_hint",
|
|
638
|
+
"input": "OjQ_Cq_input",
|
|
639
|
+
"inputInvalid": "OjQ_Cq_inputInvalid",
|
|
640
|
+
"invalid": "OjQ_Cq_invalid",
|
|
641
|
+
"label": "OjQ_Cq_label",
|
|
642
|
+
"mark": "OjQ_Cq_mark",
|
|
643
|
+
"name": "OjQ_Cq_name",
|
|
644
|
+
"notExposed": "OjQ_Cq_notExposed",
|
|
645
|
+
"rangeAnchor": "OjQ_Cq_rangeAnchor",
|
|
646
|
+
"rangeBubble": "OjQ_Cq_rangeBubble",
|
|
647
|
+
"rangeEnds": "OjQ_Cq_rangeEnds",
|
|
648
|
+
"rangeSlider": "OjQ_Cq_rangeSlider",
|
|
649
|
+
"readOnly": "OjQ_Cq_readOnly",
|
|
650
|
+
"reset": "OjQ_Cq_reset",
|
|
651
|
+
"segment": "OjQ_Cq_segment",
|
|
652
|
+
"segmentGroup": "OjQ_Cq_segmentGroup",
|
|
653
|
+
"select": "OjQ_Cq_select",
|
|
654
|
+
"selectButton": "OjQ_Cq_selectButton",
|
|
655
|
+
"selectChevron": "OjQ_Cq_selectChevron",
|
|
656
|
+
"selectChevronOpen": "OjQ_Cq_selectChevronOpen",
|
|
657
|
+
"selectLabel": "OjQ_Cq_selectLabel",
|
|
658
|
+
"selectOption": "OjQ_Cq_selectOption",
|
|
659
|
+
"selectOptionActive": "OjQ_Cq_selectOptionActive",
|
|
660
|
+
"selectOptionSelected": "OjQ_Cq_selectOptionSelected",
|
|
661
|
+
"selectPopup": "OjQ_Cq_selectPopup",
|
|
662
|
+
"selectPopupClose": "OjQ_Cq_selectPopupClose",
|
|
663
|
+
"selectPopupOpen": "OjQ_Cq_selectPopupOpen",
|
|
664
|
+
"selectWrap": "OjQ_Cq_selectWrap",
|
|
665
|
+
"settings-card": "OjQ_Cq_settings-card",
|
|
666
|
+
"toggle": "OjQ_Cq_toggle",
|
|
667
|
+
"toggle-off": "OjQ_Cq_toggle-off",
|
|
668
|
+
"toggle-on": "OjQ_Cq_toggle-on",
|
|
669
|
+
"toggleThumb": "OjQ_Cq_toggleThumb",
|
|
670
|
+
"toggleTrack": "OjQ_Cq_toggleTrack"
|
|
671
|
+
};
|
|
672
|
+
//#endregion
|
|
673
|
+
//#region src/client/RangeBubble.tsx
|
|
674
|
+
/**
|
|
675
|
+
* Coarse adjustment for a bounded number: resting the pointer on the control
|
|
676
|
+
* (or moving focus into it) raises a small bubble holding a slider across the
|
|
677
|
+
* field's whole range, so a large change is one drag instead of many presses
|
|
678
|
+
* or a retyped value. The control itself stays the precise entry.
|
|
679
|
+
*
|
|
680
|
+
* The bubble belongs to the anchor's subtree, so moving from the control onto
|
|
681
|
+
* the bubble never counts as leaving. It opens after a short rest and closes a
|
|
682
|
+
* moment after the pointer and focus have both gone, so crossing the control
|
|
683
|
+
* on the way elsewhere does not flash it. While a drag is in progress the
|
|
684
|
+
* bubble stays put even if the pointer strays off it.
|
|
685
|
+
*
|
|
686
|
+
* Dragging reports each value through `onInput`, so the field shows it live;
|
|
687
|
+
* releasing the thumb, or a key press on it, reports `onCommit` once. The
|
|
688
|
+
* bubble opens on the side of the control that has room inside the nearest
|
|
689
|
+
* scrolling ancestor, so a row near the top of a settings page does not hang
|
|
690
|
+
* its bubble under the page edge.
|
|
691
|
+
*/
|
|
692
|
+
//#endregion
|
|
693
|
+
//#region src/client/SegmentGroup.tsx
|
|
694
|
+
/**
|
|
695
|
+
* The family's segmented control: a quiet track whose options share one
|
|
696
|
+
* highlight that slides to the pressed option, instead of each option fading
|
|
697
|
+
* its own background out and the next one in. The settings fields' small
|
|
698
|
+
* choices and the Web Extensions TAB strip both render through it, so the two
|
|
699
|
+
* read as one control.
|
|
700
|
+
*
|
|
701
|
+
* The caller builds the option buttons and marks the pressed one with
|
|
702
|
+
* `data-active`; the group measures that button after every render and writes
|
|
703
|
+
* its box as four custom properties, and the stylesheet draws the highlight
|
|
704
|
+
* there (`.segmentGroup[data-pill]::before`). Attribute and first placement
|
|
705
|
+
* land in the same task, so the highlight appears in place and only later
|
|
706
|
+
* changes slide. A ResizeObserver re-measures when the group or an option
|
|
707
|
+
* changes size: a longer locale, a font arriving, a container growing, a
|
|
708
|
+
* strip wrapping onto a second line.
|
|
709
|
+
*/
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region src/client/PluginSettingsCard.tsx
|
|
712
|
+
/**
|
|
713
|
+
* Family-shared chrome for plugin settings cards: a disclosure header naming
|
|
714
|
+
* the plugin and what its settings govern, the controls inside, and the line
|
|
715
|
+
* that reports a refused write. A pick is written the moment it is made and a
|
|
716
|
+
* typed value after a pause, so the card has no save button and nothing waits
|
|
717
|
+
* on the reader. Renders nothing while the namespace is unavailable — a
|
|
718
|
+
* deployment that does not compose the owning plugin should show no trace of
|
|
719
|
+
* it. Inlined into each consumer's client bundle; mirrors the official
|
|
720
|
+
* ui-plugin-config PluginCard in a self-contained slice.
|
|
721
|
+
*
|
|
722
|
+
* Every field inside the body is one settings row: the label and its hint on
|
|
723
|
+
* the left, the control on the right, a hairline between two rows; a narrow
|
|
724
|
+
* card stacks the control under the text (settings-card.module.css).
|
|
725
|
+
*/
|
|
726
|
+
/**
|
|
727
|
+
* What a text field inside a card reaches without its plugin wiring it: write
|
|
728
|
+
* the pending draft now (Enter, leaving the field) or put it back (Escape).
|
|
729
|
+
* Picks need neither; they are written the moment they are made.
|
|
730
|
+
*/
|
|
731
|
+
const CardApply = (0, react.createContext)(null);
|
|
732
|
+
/** Length of the body's disclosure motion; it matches `--settings-card-motion` on the card root. */
|
|
733
|
+
const BODY_MOTION_MS = 180;
|
|
734
|
+
/**
|
|
735
|
+
* Render one plugin settings card.
|
|
736
|
+
* @param props - the plugin's copy keys, its form state, and its controls.
|
|
737
|
+
* @returns the card, or nothing while the namespace is still loading.
|
|
738
|
+
*/
|
|
739
|
+
function PluginSettingsCard(props) {
|
|
740
|
+
const [open, setOpen] = (0, react.useState)(props.defaultOpen ?? true);
|
|
741
|
+
const { state, alwaysOpen } = props;
|
|
742
|
+
const expanded = alwaysOpen === true || open;
|
|
743
|
+
const [bodyPhase, setBodyPhase] = (0, react.useState)(expanded ? "shown" : "hidden");
|
|
744
|
+
const bodyRef = (0, react.useRef)(null);
|
|
745
|
+
(0, react.useLayoutEffect)(() => {
|
|
746
|
+
if (expanded) {
|
|
747
|
+
if (bodyPhase === "hidden") setBodyPhase("collapsed");
|
|
748
|
+
else if (bodyPhase === "collapsed") {
|
|
749
|
+
const node = bodyRef.current;
|
|
750
|
+
if (node !== null) node.offsetHeight;
|
|
751
|
+
setBodyPhase("entering");
|
|
752
|
+
} else if (bodyPhase === "closing") setBodyPhase("entering");
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
if (bodyPhase === "collapsed") setBodyPhase("hidden");
|
|
756
|
+
else if (bodyPhase === "entering" || bodyPhase === "shown") setBodyPhase("closing");
|
|
757
|
+
}, [expanded, bodyPhase]);
|
|
758
|
+
(0, react.useEffect)(() => {
|
|
759
|
+
if (bodyPhase !== "entering" && bodyPhase !== "closing") return;
|
|
760
|
+
const timer = setTimeout(() => {
|
|
761
|
+
setBodyPhase(bodyPhase === "entering" ? "shown" : "hidden");
|
|
762
|
+
}, BODY_MOTION_MS);
|
|
763
|
+
return () => {
|
|
764
|
+
clearTimeout(timer);
|
|
765
|
+
};
|
|
766
|
+
}, [bodyPhase]);
|
|
767
|
+
if (!state.available) return null;
|
|
768
|
+
const title = props.t(props.titleKey);
|
|
769
|
+
const description = props.t(props.descriptionKey);
|
|
770
|
+
const descriptionTitle = props.descriptionTitleKey === void 0 ? description : props.t(props.descriptionTitleKey);
|
|
771
|
+
const baseClass = expanded ? `${settings_card_module_css_default.cardOpen} ${settings_card_module_css_default.card}` : settings_card_module_css_default.card;
|
|
772
|
+
const cardClass = props.density === "nested" ? `${baseClass} ${settings_card_module_css_default.cardNested}` : baseClass;
|
|
773
|
+
/** The body region both legs share; a hidden phase renders nothing at all. */
|
|
774
|
+
const bodyRegion = (content) => bodyPhase === "hidden" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
775
|
+
className: settings_card_module_css_default.disclosure,
|
|
776
|
+
"data-state": bodyPhase,
|
|
777
|
+
ref: bodyRef,
|
|
778
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
779
|
+
className: settings_card_module_css_default.body,
|
|
780
|
+
children: content
|
|
781
|
+
})
|
|
782
|
+
});
|
|
783
|
+
const header = alwaysOpen === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
784
|
+
className: settings_card_module_css_default.headerStatic,
|
|
785
|
+
children: [
|
|
786
|
+
props.icon !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
787
|
+
className: settings_card_module_css_default.mark,
|
|
788
|
+
"aria-hidden": "true",
|
|
789
|
+
children: props.icon
|
|
790
|
+
}) : null,
|
|
791
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
792
|
+
className: settings_card_module_css_default.headText,
|
|
793
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
794
|
+
className: settings_card_module_css_default.name,
|
|
795
|
+
id: props.titleId,
|
|
796
|
+
title,
|
|
797
|
+
children: title
|
|
798
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
799
|
+
className: settings_card_module_css_default.description,
|
|
800
|
+
title: descriptionTitle,
|
|
801
|
+
children: props.descriptionNode ?? description
|
|
802
|
+
})]
|
|
803
|
+
}),
|
|
804
|
+
props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
805
|
+
className: settings_card_module_css_default.headerAction,
|
|
806
|
+
children: props.headerAction
|
|
807
|
+
}) : null
|
|
808
|
+
]
|
|
809
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
810
|
+
type: "button",
|
|
811
|
+
className: settings_card_module_css_default.header,
|
|
812
|
+
"aria-expanded": open,
|
|
813
|
+
"aria-label": `${props.t(open ? "settings.collapse" : "settings.expand")}: ${title}`,
|
|
814
|
+
onClick: () => {
|
|
815
|
+
setOpen(!open);
|
|
816
|
+
},
|
|
817
|
+
children: [
|
|
818
|
+
props.icon !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
819
|
+
className: settings_card_module_css_default.mark,
|
|
820
|
+
"aria-hidden": "true",
|
|
821
|
+
children: props.icon
|
|
822
|
+
}) : null,
|
|
823
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
824
|
+
className: settings_card_module_css_default.headText,
|
|
825
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
826
|
+
className: settings_card_module_css_default.name,
|
|
827
|
+
id: props.titleId,
|
|
828
|
+
title,
|
|
829
|
+
children: title
|
|
830
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
831
|
+
className: settings_card_module_css_default.description,
|
|
832
|
+
title: descriptionTitle,
|
|
833
|
+
children: props.descriptionNode ?? description
|
|
834
|
+
})]
|
|
835
|
+
}),
|
|
836
|
+
props.headerAction !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
837
|
+
className: settings_card_module_css_default.headerAction,
|
|
838
|
+
children: props.headerAction
|
|
839
|
+
}) : null,
|
|
840
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
841
|
+
width: "14",
|
|
842
|
+
height: "14",
|
|
843
|
+
viewBox: "0 0 14 14",
|
|
844
|
+
fill: "none",
|
|
845
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
846
|
+
className: open ? `${settings_card_module_css_default.chevron} ${settings_card_module_css_default.chevronOpen}` : settings_card_module_css_default.chevron,
|
|
847
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
848
|
+
d: "M11.8486 5.5L11.4238 5.92383L8.69727 8.65137C8.44157 8.90706 8.21562 9.13382 8.01172 9.29785C7.79912 9.46883 7.55595 9.61756 7.25 9.66602C7.08435 9.69222 6.91565 9.69222 6.75 9.66602C6.44405 9.61756 6.20088 9.46883 5.98828 9.29785C5.78438 9.13382 5.55843 8.90706 5.30273 8.65137L2.57617 5.92383L2.15137 5.5L3 4.65137L3.42383 5.07617L6.15137 7.80273C6.42595 8.07732 6.59876 8.24849 6.74023 8.3623C6.87291 8.46904 6.92272 8.47813 6.9375 8.48047C6.97895 8.48703 7.02105 8.48703 7.0625 8.48047C7.07728 8.47813 7.12709 8.46904 7.25977 8.3623C7.40124 8.24849 7.57405 8.07732 7.84863 7.80273L10.5762 5.07617L11 4.65137L11.8486 5.5Z",
|
|
849
|
+
fill: "currentColor"
|
|
850
|
+
})
|
|
851
|
+
})
|
|
852
|
+
]
|
|
853
|
+
});
|
|
854
|
+
const notExposedNotice = state.exposed || props.hideNotExposedNotice === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
855
|
+
className: settings_card_module_css_default.notExposed,
|
|
856
|
+
role: "status",
|
|
857
|
+
children: props.t("settings.notExposed")
|
|
858
|
+
});
|
|
859
|
+
if (!state.exposed && props.renderChildrenWhenNotExposed !== true) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
860
|
+
className: cardClass,
|
|
861
|
+
children: [header, bodyRegion(notExposedNotice)]
|
|
862
|
+
});
|
|
863
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
864
|
+
className: cardClass,
|
|
865
|
+
children: [header, props.headerOnly !== true ? bodyRegion(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
866
|
+
notExposedNotice,
|
|
867
|
+
!state.writable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
868
|
+
className: settings_card_module_css_default.readOnly,
|
|
869
|
+
role: "status",
|
|
870
|
+
children: props.t("settings.readOnly")
|
|
871
|
+
}) : null,
|
|
872
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CardApply.Provider, {
|
|
873
|
+
value: {
|
|
874
|
+
commit: props.onSave,
|
|
875
|
+
revert: props.onDiscard
|
|
876
|
+
},
|
|
877
|
+
children: props.children
|
|
878
|
+
}),
|
|
879
|
+
props.hideFooter !== true && state.failed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
880
|
+
className: settings_card_module_css_default.failed,
|
|
881
|
+
role: "status",
|
|
882
|
+
children: [props.t("settings.saveFailed"), state.failedReason ? " - " + state.failedReason : ""]
|
|
883
|
+
}) : null
|
|
884
|
+
] })) : null]
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
//#endregion
|
|
591
888
|
//#region src/client/team/settings.tsx
|
|
592
889
|
/**
|
|
593
890
|
* The team configuration block inside the board's own settings card.
|
|
@@ -600,6 +897,14 @@ window.__ModuleLoader__.load({
|
|
|
600
897
|
* back: the field always renders empty and the status line says whether one is
|
|
601
898
|
* stored.
|
|
602
899
|
*
|
|
900
|
+
* The block is one nested settings card of the board's topic list, exactly like
|
|
901
|
+
* the sibling provider sections: the family card chrome supplies the border, the
|
|
902
|
+
* header, the body insets and the hairline between rows, so this module owns only
|
|
903
|
+
* the rows themselves. Its rows use the shared field grid (label and hint on the
|
|
904
|
+
* left, the control at the trailing edge) instead of a hand-rolled flex row, so a
|
|
905
|
+
* label is never squeezed into a character-per-line column by the control beside
|
|
906
|
+
* it.
|
|
907
|
+
*
|
|
603
908
|
* The block stays reachable while the extension is switched off, because it is
|
|
604
909
|
* where the switch is turned back on; it only reports that fact instead of
|
|
605
910
|
* pretending the forms still apply.
|
|
@@ -607,6 +912,24 @@ window.__ModuleLoader__.load({
|
|
|
607
912
|
* @module dsh-task-board-team/client/team/settings
|
|
608
913
|
*/
|
|
609
914
|
/**
|
|
915
|
+
* The card state this block reports: the chrome asks for the family shape, and
|
|
916
|
+
* this block answers every field immediately through its own action channel, so
|
|
917
|
+
* there is never a pending draft or an invalid one.
|
|
918
|
+
* @param failed - whether the last write was refused.
|
|
919
|
+
* @returns the shell the card renders.
|
|
920
|
+
*/
|
|
921
|
+
function shellOf(failed) {
|
|
922
|
+
return {
|
|
923
|
+
available: true,
|
|
924
|
+
exposed: true,
|
|
925
|
+
writable: true,
|
|
926
|
+
dirty: false,
|
|
927
|
+
invalid: false,
|
|
928
|
+
saving: false,
|
|
929
|
+
failed
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
610
933
|
* Read the configuration half of one summary.
|
|
611
934
|
* @param summary - the published summary, or undefined.
|
|
612
935
|
* @returns the configuration fields the card renders.
|
|
@@ -640,25 +963,88 @@ window.__ModuleLoader__.load({
|
|
|
640
963
|
return false;
|
|
641
964
|
}
|
|
642
965
|
}
|
|
643
|
-
/**
|
|
644
|
-
function
|
|
966
|
+
/** A label with its control at the row's trailing edge. */
|
|
967
|
+
function ValueRow({ label, value }) {
|
|
645
968
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
646
|
-
className:
|
|
969
|
+
className: settings_card_module_css_default.field,
|
|
647
970
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
648
|
-
className:
|
|
649
|
-
children:
|
|
971
|
+
className: settings_card_module_css_default.head,
|
|
972
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
973
|
+
className: settings_card_module_css_default.label,
|
|
974
|
+
children: label
|
|
975
|
+
})
|
|
650
976
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
651
977
|
className: team_module_css_default.value,
|
|
652
|
-
children:
|
|
978
|
+
children: value
|
|
653
979
|
})]
|
|
654
980
|
});
|
|
655
981
|
}
|
|
982
|
+
/** A label with a text input: the hint sits under the label, the field at the trailing edge. */
|
|
983
|
+
function TextRow(props) {
|
|
984
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
985
|
+
className: settings_card_module_css_default.field,
|
|
986
|
+
children: [
|
|
987
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
988
|
+
className: settings_card_module_css_default.head,
|
|
989
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
990
|
+
className: settings_card_module_css_default.label,
|
|
991
|
+
htmlFor: props.id,
|
|
992
|
+
children: props.label
|
|
993
|
+
})
|
|
994
|
+
}),
|
|
995
|
+
props.hint === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
996
|
+
className: settings_card_module_css_default.hint,
|
|
997
|
+
children: props.hint
|
|
998
|
+
}),
|
|
999
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1000
|
+
id: props.id,
|
|
1001
|
+
className: settings_card_module_css_default.input,
|
|
1002
|
+
...props.placeholder === void 0 ? {} : { placeholder: props.placeholder },
|
|
1003
|
+
...props.numeric === true ? { inputMode: "numeric" } : {},
|
|
1004
|
+
value: props.value,
|
|
1005
|
+
onChange: (event) => {
|
|
1006
|
+
props.onEdit(event.target.value);
|
|
1007
|
+
}
|
|
1008
|
+
})
|
|
1009
|
+
]
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
656
1012
|
/**
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* @returns the block.
|
|
1013
|
+
* One capability line of the settings block: the name, whether this deployment
|
|
1014
|
+
* serves it, and what a reader can do when it does not.
|
|
660
1015
|
*/
|
|
661
|
-
function
|
|
1016
|
+
function Capability({ label, available, missing }) {
|
|
1017
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1018
|
+
className: settings_card_module_css_default.field,
|
|
1019
|
+
"data-dsh-part": "team-capability",
|
|
1020
|
+
children: [
|
|
1021
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1022
|
+
className: settings_card_module_css_default.head,
|
|
1023
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1024
|
+
className: settings_card_module_css_default.label,
|
|
1025
|
+
children: label
|
|
1026
|
+
})
|
|
1027
|
+
}),
|
|
1028
|
+
available ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1029
|
+
className: settings_card_module_css_default.hint,
|
|
1030
|
+
children: missing
|
|
1031
|
+
}),
|
|
1032
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1033
|
+
className: team_module_css_default.value,
|
|
1034
|
+
children: available ? t("section.capability.available") : t("section.capability.missing")
|
|
1035
|
+
})
|
|
1036
|
+
]
|
|
1037
|
+
});
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* The body of the settings card: the configuration form and what the Host
|
|
1041
|
+
* reports about it. It is its own component so the card can own the disclosure
|
|
1042
|
+
* and the write report while this half owns the drafts.
|
|
1043
|
+
* @param props - the board's action dispatcher, plus the write report the card
|
|
1044
|
+
* renders in its footer.
|
|
1045
|
+
* @returns the card body.
|
|
1046
|
+
*/
|
|
1047
|
+
function TeamSettingsBody({ dispatch, onSaved }) {
|
|
662
1048
|
const summary = useTeamSummary();
|
|
663
1049
|
const configuration = readConfiguration(summary);
|
|
664
1050
|
const [hubUrl, setHubUrl] = (0, react.useState)(void 0);
|
|
@@ -666,7 +1052,7 @@ window.__ModuleLoader__.load({
|
|
|
666
1052
|
const [members, setMembers] = (0, react.useState)(void 0);
|
|
667
1053
|
const [waitMinutes, setWaitMinutes] = (0, react.useState)(void 0);
|
|
668
1054
|
const [token, setToken] = (0, react.useState)("");
|
|
669
|
-
const [saved, setSaved] = (0, react.useState)(
|
|
1055
|
+
const [saved, setSaved] = (0, react.useState)(void 0);
|
|
670
1056
|
const connection = summary?.connection.state ?? "idle";
|
|
671
1057
|
const membersValue = members ?? (summary?.agents ?? []).map((agent) => agent.memberId).join(", ");
|
|
672
1058
|
const stateKey = "section.connection." + connection;
|
|
@@ -679,119 +1065,82 @@ window.__ModuleLoader__.load({
|
|
|
679
1065
|
questionWaitMinutes: Number.parseInt(waitMinutes ?? String(configuration.questionWaitMinutes ?? 0), 10) || 0
|
|
680
1066
|
});
|
|
681
1067
|
setSaved(ok);
|
|
1068
|
+
onSaved(ok);
|
|
682
1069
|
};
|
|
683
1070
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
684
|
-
className: team_module_css_default.section,
|
|
685
1071
|
"data-dsh-plugin": "task-board-team",
|
|
686
1072
|
"data-dsh-part": "team-settings",
|
|
687
1073
|
children: [
|
|
688
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
689
|
-
|
|
690
|
-
|
|
1074
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueRow, {
|
|
1075
|
+
label: t("section.connection"),
|
|
1076
|
+
value: t(stateKey)
|
|
691
1077
|
}),
|
|
692
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
className: team_module_css_default.label,
|
|
696
|
-
children: t("section.connection")
|
|
697
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
698
|
-
className: team_module_css_default.value,
|
|
699
|
-
"data-dsh-part": "team-connection",
|
|
700
|
-
children: t(stateKey)
|
|
701
|
-
})]
|
|
1078
|
+
summary?.connection.hostId === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueRow, {
|
|
1079
|
+
label: t("section.host"),
|
|
1080
|
+
value: summary.connection.hostId
|
|
702
1081
|
}),
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
className: team_module_css_default.value,
|
|
710
|
-
children: summary.connection.hostId
|
|
711
|
-
})]
|
|
1082
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
|
|
1083
|
+
id: "task-board-team-hub",
|
|
1084
|
+
label: t("section.hub"),
|
|
1085
|
+
placeholder: "https://hub.example.com",
|
|
1086
|
+
value: hubUrl ?? configuration.hubUrl ?? "",
|
|
1087
|
+
onEdit: setHubUrl
|
|
712
1088
|
}),
|
|
713
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
className: team_module_css_default.input,
|
|
720
|
-
value: hubUrl ?? configuration.hubUrl ?? "",
|
|
721
|
-
placeholder: "https://hub.example.com",
|
|
722
|
-
onChange: (event) => {
|
|
723
|
-
setHubUrl(event.target.value);
|
|
724
|
-
}
|
|
725
|
-
})]
|
|
726
|
-
}),
|
|
727
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
728
|
-
className: team_module_css_default.row,
|
|
729
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
730
|
-
className: team_module_css_default.label,
|
|
731
|
-
children: t("section.team")
|
|
732
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
733
|
-
className: team_module_css_default.input,
|
|
734
|
-
value: teamId ?? configuration.teamId ?? "",
|
|
735
|
-
placeholder: "team_...",
|
|
736
|
-
onChange: (event) => {
|
|
737
|
-
setTeamId(event.target.value);
|
|
738
|
-
}
|
|
739
|
-
})]
|
|
740
|
-
}),
|
|
741
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
742
|
-
className: team_module_css_default.row,
|
|
743
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
744
|
-
className: team_module_css_default.label,
|
|
745
|
-
children: t("section.token")
|
|
746
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
747
|
-
className: team_module_css_default.value,
|
|
748
|
-
children: configuration.tokenConfigured === true ? t("section.token.configured") : t("section.token.missing")
|
|
749
|
-
})]
|
|
1089
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
|
|
1090
|
+
id: "task-board-team-team",
|
|
1091
|
+
label: t("section.team"),
|
|
1092
|
+
placeholder: "team_...",
|
|
1093
|
+
value: teamId ?? configuration.teamId ?? "",
|
|
1094
|
+
onEdit: setTeamId
|
|
750
1095
|
}),
|
|
751
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
752
|
-
className:
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
1096
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1097
|
+
className: settings_card_module_css_default.field,
|
|
1098
|
+
children: [
|
|
1099
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1100
|
+
className: settings_card_module_css_default.head,
|
|
1101
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
1102
|
+
className: settings_card_module_css_default.label,
|
|
1103
|
+
htmlFor: "task-board-team-token",
|
|
1104
|
+
children: t("section.token")
|
|
1105
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1106
|
+
className: team_module_css_default.status,
|
|
1107
|
+
"data-dsh-part": "team-token-state",
|
|
1108
|
+
children: configuration.tokenConfigured === true ? t("section.token.configured") : t("section.token.missing")
|
|
1109
|
+
})]
|
|
1110
|
+
}),
|
|
1111
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1112
|
+
className: settings_card_module_css_default.hint,
|
|
1113
|
+
children: t("section.token.placeholder")
|
|
1114
|
+
}),
|
|
1115
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1116
|
+
id: "task-board-team-token",
|
|
1117
|
+
className: settings_card_module_css_default.input,
|
|
1118
|
+
type: "password",
|
|
1119
|
+
autoComplete: "off",
|
|
1120
|
+
spellCheck: false,
|
|
1121
|
+
placeholder: t("section.token.placeholderShort"),
|
|
1122
|
+
value: token,
|
|
1123
|
+
onChange: (event) => {
|
|
1124
|
+
setToken(event.target.value);
|
|
1125
|
+
}
|
|
1126
|
+
})
|
|
1127
|
+
]
|
|
777
1128
|
}),
|
|
778
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
inputMode: "numeric",
|
|
786
|
-
value: waitMinutes ?? String(configuration.questionWaitMinutes ?? 0),
|
|
787
|
-
onChange: (event) => {
|
|
788
|
-
setWaitMinutes(event.target.value);
|
|
789
|
-
}
|
|
790
|
-
})]
|
|
1129
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
|
|
1130
|
+
id: "task-board-team-agents",
|
|
1131
|
+
label: t("section.agents"),
|
|
1132
|
+
hint: t("section.agents.hint"),
|
|
1133
|
+
placeholder: "member_...",
|
|
1134
|
+
value: membersValue ?? "",
|
|
1135
|
+
onEdit: setMembers
|
|
791
1136
|
}),
|
|
792
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
793
|
-
|
|
794
|
-
|
|
1137
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextRow, {
|
|
1138
|
+
id: "task-board-team-wait",
|
|
1139
|
+
label: t("section.questionWait"),
|
|
1140
|
+
hint: t("section.questionWait.hint"),
|
|
1141
|
+
numeric: true,
|
|
1142
|
+
value: waitMinutes ?? String(configuration.questionWaitMinutes ?? 0),
|
|
1143
|
+
onEdit: setWaitMinutes
|
|
795
1144
|
}),
|
|
796
1145
|
(summary?.agents ?? []).length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
797
1146
|
className: team_module_css_default.empty,
|
|
@@ -801,7 +1150,7 @@ window.__ModuleLoader__.load({
|
|
|
801
1150
|
className: team_module_css_default.actions,
|
|
802
1151
|
children: [
|
|
803
1152
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
804
|
-
className: team_module_css_default.
|
|
1153
|
+
className: team_module_css_default.primaryButton,
|
|
805
1154
|
type: "button",
|
|
806
1155
|
onClick: () => {
|
|
807
1156
|
saveSettings();
|
|
@@ -814,10 +1163,8 @@ window.__ModuleLoader__.load({
|
|
|
814
1163
|
disabled: token.trim() === "",
|
|
815
1164
|
onClick: () => {
|
|
816
1165
|
send(dispatch, "set-token", { token }).then((ok) => {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
setSaved(true);
|
|
820
|
-
} else setSaved(false);
|
|
1166
|
+
setSaved(ok);
|
|
1167
|
+
if (ok) setToken("");
|
|
821
1168
|
});
|
|
822
1169
|
},
|
|
823
1170
|
children: t("section.token.save")
|
|
@@ -840,38 +1187,36 @@ window.__ModuleLoader__.load({
|
|
|
840
1187
|
})
|
|
841
1188
|
]
|
|
842
1189
|
}),
|
|
843
|
-
saved ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
844
|
-
className: team_module_css_default.
|
|
1190
|
+
saved === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1191
|
+
className: team_module_css_default.saved,
|
|
845
1192
|
children: t("section.saved")
|
|
846
1193
|
}) : null,
|
|
847
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
(summary?.problems ?? []).length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
874
|
-
className: team_module_css_default.title,
|
|
1194
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1195
|
+
className: team_module_css_default.groupTitle,
|
|
1196
|
+
children: t("section.capabilities")
|
|
1197
|
+
}),
|
|
1198
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
|
|
1199
|
+
label: t("section.capability.followUp"),
|
|
1200
|
+
available: summary?.capabilities.followUp === true,
|
|
1201
|
+
missing: t("section.capability.followUpMissing")
|
|
1202
|
+
}),
|
|
1203
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
|
|
1204
|
+
label: t("section.capability.rework"),
|
|
1205
|
+
available: summary?.capabilities.rework === true,
|
|
1206
|
+
missing: t("section.capability.reworkMissing")
|
|
1207
|
+
}),
|
|
1208
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
|
|
1209
|
+
label: t("section.capability.run"),
|
|
1210
|
+
available: summary?.capabilities.run === true,
|
|
1211
|
+
missing: t("section.capability.runMissing")
|
|
1212
|
+
}),
|
|
1213
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Capability, {
|
|
1214
|
+
label: t("section.capability.presetPin"),
|
|
1215
|
+
available: summary?.presetPin === "supported",
|
|
1216
|
+
missing: t("section.capability.presetPinMissing")
|
|
1217
|
+
}),
|
|
1218
|
+
(summary?.problems ?? []).length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1219
|
+
className: team_module_css_default.groupTitle,
|
|
875
1220
|
children: t("section.problems")
|
|
876
1221
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
877
1222
|
className: team_module_css_default.list,
|
|
@@ -890,6 +1235,34 @@ window.__ModuleLoader__.load({
|
|
|
890
1235
|
]
|
|
891
1236
|
});
|
|
892
1237
|
}
|
|
1238
|
+
/**
|
|
1239
|
+
* The settings block: one topic of the board's own settings card.
|
|
1240
|
+
*
|
|
1241
|
+
* Closed on arrival like the sibling provider card — the settings page opens as
|
|
1242
|
+
* a topic list, and this topic is one of them. The body is read only by a reader
|
|
1243
|
+
* who opens it, and its rows are written through the board's action channel, so
|
|
1244
|
+
* the card holds no staged draft: save and discard are the no-ops of an
|
|
1245
|
+
* always-committed form, and the footer reports a refused write.
|
|
1246
|
+
* @param props - the board's settings seat props.
|
|
1247
|
+
* @returns the block.
|
|
1248
|
+
*/
|
|
1249
|
+
function TeamSettingsSection({ dispatch }) {
|
|
1250
|
+
const [saved, setSaved] = (0, react.useState)(void 0);
|
|
1251
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PluginSettingsCard, {
|
|
1252
|
+
t,
|
|
1253
|
+
titleKey: "section.title",
|
|
1254
|
+
descriptionKey: "section.description",
|
|
1255
|
+
density: "nested",
|
|
1256
|
+
defaultOpen: false,
|
|
1257
|
+
state: shellOf(saved === false),
|
|
1258
|
+
onSave: () => {},
|
|
1259
|
+
onDiscard: () => {},
|
|
1260
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TeamSettingsBody, {
|
|
1261
|
+
dispatch,
|
|
1262
|
+
onSaved: setSaved
|
|
1263
|
+
})
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
893
1266
|
//#endregion
|
|
894
1267
|
//#region src/client/optional-service.ts
|
|
895
1268
|
/**
|