@burdenoff/microfe-bigconsole 2026.1124.2 → 2026.1124.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +8 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +127 -122
- package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +5 -0
- package/dist/bigconsole/components/fleet/FleetCopySection.js +115 -118
- package/dist/bigconsole/components/fleet/FleetWidgetActions.d.ts +36 -0
- package/dist/bigconsole/components/fleet/FleetWidgetActions.js +82 -0
- package/dist/bigconsole/components/widgets/WidgetMenu.js +146 -96
- package/dist/bigconsole/hooks/useFleetConfirm.d.ts +7 -0
- package/dist/bigconsole/hooks/useFleetConfirm.js +17 -0
- package/dist/bigconsole/hooks/useFleetWidgetActions.d.ts +10 -0
- package/dist/bigconsole/hooks/useFleetWidgetActions.js +41 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +13 -18
- package/dist/bigconsole/hooks/useOwnerBoundRun.js +45 -30
- package/dist/bigconsole/hooks/useWidgetOperations.js +2 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +303 -291
- package/dist/bigconsole/types/index.d.ts +4 -0
- package/dist/bigconsole/utils/fleetNotices.d.ts +12 -0
- package/dist/bigconsole/utils/fleetNotices.js +5 -0
- package/dist/bigconsole/utils/fleetWidgetMenu.d.ts +20 -0
- package/dist/bigconsole/utils/fleetWidgetMenu.js +13 -0
- package/dist/generated/wspace-operations.d.ts +54 -0
- package/dist/generated/wspace-operations.js +405 -95
- package/dist/generated/wspace-types.d.ts +395 -9
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
import { ActionLock } from '../../hooks/useOwnerBoundRun';
|
|
2
3
|
export interface FleetChildrenPanelProps {
|
|
3
4
|
dashboardId: string;
|
|
4
5
|
dashboardName: string;
|
|
@@ -6,6 +7,13 @@ export interface FleetChildrenPanelProps {
|
|
|
6
7
|
masterName?: string | null;
|
|
7
8
|
/** Called after an action changed this board's widgets (a flag answered, the board restored). */
|
|
8
9
|
onBoardChanged?: () => Promise<unknown> | void;
|
|
10
|
+
/**
|
|
11
|
+
* The page's action lock, when the board's widget menu shares it with this panel, so a widget restored or
|
|
12
|
+
* promoted from its menu holds the panel's buttons too. The panel keeps its own when none is given.
|
|
13
|
+
*/
|
|
14
|
+
lock?: ActionLock;
|
|
15
|
+
/** Changes when something outside the panel changed this board's widgets, so open flags are read again. */
|
|
16
|
+
changeToken?: number;
|
|
9
17
|
onClose: () => void;
|
|
10
18
|
onOpenBoard: (dashboardId: string) => void;
|
|
11
19
|
}
|
|
@@ -9,9 +9,9 @@ import { pushIsEmpty as s } from "../../utils/fleetPush.js";
|
|
|
9
9
|
import { CreateLinkedCopyDialog as c } from "./CreateLinkedCopyDialog.js";
|
|
10
10
|
import { FleetCopySection as l } from "./FleetCopySection.js";
|
|
11
11
|
import { FleetPushResultTable as u } from "./FleetPushResultTable.js";
|
|
12
|
-
import { memo as d, useCallback as f,
|
|
13
|
-
import { PermissionButton as
|
|
14
|
-
import { Network as
|
|
12
|
+
import { memo as d, useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
|
|
13
|
+
import { PermissionButton as g } from "@burdenoff/fe-libs/shared/components";
|
|
14
|
+
import { Network as ee, X as te } from "lucide-react";
|
|
15
15
|
import { Button as _, Spinner as v } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
17
17
|
// src/bigconsole/components/fleet/FleetChildrenPanel.tsx
|
|
@@ -30,93 +30,97 @@ var S = {
|
|
|
30
30
|
...S,
|
|
31
31
|
backgroundColor: "var(--color-status-warning-bgSubtle)",
|
|
32
32
|
color: "var(--color-status-warning-text)"
|
|
33
|
-
}, w = (e, t) => e instanceof Error && e.message ? e.message : t, T = d(function({ dashboardId: d, dashboardName: T, masterName: E = null, onBoardChanged:
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
}, w = (e, t) => e instanceof Error && e.message ? e.message : t, T = d(function({ dashboardId: d, dashboardName: T, masterName: E = null, onBoardChanged: D, lock: O, changeToken: k, onClose: ne, onOpenBoard: re }) {
|
|
34
|
+
let A = n(), { workspaceId: ie, currentUser: ae } = e(), j = `${ie ?? ""}:${ae?.id ?? ""}:${d}`, { loading: M, error: N, isMaster: P, linkStatus: F, summary: I, refetch: L } = r(d, !0), R = o(), [z, B] = h({ phase: "idle" }), [V, H] = h(!1), [U, W] = h(null), [G, K] = h(null), q = i(), J = O ?? q, Y = m(k);
|
|
35
|
+
p(() => {
|
|
36
|
+
k !== Y.current && (Y.current = k, B((e) => e.phase === "preview" ? { phase: "idle" } : e), L());
|
|
37
|
+
}, [k, L]);
|
|
38
|
+
let oe = f(() => {
|
|
39
|
+
B({ phase: "idle" }), H(!1), W(null), K(null);
|
|
40
|
+
}, []), { acting: se, run: X } = a(j, L, oe, J), Z = R.busy || se, Q = f(() => (K(null), X(() => R.setAsMaster(d), () => K({
|
|
37
41
|
tone: "ok",
|
|
38
|
-
text:
|
|
39
|
-
}), (e) =>
|
|
42
|
+
text: A("bigconsole.fleet.children.nowMaster", "This board is now a master.")
|
|
43
|
+
}), (e) => K({
|
|
40
44
|
tone: "error",
|
|
41
|
-
text: w(e,
|
|
45
|
+
text: w(e, A("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
|
|
42
46
|
}))), [
|
|
43
|
-
|
|
47
|
+
R,
|
|
44
48
|
d,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]),
|
|
49
|
+
X,
|
|
50
|
+
A
|
|
51
|
+
]), ce = f(() => (K(null), X(() => R.unsetAsMaster(d), () => K({
|
|
48
52
|
tone: "ok",
|
|
49
|
-
text:
|
|
50
|
-
}), (e) =>
|
|
53
|
+
text: A("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
|
|
54
|
+
}), (e) => K({
|
|
51
55
|
tone: "error",
|
|
52
|
-
text: w(e,
|
|
56
|
+
text: w(e, A("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
|
|
53
57
|
}))), [
|
|
54
|
-
|
|
58
|
+
R,
|
|
55
59
|
d,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
]),
|
|
59
|
-
|
|
60
|
+
X,
|
|
61
|
+
A
|
|
62
|
+
]), le = f((e) => (W(null), X(() => R.createLinkedCopy(d, e), () => {
|
|
63
|
+
H(!1), K({
|
|
60
64
|
tone: "ok",
|
|
61
|
-
text:
|
|
65
|
+
text: A("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
|
|
62
66
|
});
|
|
63
|
-
}, (e) =>
|
|
64
|
-
|
|
67
|
+
}, (e) => W(w(e, A("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
|
|
68
|
+
R,
|
|
65
69
|
d,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
]), $ = f((e) => (
|
|
70
|
+
X,
|
|
71
|
+
A
|
|
72
|
+
]), $ = f((e) => (K(null), X(() => R.previewPush(d, e), (t) => B({
|
|
69
73
|
phase: "preview",
|
|
70
74
|
scope: e,
|
|
71
75
|
result: t
|
|
72
|
-
}), (e) =>
|
|
76
|
+
}), (e) => K({
|
|
73
77
|
tone: "error",
|
|
74
|
-
text: w(e,
|
|
78
|
+
text: w(e, A("bigconsole.fleet.error.preview", "The preview could not be made."))
|
|
75
79
|
}))), [
|
|
76
|
-
|
|
80
|
+
R,
|
|
77
81
|
d,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
]),
|
|
82
|
+
X,
|
|
83
|
+
A
|
|
84
|
+
]), ue = f((e) => (K(null), X(() => R.push(d, e), (e) => B({
|
|
81
85
|
phase: "done",
|
|
82
86
|
result: e
|
|
83
|
-
}), (e) =>
|
|
87
|
+
}), (e) => K({
|
|
84
88
|
tone: "error",
|
|
85
|
-
text: w(e,
|
|
89
|
+
text: w(e, A("bigconsole.fleet.error.push", "The push could not be made."))
|
|
86
90
|
}))), [
|
|
87
|
-
|
|
91
|
+
R,
|
|
88
92
|
d,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]),
|
|
93
|
+
X,
|
|
94
|
+
A
|
|
95
|
+
]), de = (e) => /* @__PURE__ */ x("span", {
|
|
92
96
|
className: "flex flex-wrap items-center gap-1",
|
|
93
97
|
children: [
|
|
94
98
|
e.status === "PENDING" && /* @__PURE__ */ b("span", {
|
|
95
99
|
"data-testid": "fleet-child-pending",
|
|
96
100
|
style: C,
|
|
97
|
-
children:
|
|
101
|
+
children: A("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
|
|
98
102
|
}),
|
|
99
103
|
e.behindMaster && /* @__PURE__ */ b("span", {
|
|
100
104
|
"data-testid": "fleet-child-behind",
|
|
101
105
|
style: C,
|
|
102
|
-
children: e.missingWidgetCount ?
|
|
106
|
+
children: e.missingWidgetCount ? A("bigconsole.fleet.children.behindCount", "Behind · {{count}} widgets missing", { count: e.missingWidgetCount }) : A("bigconsole.fleet.children.behind", "Behind the master")
|
|
103
107
|
}),
|
|
104
108
|
e.openFlagCount > 0 && /* @__PURE__ */ b("span", {
|
|
105
109
|
"data-testid": "fleet-child-flags",
|
|
106
110
|
style: C,
|
|
107
|
-
children:
|
|
111
|
+
children: A("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
|
|
108
112
|
}),
|
|
109
113
|
e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ b("span", {
|
|
110
114
|
style: {
|
|
111
115
|
...S,
|
|
112
116
|
color: "var(--color-status-success-text)"
|
|
113
117
|
},
|
|
114
|
-
children:
|
|
118
|
+
children: A("bigconsole.fleet.children.inSync", "In sync")
|
|
115
119
|
})
|
|
116
120
|
]
|
|
117
121
|
});
|
|
118
122
|
return /* @__PURE__ */ x("section", {
|
|
119
|
-
"aria-label":
|
|
123
|
+
"aria-label": A("bigconsole.fleet.children.title", "Children"),
|
|
120
124
|
"data-testid": "fleet-children-panel",
|
|
121
125
|
className: "flex flex-col gap-form-gap",
|
|
122
126
|
children: [
|
|
@@ -130,59 +134,60 @@ var S = {
|
|
|
130
134
|
fontSize: "var(--font-size-body)",
|
|
131
135
|
fontWeight: "var(--font-weight-semibold)"
|
|
132
136
|
},
|
|
133
|
-
children: [/* @__PURE__ */ b(
|
|
137
|
+
children: [/* @__PURE__ */ b(ee, {
|
|
134
138
|
"aria-hidden": "true",
|
|
135
139
|
style: {
|
|
136
140
|
height: "var(--size-icon-sm)",
|
|
137
141
|
width: "var(--size-icon-sm)"
|
|
138
142
|
}
|
|
139
|
-
}),
|
|
143
|
+
}), A("bigconsole.fleet.children.title", "Children")]
|
|
140
144
|
}), /* @__PURE__ */ b(_, {
|
|
141
145
|
variant: "ghost",
|
|
142
146
|
size: "sm",
|
|
143
|
-
onClick:
|
|
144
|
-
"aria-label":
|
|
145
|
-
title:
|
|
147
|
+
onClick: ne,
|
|
148
|
+
"aria-label": A("bigconsole.fleet.children.close", "Close the Children panel"),
|
|
149
|
+
title: A("bigconsole.fleet.children.close", "Close the Children panel"),
|
|
146
150
|
"data-testid": "fleet-children-close",
|
|
147
|
-
children: /* @__PURE__ */ b(
|
|
151
|
+
children: /* @__PURE__ */ b(te, { style: {
|
|
148
152
|
height: "var(--size-icon-sm)",
|
|
149
153
|
width: "var(--size-icon-sm)"
|
|
150
154
|
} })
|
|
151
155
|
})]
|
|
152
156
|
}),
|
|
153
|
-
|
|
154
|
-
role:
|
|
157
|
+
G && /* @__PURE__ */ b("p", {
|
|
158
|
+
role: G.tone === "error" ? "alert" : "status",
|
|
155
159
|
"data-testid": "fleet-children-message",
|
|
156
160
|
style: {
|
|
157
161
|
margin: 0,
|
|
158
|
-
color:
|
|
162
|
+
color: G.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
|
|
159
163
|
fontSize: "var(--font-size-body-sm)"
|
|
160
164
|
},
|
|
161
|
-
children:
|
|
165
|
+
children: G.text
|
|
162
166
|
}),
|
|
163
|
-
|
|
167
|
+
M && !I && !P && /* @__PURE__ */ x("div", {
|
|
164
168
|
className: "flex items-center gap-2",
|
|
165
169
|
style: { color: "var(--color-text-secondary)" },
|
|
166
170
|
children: [/* @__PURE__ */ b(v, { style: {
|
|
167
171
|
height: "var(--size-icon-sm)",
|
|
168
172
|
width: "var(--size-icon-sm)"
|
|
169
|
-
} }),
|
|
173
|
+
} }), A("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
|
|
170
174
|
}),
|
|
171
|
-
!
|
|
175
|
+
!M && N && /* @__PURE__ */ b("p", {
|
|
172
176
|
role: "alert",
|
|
173
177
|
style: {
|
|
174
178
|
margin: 0,
|
|
175
179
|
color: "var(--color-status-error-text)"
|
|
176
180
|
},
|
|
177
|
-
children:
|
|
181
|
+
children: A("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
|
|
178
182
|
}),
|
|
179
|
-
!
|
|
183
|
+
!M && !N && F === "ACTIVE" && /* @__PURE__ */ b(l, {
|
|
180
184
|
dashboardId: d,
|
|
181
185
|
masterName: E,
|
|
182
|
-
onBoardChanged:
|
|
183
|
-
lock: J
|
|
186
|
+
onBoardChanged: D,
|
|
187
|
+
lock: J,
|
|
188
|
+
changeToken: k
|
|
184
189
|
}),
|
|
185
|
-
!
|
|
190
|
+
!M && !N && !P && /* @__PURE__ */ x("div", {
|
|
186
191
|
className: "flex flex-col gap-form-gap",
|
|
187
192
|
"data-testid": "fleet-children-not-master",
|
|
188
193
|
children: [/* @__PURE__ */ b("p", {
|
|
@@ -191,22 +196,22 @@ var S = {
|
|
|
191
196
|
color: "var(--color-text-secondary)",
|
|
192
197
|
fontSize: "var(--font-size-body-sm)"
|
|
193
198
|
},
|
|
194
|
-
children:
|
|
195
|
-
}), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(
|
|
199
|
+
children: A("bigconsole.fleet.children.notMaster", "Other boards can follow this one as linked copies once it is a master. Its own widgets stay as they are.")
|
|
200
|
+
}), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(g, {
|
|
196
201
|
permission: t.DASHBOARD_UPDATE,
|
|
197
202
|
deniedBehavior: "hide",
|
|
198
203
|
children: /* @__PURE__ */ x(_, {
|
|
199
|
-
onClick:
|
|
200
|
-
disabled:
|
|
204
|
+
onClick: Q,
|
|
205
|
+
disabled: Z,
|
|
201
206
|
"data-testid": "fleet-set-master",
|
|
202
|
-
children: [
|
|
207
|
+
children: [Z && /* @__PURE__ */ b(v, { style: {
|
|
203
208
|
height: "var(--size-icon-sm)",
|
|
204
209
|
width: "var(--size-icon-sm)"
|
|
205
|
-
} }),
|
|
210
|
+
} }), A("bigconsole.fleet.children.setMaster", "Set as master")]
|
|
206
211
|
})
|
|
207
212
|
}) })]
|
|
208
213
|
}),
|
|
209
|
-
!
|
|
214
|
+
!N && P && I && /* @__PURE__ */ x(y, { children: [
|
|
210
215
|
/* @__PURE__ */ x("p", {
|
|
211
216
|
"data-testid": "fleet-children-counts",
|
|
212
217
|
style: {
|
|
@@ -214,12 +219,12 @@ var S = {
|
|
|
214
219
|
color: "var(--color-text-secondary)",
|
|
215
220
|
fontSize: "var(--font-size-body-sm)"
|
|
216
221
|
},
|
|
217
|
-
children: [
|
|
218
|
-
total:
|
|
219
|
-
active:
|
|
220
|
-
pending:
|
|
221
|
-
behind:
|
|
222
|
-
}),
|
|
222
|
+
children: [A("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
|
|
223
|
+
total: I.total,
|
|
224
|
+
active: I.active,
|
|
225
|
+
pending: I.pending,
|
|
226
|
+
behind: I.behind
|
|
227
|
+
}), I.hiddenCount > 0 && /* @__PURE__ */ x(y, { children: [" ", A("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: I.hiddenCount })] })]
|
|
223
228
|
}),
|
|
224
229
|
/* @__PURE__ */ x("ul", {
|
|
225
230
|
className: "flex flex-col gap-1",
|
|
@@ -228,19 +233,19 @@ var S = {
|
|
|
228
233
|
margin: 0,
|
|
229
234
|
padding: 0
|
|
230
235
|
},
|
|
231
|
-
children: [
|
|
236
|
+
children: [I.children.length === 0 && I.total === 0 && /* @__PURE__ */ b("li", {
|
|
232
237
|
style: {
|
|
233
238
|
color: "var(--color-text-secondary)",
|
|
234
239
|
fontSize: "var(--font-size-body-sm)"
|
|
235
240
|
},
|
|
236
|
-
children:
|
|
237
|
-
}),
|
|
241
|
+
children: A("bigconsole.fleet.children.none", "No copies yet. Create one, or link a board from the dashboards list.")
|
|
242
|
+
}), I.children.map((e) => /* @__PURE__ */ x("li", {
|
|
238
243
|
"data-testid": "fleet-child",
|
|
239
244
|
className: "flex items-center justify-between gap-form-gap rounded-input border px-3 py-2",
|
|
240
245
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
241
246
|
children: [/* @__PURE__ */ b("button", {
|
|
242
247
|
type: "button",
|
|
243
|
-
onClick: () =>
|
|
248
|
+
onClick: () => re(e.dashboardId),
|
|
244
249
|
className: "min-w-0 truncate text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
245
250
|
style: {
|
|
246
251
|
color: "var(--color-text-primary)",
|
|
@@ -250,131 +255,131 @@ var S = {
|
|
|
250
255
|
cursor: "pointer"
|
|
251
256
|
},
|
|
252
257
|
children: e.name
|
|
253
|
-
}),
|
|
258
|
+
}), de(e)]
|
|
254
259
|
}, e.dashboardId))]
|
|
255
260
|
}),
|
|
256
261
|
/* @__PURE__ */ x("div", {
|
|
257
262
|
className: "flex flex-wrap items-center gap-2",
|
|
258
263
|
children: [
|
|
259
|
-
/* @__PURE__ */ b(
|
|
264
|
+
/* @__PURE__ */ b(g, {
|
|
260
265
|
permission: t.DASHBOARD_CREATE,
|
|
261
266
|
deniedBehavior: "hide",
|
|
262
267
|
children: /* @__PURE__ */ b(_, {
|
|
263
268
|
variant: "outline",
|
|
264
269
|
onClick: () => {
|
|
265
|
-
|
|
270
|
+
W(null), H(!0);
|
|
266
271
|
},
|
|
267
|
-
disabled:
|
|
272
|
+
disabled: Z,
|
|
268
273
|
"data-testid": "fleet-create-copy",
|
|
269
|
-
children:
|
|
274
|
+
children: A("bigconsole.fleet.children.createCopy", "Create linked copy…")
|
|
270
275
|
})
|
|
271
276
|
}),
|
|
272
|
-
/* @__PURE__ */ b(
|
|
277
|
+
/* @__PURE__ */ b(g, {
|
|
273
278
|
permission: t.DASHBOARD_UPDATE,
|
|
274
279
|
deniedBehavior: "hide",
|
|
275
280
|
children: /* @__PURE__ */ b(_, {
|
|
276
281
|
onClick: () => $("DIRECT_COPIES"),
|
|
277
|
-
disabled:
|
|
282
|
+
disabled: Z || I.total === 0 || z.phase === "preview",
|
|
278
283
|
"data-testid": "fleet-push",
|
|
279
|
-
children:
|
|
284
|
+
children: A("bigconsole.fleet.children.push", "Push to copies…")
|
|
280
285
|
})
|
|
281
286
|
}),
|
|
282
|
-
/* @__PURE__ */ b(
|
|
287
|
+
/* @__PURE__ */ b(g, {
|
|
283
288
|
permission: t.DASHBOARD_UPDATE,
|
|
284
289
|
deniedBehavior: "hide",
|
|
285
290
|
children: /* @__PURE__ */ b(_, {
|
|
286
291
|
variant: "ghost",
|
|
287
|
-
onClick:
|
|
288
|
-
disabled:
|
|
289
|
-
title:
|
|
292
|
+
onClick: ce,
|
|
293
|
+
disabled: Z || I.total > 0,
|
|
294
|
+
title: I.total > 0 ? A("bigconsole.fleet.children.unsetBlocked", "Detach or remove every copy first.") : void 0,
|
|
290
295
|
"data-testid": "fleet-unset-master",
|
|
291
|
-
children:
|
|
296
|
+
children: A("bigconsole.fleet.children.unsetMaster", "Stop being a master")
|
|
292
297
|
})
|
|
293
298
|
})
|
|
294
299
|
]
|
|
295
300
|
})
|
|
296
301
|
] }),
|
|
297
|
-
|
|
302
|
+
z.phase === "preview" && /* @__PURE__ */ x("div", {
|
|
298
303
|
className: "flex flex-col gap-form-gap rounded-input border p-3",
|
|
299
304
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
300
305
|
"data-testid": "fleet-push-preview",
|
|
301
306
|
children: [
|
|
302
307
|
/* @__PURE__ */ b("strong", {
|
|
303
308
|
style: { color: "var(--color-text-primary)" },
|
|
304
|
-
children:
|
|
309
|
+
children: A("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
|
|
305
310
|
}),
|
|
306
311
|
/* @__PURE__ */ b("div", {
|
|
307
312
|
role: "radiogroup",
|
|
308
|
-
"aria-label":
|
|
313
|
+
"aria-label": A("bigconsole.fleet.push.scopeLabel", "How far to push"),
|
|
309
314
|
className: "flex flex-wrap gap-2",
|
|
310
315
|
children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */ b("button", {
|
|
311
316
|
type: "button",
|
|
312
317
|
role: "radio",
|
|
313
|
-
"aria-checked":
|
|
314
|
-
disabled:
|
|
315
|
-
onClick: () =>
|
|
318
|
+
"aria-checked": z.scope === e,
|
|
319
|
+
disabled: Z,
|
|
320
|
+
onClick: () => z.scope !== e && $(e),
|
|
316
321
|
className: "rounded-input border px-3 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
317
322
|
style: {
|
|
318
|
-
borderColor:
|
|
319
|
-
backgroundColor:
|
|
323
|
+
borderColor: z.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
|
|
324
|
+
backgroundColor: z.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
|
|
320
325
|
color: "var(--color-text-primary)"
|
|
321
326
|
},
|
|
322
327
|
"data-testid": `fleet-push-scope-${e}`,
|
|
323
|
-
children: e === "DIRECT_COPIES" ?
|
|
328
|
+
children: e === "DIRECT_COPIES" ? A("bigconsole.fleet.push.scopeDirect", "Direct copies") : A("bigconsole.fleet.push.scopeAll", "Copies of copies too")
|
|
324
329
|
}, e))
|
|
325
330
|
}),
|
|
326
|
-
/* @__PURE__ */ b(u, { result:
|
|
327
|
-
s(
|
|
331
|
+
/* @__PURE__ */ b(u, { result: z.result }),
|
|
332
|
+
s(z.result) && /* @__PURE__ */ b("p", {
|
|
328
333
|
style: {
|
|
329
334
|
margin: 0,
|
|
330
335
|
color: "var(--color-text-secondary)",
|
|
331
336
|
fontSize: "var(--font-size-body-sm)"
|
|
332
337
|
},
|
|
333
|
-
children:
|
|
338
|
+
children: A("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
|
|
334
339
|
}),
|
|
335
340
|
/* @__PURE__ */ x("div", {
|
|
336
341
|
className: "flex gap-2",
|
|
337
342
|
children: [/* @__PURE__ */ x(_, {
|
|
338
|
-
onClick: () =>
|
|
339
|
-
disabled:
|
|
343
|
+
onClick: () => ue(z.scope),
|
|
344
|
+
disabled: Z || s(z.result),
|
|
340
345
|
"data-testid": "fleet-push-confirm",
|
|
341
|
-
children: [
|
|
346
|
+
children: [Z && /* @__PURE__ */ b(v, { style: {
|
|
342
347
|
height: "var(--size-icon-sm)",
|
|
343
348
|
width: "var(--size-icon-sm)"
|
|
344
|
-
} }),
|
|
349
|
+
} }), A("bigconsole.fleet.push.confirm", "Push now")]
|
|
345
350
|
}), /* @__PURE__ */ b(_, {
|
|
346
351
|
variant: "outline",
|
|
347
|
-
onClick: () =>
|
|
348
|
-
disabled:
|
|
349
|
-
children:
|
|
352
|
+
onClick: () => B({ phase: "idle" }),
|
|
353
|
+
disabled: Z,
|
|
354
|
+
children: A("bigconsole.fleet.link.cancel", "Cancel")
|
|
350
355
|
})]
|
|
351
356
|
})
|
|
352
357
|
]
|
|
353
358
|
}),
|
|
354
|
-
|
|
359
|
+
z.phase === "done" && /* @__PURE__ */ x("div", {
|
|
355
360
|
className: "flex flex-col gap-form-gap rounded-input border p-3",
|
|
356
361
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
357
362
|
"data-testid": "fleet-push-done",
|
|
358
363
|
children: [
|
|
359
364
|
/* @__PURE__ */ b("strong", {
|
|
360
365
|
style: { color: "var(--color-text-primary)" },
|
|
361
|
-
children:
|
|
366
|
+
children: A("bigconsole.fleet.push.doneTitle", "Pushed")
|
|
362
367
|
}),
|
|
363
|
-
/* @__PURE__ */ b(u, { result:
|
|
368
|
+
/* @__PURE__ */ b(u, { result: z.result }),
|
|
364
369
|
/* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(_, {
|
|
365
370
|
variant: "outline",
|
|
366
|
-
onClick: () =>
|
|
367
|
-
children:
|
|
371
|
+
onClick: () => B({ phase: "idle" }),
|
|
372
|
+
children: A("bigconsole.fleet.push.done", "Done")
|
|
368
373
|
}) })
|
|
369
374
|
]
|
|
370
375
|
}),
|
|
371
376
|
/* @__PURE__ */ b(c, {
|
|
372
|
-
isOpen:
|
|
377
|
+
isOpen: V,
|
|
373
378
|
masterName: T,
|
|
374
|
-
busy:
|
|
375
|
-
error:
|
|
376
|
-
onClose: () =>
|
|
377
|
-
onCreate:
|
|
379
|
+
busy: Z,
|
|
380
|
+
error: U,
|
|
381
|
+
onClose: () => H(!1),
|
|
382
|
+
onCreate: le
|
|
378
383
|
})
|
|
379
384
|
]
|
|
380
385
|
});
|
|
@@ -8,6 +8,11 @@ export interface FleetCopySectionProps {
|
|
|
8
8
|
onBoardChanged?: () => Promise<unknown> | void;
|
|
9
9
|
/** Shared with the master controls of the same panel, so one action holds the buttons of both. */
|
|
10
10
|
lock?: ActionLock;
|
|
11
|
+
/**
|
|
12
|
+
* Changes when something outside the panel changed this board's widgets (a widget restored or promoted from its
|
|
13
|
+
* menu), so the flags are read again instead of showing one that is already settled.
|
|
14
|
+
*/
|
|
15
|
+
changeToken?: number;
|
|
11
16
|
}
|
|
12
17
|
export declare const FleetCopySection: FC<FleetCopySectionProps>;
|
|
13
18
|
export default FleetCopySection;
|