dsh-model-switch 0.4.75 → 0.4.76
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/CHANGELOG.md +7 -0
- package/lib/client.js +178 -180
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -3296,202 +3296,200 @@ window.__ModuleLoader__.load({
|
|
|
3296
3296
|
}),
|
|
3297
3297
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3298
3298
|
className: ModelSwitchSettings_module_css_default.group,
|
|
3299
|
-
children: [
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
title: props.t("reviewAllowlist"),
|
|
3304
|
-
summary: allowlistSummaryText,
|
|
3305
|
-
hint: props.t("reviewAllowlistHelp"),
|
|
3306
|
-
icon: "autoReview",
|
|
3307
|
-
open: open === "allowlist",
|
|
3308
|
-
onToggle: () => {
|
|
3309
|
-
toggle("allowlist");
|
|
3310
|
-
},
|
|
3311
|
-
...allowlistEnabled ? { badge: props.t("reviewAllowlistBadge") } : {},
|
|
3312
|
-
trailing: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
3313
|
-
checked: allowlistEnabled,
|
|
3314
|
-
disabled: busy !== void 0 || !allowlistWritable,
|
|
3315
|
-
label: props.t("reviewAllowlist"),
|
|
3316
|
-
onChange: (value) => {
|
|
3317
|
-
persistAllowlist({
|
|
3318
|
-
enabled: value,
|
|
3319
|
-
tools: allowlistTools
|
|
3320
|
-
});
|
|
3321
|
-
}
|
|
3299
|
+
children: [
|
|
3300
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
3301
|
+
className: ModelSwitchSettings_module_css_default.groupLabel,
|
|
3302
|
+
children: props.t("reviewAllowlistGroup")
|
|
3322
3303
|
}),
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
disabled: busy !== void 0 || props.scanTools === void 0 || catalogState === "loading",
|
|
3344
|
-
onClick: scanAllowlistTools,
|
|
3345
|
-
children: catalogState === "loading" ? props.t("reviewAllowlistScanning") : props.t("reviewAllowlistScan")
|
|
3346
|
-
}),
|
|
3347
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3348
|
-
type: "button",
|
|
3349
|
-
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
3350
|
-
disabled: busy !== void 0 || !allowlistWritable,
|
|
3351
|
-
onClick: () => {
|
|
3352
|
-
persistAllowlist({
|
|
3353
|
-
enabled: allowlistEnabled,
|
|
3354
|
-
tools: [...DEFAULT_READ_ONLY_TOOLS]
|
|
3355
|
-
});
|
|
3356
|
-
},
|
|
3357
|
-
children: props.t("reviewAllowlistReset")
|
|
3358
|
-
})
|
|
3359
|
-
]
|
|
3360
|
-
}),
|
|
3361
|
-
message?.route === "allowlist" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3362
|
-
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
3363
|
-
children: message.text
|
|
3364
|
-
}) : null,
|
|
3365
|
-
reviewStatus === void 0 || reviewStatus.skippedReadOnly === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3366
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3367
|
-
children: props.t("reviewAllowlistSkipped").replace("{count}", String(reviewStatus.skippedReadOnly))
|
|
3368
|
-
}),
|
|
3369
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3370
|
-
className: ModelSwitchSettings_module_css_default.rowCard,
|
|
3371
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3372
|
-
className: ModelSwitchSettings_module_css_default.rowCopy,
|
|
3373
|
-
children: [
|
|
3374
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3375
|
-
className: ModelSwitchSettings_module_css_default.rowTitle,
|
|
3376
|
-
children: props.t("reviewOwnGate")
|
|
3377
|
-
}),
|
|
3378
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3379
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3380
|
-
children: props.t("reviewOwnGateHelp")
|
|
3381
|
-
}),
|
|
3382
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3383
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3384
|
-
children: reviewStatus === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.purgeInstalled === true ? props.t("reviewOwnGatePatched").replace("{neutered}", reviewStatus.officialGateNeutered === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.officialGateNeutered ? props.t("reviewOwnGateNeuteredYes") : props.t("reviewOwnGateNeuteredNo")) : props.t("reviewOwnGateUnavailable")
|
|
3385
|
-
})
|
|
3386
|
-
]
|
|
3387
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
3388
|
-
checked: ownGateSettingOn,
|
|
3389
|
-
disabled: busy !== void 0 || !allowlistWritable || reviewStatus?.purgeInstalled !== true,
|
|
3390
|
-
label: props.t("reviewOwnGate"),
|
|
3391
|
-
onChange: (next) => {
|
|
3392
|
-
run("allowlist", () => props.saveReviewOwnGate(next));
|
|
3393
|
-
}
|
|
3394
|
-
})]
|
|
3395
|
-
}),
|
|
3396
|
-
reviewStatus?.automode === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3397
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3398
|
-
children: props.t("reviewAutomodeLinked").replace("{route}", reviewStatus.automode.route ?? (reviewStatus.automode.routeSkipped === "user-set" ? props.t("reviewAutomodeRouteOwn") : props.t("reviewAutomodeRouteUnset"))).replace("{added}", String(reviewStatus.automode.added)).replace("{skipped}", String(reviewStatus.automode.skipped))
|
|
3304
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(RouteCard, {
|
|
3305
|
+
title: props.t("reviewAllowlist"),
|
|
3306
|
+
summary: allowlistSummaryText,
|
|
3307
|
+
hint: props.t("reviewAllowlistHelp"),
|
|
3308
|
+
icon: "autoReview",
|
|
3309
|
+
open: open === "allowlist",
|
|
3310
|
+
onToggle: () => {
|
|
3311
|
+
toggle("allowlist");
|
|
3312
|
+
},
|
|
3313
|
+
...allowlistEnabled ? { badge: props.t("reviewAllowlistBadge") } : {},
|
|
3314
|
+
trailing: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
3315
|
+
checked: allowlistEnabled,
|
|
3316
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
3317
|
+
label: props.t("reviewAllowlist"),
|
|
3318
|
+
onChange: (value) => {
|
|
3319
|
+
persistAllowlist({
|
|
3320
|
+
enabled: value,
|
|
3321
|
+
tools: allowlistTools
|
|
3322
|
+
});
|
|
3323
|
+
}
|
|
3399
3324
|
}),
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3325
|
+
children: [
|
|
3326
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3327
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3328
|
+
children: props.t("reviewAllowlistNote")
|
|
3329
|
+
}),
|
|
3330
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3331
|
+
className: ModelSwitchSettings_module_css_default.allowToolbar,
|
|
3404
3332
|
children: [
|
|
3405
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
3406
|
-
className: ModelSwitchSettings_module_css_default.
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
children: row.entry
|
|
3414
|
-
})]
|
|
3415
|
-
}),
|
|
3416
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3417
|
-
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
3418
|
-
children: [row.source.label, row.source.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3419
|
-
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
3420
|
-
children: "·"
|
|
3421
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
3422
|
-
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
3423
|
-
href: row.source.repo,
|
|
3424
|
-
target: "_blank",
|
|
3425
|
-
rel: "noreferrer",
|
|
3426
|
-
children: props.t("reviewAllowlistRepo")
|
|
3427
|
-
})] })]
|
|
3333
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3334
|
+
className: ModelSwitchSettings_module_css_default.input,
|
|
3335
|
+
type: "search",
|
|
3336
|
+
value: allowlistQuery,
|
|
3337
|
+
placeholder: props.t("reviewAllowlistSearch"),
|
|
3338
|
+
onChange: (event) => {
|
|
3339
|
+
setAllowlistQuery(event.target.value);
|
|
3340
|
+
}
|
|
3428
3341
|
}),
|
|
3429
3342
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3430
3343
|
type: "button",
|
|
3431
3344
|
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
3432
|
-
disabled: busy !== void 0 ||
|
|
3433
|
-
onClick:
|
|
3434
|
-
|
|
3435
|
-
},
|
|
3436
|
-
children: props.t("reviewAllowlistRemove")
|
|
3437
|
-
})
|
|
3438
|
-
]
|
|
3439
|
-
}, row.entry))
|
|
3440
|
-
}),
|
|
3441
|
-
allowlistIncluded.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3442
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3443
|
-
children: props.t("reviewAllowlistNone")
|
|
3444
|
-
}) : null,
|
|
3445
|
-
allowlistAvailable.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3446
|
-
className: ModelSwitchSettings_module_css_default.hint,
|
|
3447
|
-
children: props.t("reviewAllowlistAvailable")
|
|
3448
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
3449
|
-
className: ModelSwitchSettings_module_css_default.allowList,
|
|
3450
|
-
children: allowlistAvailable.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
3451
|
-
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
3452
|
-
children: [
|
|
3453
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3454
|
-
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
3455
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3456
|
-
type: "checkbox",
|
|
3457
|
-
checked: false,
|
|
3458
|
-
readOnly: true
|
|
3459
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
3460
|
-
className: ModelSwitchSettings_module_css_default.allowName,
|
|
3461
|
-
children: row.name
|
|
3462
|
-
})]
|
|
3463
|
-
}),
|
|
3464
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3465
|
-
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
3466
|
-
children: [row.sourceLabel, row.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3467
|
-
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
3468
|
-
children: "·"
|
|
3469
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
3470
|
-
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
3471
|
-
href: row.repo,
|
|
3472
|
-
target: "_blank",
|
|
3473
|
-
rel: "noreferrer",
|
|
3474
|
-
children: props.t("reviewAllowlistRepo")
|
|
3475
|
-
})] })]
|
|
3345
|
+
disabled: busy !== void 0 || props.scanTools === void 0 || catalogState === "loading",
|
|
3346
|
+
onClick: scanAllowlistTools,
|
|
3347
|
+
children: catalogState === "loading" ? props.t("reviewAllowlistScanning") : props.t("reviewAllowlistScan")
|
|
3476
3348
|
}),
|
|
3477
3349
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3478
3350
|
type: "button",
|
|
3479
3351
|
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
3480
3352
|
disabled: busy !== void 0 || !allowlistWritable,
|
|
3481
3353
|
onClick: () => {
|
|
3482
|
-
|
|
3354
|
+
persistAllowlist({
|
|
3355
|
+
enabled: allowlistEnabled,
|
|
3356
|
+
tools: [...DEFAULT_READ_ONLY_TOOLS]
|
|
3357
|
+
});
|
|
3483
3358
|
},
|
|
3484
|
-
children: props.t("
|
|
3359
|
+
children: props.t("reviewAllowlistReset")
|
|
3485
3360
|
})
|
|
3486
3361
|
]
|
|
3487
|
-
},
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3362
|
+
}),
|
|
3363
|
+
message?.route === "allowlist" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3364
|
+
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
3365
|
+
children: message.text
|
|
3366
|
+
}) : null,
|
|
3367
|
+
reviewStatus === void 0 || reviewStatus.skippedReadOnly === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3368
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3369
|
+
children: props.t("reviewAllowlistSkipped").replace("{count}", String(reviewStatus.skippedReadOnly))
|
|
3370
|
+
}),
|
|
3371
|
+
reviewStatus?.automode === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3372
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3373
|
+
children: props.t("reviewAutomodeLinked").replace("{route}", reviewStatus.automode.route ?? (reviewStatus.automode.routeSkipped === "user-set" ? props.t("reviewAutomodeRouteOwn") : props.t("reviewAutomodeRouteUnset"))).replace("{added}", String(reviewStatus.automode.added)).replace("{skipped}", String(reviewStatus.automode.skipped))
|
|
3374
|
+
}),
|
|
3375
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
3376
|
+
className: ModelSwitchSettings_module_css_default.allowList,
|
|
3377
|
+
children: allowlistIncluded.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
3378
|
+
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
3379
|
+
children: [
|
|
3380
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3381
|
+
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
3382
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3383
|
+
type: "checkbox",
|
|
3384
|
+
checked: true,
|
|
3385
|
+
readOnly: true
|
|
3386
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
3387
|
+
className: ModelSwitchSettings_module_css_default.allowName,
|
|
3388
|
+
children: row.entry
|
|
3389
|
+
})]
|
|
3390
|
+
}),
|
|
3391
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3392
|
+
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
3393
|
+
children: [row.source.label, row.source.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3394
|
+
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
3395
|
+
children: "·"
|
|
3396
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
3397
|
+
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
3398
|
+
href: row.source.repo,
|
|
3399
|
+
target: "_blank",
|
|
3400
|
+
rel: "noreferrer",
|
|
3401
|
+
children: props.t("reviewAllowlistRepo")
|
|
3402
|
+
})] })]
|
|
3403
|
+
}),
|
|
3404
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3405
|
+
type: "button",
|
|
3406
|
+
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
3407
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
3408
|
+
onClick: () => {
|
|
3409
|
+
setAllowTool(row.entry, false);
|
|
3410
|
+
},
|
|
3411
|
+
children: props.t("reviewAllowlistRemove")
|
|
3412
|
+
})
|
|
3413
|
+
]
|
|
3414
|
+
}, row.entry))
|
|
3415
|
+
}),
|
|
3416
|
+
allowlistIncluded.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3417
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3418
|
+
children: props.t("reviewAllowlistNone")
|
|
3419
|
+
}) : null,
|
|
3420
|
+
allowlistAvailable.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3421
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3422
|
+
children: props.t("reviewAllowlistAvailable")
|
|
3423
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
3424
|
+
className: ModelSwitchSettings_module_css_default.allowList,
|
|
3425
|
+
children: allowlistAvailable.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
3426
|
+
className: ModelSwitchSettings_module_css_default.allowRow,
|
|
3427
|
+
children: [
|
|
3428
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3429
|
+
className: ModelSwitchSettings_module_css_default.allowLabel,
|
|
3430
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3431
|
+
type: "checkbox",
|
|
3432
|
+
checked: false,
|
|
3433
|
+
readOnly: true
|
|
3434
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
3435
|
+
className: ModelSwitchSettings_module_css_default.allowName,
|
|
3436
|
+
children: row.name
|
|
3437
|
+
})]
|
|
3438
|
+
}),
|
|
3439
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3440
|
+
className: ModelSwitchSettings_module_css_default.allowSource,
|
|
3441
|
+
children: [row.sourceLabel, row.repo === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3442
|
+
className: ModelSwitchSettings_module_css_default.allowDot,
|
|
3443
|
+
children: "·"
|
|
3444
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
3445
|
+
className: ModelSwitchSettings_module_css_default.allowRepo,
|
|
3446
|
+
href: row.repo,
|
|
3447
|
+
target: "_blank",
|
|
3448
|
+
rel: "noreferrer",
|
|
3449
|
+
children: props.t("reviewAllowlistRepo")
|
|
3450
|
+
})] })]
|
|
3451
|
+
}),
|
|
3452
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3453
|
+
type: "button",
|
|
3454
|
+
className: cx(ModelSwitchSettings_module_css_default.button, ModelSwitchSettings_module_css_default.secondaryButton),
|
|
3455
|
+
disabled: busy !== void 0 || !allowlistWritable,
|
|
3456
|
+
onClick: () => {
|
|
3457
|
+
setAllowTool(row.name, true);
|
|
3458
|
+
},
|
|
3459
|
+
children: props.t("reviewAllowlistAdd")
|
|
3460
|
+
})
|
|
3461
|
+
]
|
|
3462
|
+
}, row.name))
|
|
3463
|
+
})] }),
|
|
3464
|
+
catalogState === "failed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3465
|
+
className: cx(ModelSwitchSettings_module_css_default.hint, ModelSwitchSettings_module_css_default.message),
|
|
3466
|
+
children: props.t("reviewAllowlistScanFailed")
|
|
3467
|
+
}) : null
|
|
3468
|
+
]
|
|
3469
|
+
}),
|
|
3470
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RouteCard, {
|
|
3471
|
+
title: props.t("reviewOwnGate"),
|
|
3472
|
+
summary: reviewStatus === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.purgeInstalled === true ? props.t("reviewOwnGatePatched").replace("{neutered}", reviewStatus.officialGateNeutered === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.officialGateNeutered ? props.t("reviewOwnGateNeuteredYes") : props.t("reviewOwnGateNeuteredNo")) : props.t("reviewOwnGateUnavailable"),
|
|
3473
|
+
hint: props.t("reviewOwnGateHelp"),
|
|
3474
|
+
icon: "autoReview",
|
|
3475
|
+
open: open === "ownGate",
|
|
3476
|
+
onToggle: () => {
|
|
3477
|
+
toggle("ownGate");
|
|
3478
|
+
},
|
|
3479
|
+
trailing: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstantSwitch, {
|
|
3480
|
+
checked: ownGateSettingOn,
|
|
3481
|
+
disabled: busy !== void 0 || !allowlistWritable || reviewStatus?.purgeInstalled !== true,
|
|
3482
|
+
label: props.t("reviewOwnGate"),
|
|
3483
|
+
onChange: (next) => {
|
|
3484
|
+
run("allowlist", () => props.saveReviewOwnGate(next));
|
|
3485
|
+
}
|
|
3486
|
+
}),
|
|
3487
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3488
|
+
className: ModelSwitchSettings_module_css_default.hint,
|
|
3489
|
+
children: props.t("reviewOwnGatePatched").replace("{neutered}", reviewStatus === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.officialGateNeutered === void 0 ? props.t("reviewOwnGateUnknown") : reviewStatus.officialGateNeutered ? props.t("reviewOwnGateNeuteredYes") : props.t("reviewOwnGateNeuteredNo"))
|
|
3490
|
+
})
|
|
3491
|
+
})
|
|
3492
|
+
]
|
|
3495
3493
|
}),
|
|
3496
3494
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
3497
3495
|
className: ModelSwitchSettings_module_css_default.group,
|