🚧 org settings form

This commit is contained in:
Fred KISSIE
2025-12-15 23:18:28 +01:00
parent 5a0a8893e8
commit 9125a7bccb
2 changed files with 261 additions and 243 deletions

View File

@@ -1853,6 +1853,8 @@
"enableTwoFactorAuthentication": "Enable two-factor authentication",
"completeSecuritySteps": "Complete Security Steps",
"securitySettings": "Security Settings",
"dangerSection": "Danger section",
"dangerSectionDescription": "Delete organization alongside all its sites, clients, resources, etc...",
"securitySettingsDescription": "Configure security policies for the organization",
"requireTwoFactorForAllUsers": "Require Two-Factor Authentication for All Users",
"requireTwoFactorDescription": "When enabled, all internal users in this organization must have two-factor authentication enabled to access the organization.",
@@ -2063,7 +2065,7 @@
"request": "Request",
"requests": "Requests",
"logs": "Logs",
"logsSettingsDescription": "Monitor logs collected from this orginization",
"logsSettingsDescription": "Monitor logs collected from this organization",
"searchLogs": "Search logs...",
"action": "Action",
"actor": "Actor",

View File

@@ -368,9 +368,9 @@ export default function GeneralPage() {
/>
</SettingsSectionForm>
</SettingsSectionBody>
</SettingsSection>
<SettingsSection>
<hr className="my-12 max-w-xl" />
<SettingsSectionHeader>
<SettingsSectionTitle>
{t("logRetention")}
@@ -587,10 +587,10 @@ export default function GeneralPage() {
)}
</SettingsSectionForm>
</SettingsSectionBody>
</SettingsSection>
{build !== "oss" && (
<SettingsSection>
<>
<hr className="my-12 max-w-xl" />
<SettingsSectionHeader>
<SettingsSectionTitle>
{t("securitySettings")}
@@ -600,7 +600,7 @@ export default function GeneralPage() {
</SettingsSectionDescription>
</SettingsSectionHeader>
<SettingsSectionBody>
<SettingsSectionForm>
<SettingsSectionForm className="mb-4">
<SecurityFeaturesAlert />
<FormField
control={form.control}
@@ -660,7 +660,9 @@ export default function GeneralPage() {
return (
<FormItem className="col-span-2">
<FormLabel>
{t("maxSessionLength")}
{t(
"maxSessionLength"
)}
</FormLabel>
<FormControl>
<Select
@@ -828,25 +830,15 @@ export default function GeneralPage() {
/>
</SettingsSectionForm>
</SettingsSectionBody>
</SettingsSection>
</>
)}
</SettingsSection>
</form>
</Form>
{build === "saas" && <AuthPageSettings ref={authPageSettingsRef} />}
<div className="flex justify-end gap-2">
{build !== "saas" && (
<Button
variant="destructive"
onClick={() => setIsDeleteModalOpen(true)}
className="flex items-center gap-2"
loading={loadingDelete}
disabled={loadingDelete}
>
{t("orgDelete")}
</Button>
)}
<Button
type="submit"
form="org-settings-form"
@@ -856,6 +848,30 @@ export default function GeneralPage() {
{t("saveSettings")}
</Button>
</div>
{build !== "saas" && (
<SettingsSection>
<SettingsSectionHeader>
<SettingsSectionTitle>
{t("dangerSection")}
</SettingsSectionTitle>
<SettingsSectionDescription>
{t("dangerSectionDescription")}
</SettingsSectionDescription>
</SettingsSectionHeader>
<div className="flex justify-start gap-2">
<Button
variant="destructive"
onClick={() => setIsDeleteModalOpen(true)}
className="flex items-center gap-2"
loading={loadingDelete}
disabled={loadingDelete}
>
{t("orgDelete")}
</Button>
</div>
</SettingsSection>
)}
</SettingsContainer>
);
}