mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-01 08:16:44 +00:00
♻️ refactor
This commit is contained in:
@@ -1746,7 +1746,7 @@
|
|||||||
"brandingResourceTitle": "Title for Resource Auth Page",
|
"brandingResourceTitle": "Title for Resource Auth Page",
|
||||||
"brandingResourceSubtitle": "Subtitle for Resource Auth Page",
|
"brandingResourceSubtitle": "Subtitle for Resource Auth Page",
|
||||||
"brandingResourceDescription": "{resourceName} will be replaced with the organization's name",
|
"brandingResourceDescription": "{resourceName} will be replaced with the organization's name",
|
||||||
"saveAuthPage": "Save Auth Page",
|
"saveAuthPageDomain": "Save Domain",
|
||||||
"saveAuthPageBranding": "Save Branding",
|
"saveAuthPageBranding": "Save Branding",
|
||||||
"removeAuthPageBranding": "Remove Branding",
|
"removeAuthPageBranding": "Remove Branding",
|
||||||
"noDomainSet": "No domain set",
|
"noDomainSet": "No domain set",
|
||||||
|
|||||||
@@ -68,8 +68,6 @@ const AuthPageFormSchema = z.object({
|
|||||||
authPageSubdomain: z.string().optional()
|
authPageSubdomain: z.string().optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
type AuthPageFormValues = z.infer<typeof AuthPageFormSchema>;
|
|
||||||
|
|
||||||
interface AuthPageSettingsProps {
|
interface AuthPageSettingsProps {
|
||||||
onSaveSuccess?: () => void;
|
onSaveSuccess?: () => void;
|
||||||
onSaveError?: (error: any) => void;
|
onSaveError?: (error: any) => void;
|
||||||
@@ -119,18 +117,6 @@ function AuthPageSettings({
|
|||||||
mode: "onChange"
|
mode: "onChange"
|
||||||
});
|
});
|
||||||
|
|
||||||
// Expose save function to parent component
|
|
||||||
// useImperativeHandle(
|
|
||||||
// ref,
|
|
||||||
// () => ({
|
|
||||||
// saveAuthSettings: async () => {
|
|
||||||
// await form.handleSubmit(onSubmit)();
|
|
||||||
// },
|
|
||||||
// hasUnsavedChanges: () => hasUnsavedChanges
|
|
||||||
// }),
|
|
||||||
// [form, hasUnsavedChanges]
|
|
||||||
// );
|
|
||||||
|
|
||||||
// Fetch login page and domains data
|
// Fetch login page and domains data
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchDomains = async () => {
|
const fetchDomains = async () => {
|
||||||
@@ -452,7 +438,7 @@ function AuthPageSettings({
|
|||||||
loading={isSubmitting}
|
loading={isSubmitting}
|
||||||
disabled={isSubmitting || !hasUnsavedChanges}
|
disabled={isSubmitting || !hasUnsavedChanges}
|
||||||
>
|
>
|
||||||
{t("saveAuthPage")}
|
{t("saveAuthPageDomain")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
|
|||||||
Reference in New Issue
Block a user