From 3a68bf6525d2db9a08a69291c57ee588dbf6d0ca Mon Sep 17 00:00:00 2001
From: andrewwallacespeckle
@@ -201,10 +173,7 @@ const { provider, loading, isSsoAuthenticated } = useWorkspaceSsoStatus({ workspaceSlug: computed(() => props.workspace.slug) }) -// Replace old state variables with new switch states -const isConfigurationMode = ref(false) -const isSsoEnabled = ref(true) // Default to enabled when provider exists -const isEditing = ref(false) +const isFormVisible = ref(false) const showActionsMenu = ref(false) const isDeleteDialogOpen = ref(false) @@ -241,30 +210,22 @@ const onButtonClick = () => { showActionsMenu.value = !showActionsMenu.value } -// Handle SSO enable/disable toggle for existing providers -const handleSsoToggle = (enabled: boolean) => { - logger.info('SSO toggle:', enabled) - // TODO: Implement actual SSO enable/disable logic here -} - -// Handle configuration mode toggle for new SSO setup const handleConfigurationToggle = (enabled: boolean) => { - isConfigurationMode.value = enabled + isFormVisible.value = enabled if (!enabled) { - // Reset any error state when turning off configuration mode errorProviderInfo.value = undefined } } const handleFormSubmit = (data: SsoFormValues) => { logger.info('Form submitted:', data) - isEditing.value = false - isConfigurationMode.value = false + isFormVisible.value = false + errorProviderInfo.value = undefined } const handleCancel = () => { - isConfigurationMode.value = false - isEditing.value = false + isFormVisible.value = false + errorProviderInfo.value = undefined } const redirectUrl = computed(() => { @@ -297,6 +258,8 @@ onMounted(() => { title: 'SSO Configuration Successful', description: 'Your SSO settings have been successfully configured.' }) + isFormVisible.value = false + errorProviderInfo.value = undefined } else if (ssoValidationSuccess === 'false' || ssoError) { triggerNotification({ type: ToastNotificationType.Danger, @@ -314,7 +277,7 @@ onMounted(() => { clientId, issuerUrl } - isConfigurationMode.value = true + isFormVisible.value = true } // Clean up URL params @@ -329,11 +292,4 @@ onMounted(() => { } }) }) - -// Reset configuration mode on page refresh if no provider exists -watchEffect(() => { - if (!provider.value && !errorProviderInfo.value) { - isConfigurationMode.value = false - } -}) diff --git a/packages/frontend-2/pages/settings/workspaces/[slug]/security.vue b/packages/frontend-2/pages/settings/workspaces/[slug]/security.vue index 13fe41782..82164e326 100644 --- a/packages/frontend-2/pages/settings/workspaces/[slug]/security.vue +++ b/packages/frontend-2/pages/settings/workspaces/[slug]/security.vue @@ -5,7 +5,7 @@ title="Security" text="Manage verified workspace domains and associated features." /> -