mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
feat: move step-ca into a plugin (C4)
This commit is contained in:
1 parent
98d367d7e2
commit
b027717c46
128 files changed
+3805
-1781
No files matched your search
@@ -18,13 +18,6 @@ type GeneralSettingsSectionProps = {
|
||||
handleToggleAnalytics: () => void;
|
||||
notificationPrivateEndpoints: string[];
|
||||
onSaveNotificationPrivateEndpoints: (hosts: string[]) => void;
|
||||
stepCaPrivateEndpoints: string[];
|
||||
onSaveStepCaPrivateEndpoints: (hosts: string[]) => void;
|
||||
stepCaSettings: { caUrl: string; fingerprint: string; provisioner: string };
|
||||
setStepCaSettings: Dispatch<
|
||||
SetStateAction<{ caUrl: string; fingerprint: string; provisioner: string }>
|
||||
>;
|
||||
handleSaveStepCaSettings: () => void;
|
||||
allowRegistration: boolean;
|
||||
handleToggleRegistration: () => void;
|
||||
allowPasswordLogin: boolean;
|
||||
@@ -57,11 +50,6 @@ export function AdminGeneralSettingsSection({
|
||||
handleToggleAnalytics,
|
||||
notificationPrivateEndpoints,
|
||||
onSaveNotificationPrivateEndpoints,
|
||||
stepCaPrivateEndpoints,
|
||||
onSaveStepCaPrivateEndpoints,
|
||||
stepCaSettings,
|
||||
setStepCaSettings,
|
||||
handleSaveStepCaSettings,
|
||||
allowRegistration,
|
||||
handleToggleRegistration,
|
||||
allowPasswordLogin,
|
||||
@@ -130,73 +118,6 @@ export function AdminGeneralSettingsSection({
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1.5 py-2">
|
||||
<span className="text-xs font-medium">
|
||||
{t("admin.stepCaPrivateEndpoints")}
|
||||
</span>
|
||||
<span className="text-[11px] leading-snug text-muted-foreground">
|
||||
{t("admin.stepCaPrivateEndpointsDesc")}
|
||||
</span>
|
||||
<Input
|
||||
className="rounded-none"
|
||||
defaultValue={stepCaPrivateEndpoints.join(", ")}
|
||||
placeholder="ca.internal, sso.internal"
|
||||
onBlur={(event) =>
|
||||
onSaveStepCaPrivateEndpoints(
|
||||
event.target.value
|
||||
.split(",")
|
||||
.map((entry) => entry.trim())
|
||||
.filter(Boolean),
|
||||
)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-2 border-t border-border pt-3 mt-2">
|
||||
<span className="text-[10px] font-bold uppercase tracking-widest text-muted-foreground">
|
||||
{t("admin.stepCa")}
|
||||
</span>
|
||||
<span className="text-[11px] leading-snug text-muted-foreground">
|
||||
{t("admin.stepCaDesc")}
|
||||
</span>
|
||||
<Input
|
||||
className="rounded-none"
|
||||
placeholder="https://ca.internal:9000"
|
||||
value={stepCaSettings.caUrl}
|
||||
onChange={(e) =>
|
||||
setStepCaSettings((p) => ({ ...p, caUrl: e.target.value }))
|
||||
}
|
||||
/>
|
||||
<Input
|
||||
className="rounded-none font-mono text-xs"
|
||||
placeholder={t("admin.stepCaFingerprint")}
|
||||
value={stepCaSettings.fingerprint}
|
||||
onChange={(e) =>
|
||||
setStepCaSettings((p) => ({ ...p, fingerprint: e.target.value }))
|
||||
}
|
||||
/>
|
||||
<div className="flex items-center gap-2">
|
||||
<Input
|
||||
className="rounded-none"
|
||||
placeholder={t("admin.stepCaProvisioner")}
|
||||
value={stepCaSettings.provisioner}
|
||||
onChange={(e) =>
|
||||
setStepCaSettings((p) => ({
|
||||
...p,
|
||||
provisioner: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="text-xs border-accent-brand/40 text-accent-brand hover:bg-accent-brand/10 hover:text-accent-brand h-7"
|
||||
onClick={handleSaveStepCaSettings}
|
||||
>
|
||||
{t("common.save")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="border-t border-border pt-3 mt-2">
|
||||
<SettingRow
|
||||
label={t("admin.allowRegistration")}
|
||||
|
||||
Reference in new issue
Block a user