@danxbot/ui 20.4.1 → 20.4.2
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/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51305,38 +51305,38 @@ function GQ({
|
|
|
51305
51305
|
onDeny: a,
|
|
51306
51306
|
className: c
|
|
51307
51307
|
}) {
|
|
51308
|
-
const l = new Set(o), d = s !== void 0 && G0(s, n, l) ? s : Z9(n, l),
|
|
51308
|
+
const l = new Set(o), d = s !== void 0 && G0(s, n, l), p = d ? s : Z9(n, l), f = n.find((C) => C.id === p), [h, m] = re(""), g = G0(h, n, l) ? h : p, { busy: x, error: b, run: y } = $T(), v = t === "pending";
|
|
51309
51309
|
return /* @__PURE__ */ R("div", { className: B("flex flex-col gap-5", c), children: [
|
|
51310
51310
|
/* @__PURE__ */ u(DT, { title: "Access request", state: t }),
|
|
51311
|
-
/* @__PURE__ */ u(cl, { entries: i7(e,
|
|
51312
|
-
|
|
51311
|
+
/* @__PURE__ */ u(cl, { entries: i7(e, v), className: "divide-y divide-border-subtle" }),
|
|
51312
|
+
v ? /* @__PURE__ */ R(qe, { children: [
|
|
51313
51313
|
/* @__PURE__ */ u(_T, { code: e.confirmCode }),
|
|
51314
51314
|
/* @__PURE__ */ R(Ft, { tone: "warning", title: "Approve only if you started this", children: [
|
|
51315
51315
|
"Approving lets ",
|
|
51316
51316
|
e.kind === "worker" ? "this worker" : "this session",
|
|
51317
51317
|
" act as you with the role you pick, for as long as it keeps being used. If the code does not match, or you did not ask for this, deny it."
|
|
51318
51318
|
] }),
|
|
51319
|
-
/* @__PURE__ */ u(FT, { error:
|
|
51320
|
-
|
|
51319
|
+
/* @__PURE__ */ u(FT, { error: b }),
|
|
51320
|
+
f === void 0 ? /* @__PURE__ */ u(Ft, { tone: "danger", title: "No role available", children: "Every role holds a permission you don't have, so you can't approve this request. You can still deny it." }) : /* @__PURE__ */ u(
|
|
51321
51321
|
OT,
|
|
51322
51322
|
{
|
|
51323
51323
|
roles: n,
|
|
51324
51324
|
permissions: r,
|
|
51325
51325
|
ownPermissionKeys: o,
|
|
51326
|
-
value:
|
|
51327
|
-
onValueChange:
|
|
51328
|
-
description:
|
|
51329
|
-
disabled:
|
|
51326
|
+
value: g,
|
|
51327
|
+
onValueChange: m,
|
|
51328
|
+
description: `The key can do what this role can, never more than you can. ${d ? `${f.label}, the default, is chosen for you.` : `The narrowest allowed role, ${f.label}, is chosen for you.`}`,
|
|
51329
|
+
disabled: x !== null
|
|
51330
51330
|
}
|
|
51331
51331
|
),
|
|
51332
51332
|
/* @__PURE__ */ u(
|
|
51333
51333
|
VT,
|
|
51334
51334
|
{
|
|
51335
|
-
busy:
|
|
51336
|
-
run:
|
|
51337
|
-
onApprove: () => i(
|
|
51335
|
+
busy: x,
|
|
51336
|
+
run: y,
|
|
51337
|
+
onApprove: () => i(g),
|
|
51338
51338
|
onDeny: a,
|
|
51339
|
-
approveDisabled:
|
|
51339
|
+
approveDisabled: g === ""
|
|
51340
51340
|
}
|
|
51341
51341
|
)
|
|
51342
51342
|
] }) : /* @__PURE__ */ u(a7, { state: t, request: e })
|