From 485ac8c3c65944315d3063afb5e1b275f9119e2d Mon Sep 17 00:00:00 2001 From: Joel Jacob Stephen <70131076+JoelJacobStephen@users.noreply.github.com> Date: Thu, 24 Apr 2025 09:54:32 -0500 Subject: [PATCH] refactor(sh-admin): dashboard settings page redesign (#5014) --- packages/hoppscotch-sh-admin/locales/en.json | 25 +++- .../hoppscotch-sh-admin/src/components.d.ts | 3 + .../settings/AuthConfigurations.vue | 114 ++++++++++++++++++ .../components/settings/Configurations.vue | 24 ---- ...er.vue => OAuthProviderConfigurations.vue} | 2 +- .../components/settings/SmtpConfiguration.vue | 9 -- .../src/pages/settings.vue | 26 ++-- 7 files changed, 160 insertions(+), 43 deletions(-) create mode 100644 packages/hoppscotch-sh-admin/src/components/settings/AuthConfigurations.vue delete mode 100644 packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue rename packages/hoppscotch-sh-admin/src/components/settings/{AuthProvider.vue => OAuthProviderConfigurations.vue} (99%) diff --git a/packages/hoppscotch-sh-admin/locales/en.json b/packages/hoppscotch-sh-admin/locales/en.json index 03aa1d86..9201c670 100644 --- a/packages/hoppscotch-sh-admin/locales/en.json +++ b/packages/hoppscotch-sh-admin/locales/en.json @@ -17,16 +17,31 @@ "open_navigation": "Open Navigation", "read_documentation": "Read Documentation" }, + "auth": { + "email_auth": "Email Authentication", + "email_auth_description": "Enable or disable email-based authentication for your users.", + "email_auth_enabled": "Email authentication is enabled and ready to use.", + "email_auth_smtp_note": "To use email-based authentication, you need to enable and configure SMTP in the SMTP tab first.", + "enable_email_auth": "Enable Email Authentication", + "smtp_required": "SMTP must be enabled and configured to use email based authentication." + }, "configs": { "auth_providers": { + "auth_provider_config": "Authentication Configurations", + "auth_provider_description": "Set up authentication methods for your Hoppscotch instance using OAuth or Email.", "callback_url": "CALLBACK URL", "client_id": "CLIENT ID", "client_secret": "CLIENT SECRET", "description": "Configure authentication providers for your server", + "email": "Email", + "github_enterprise": "Enable Github Enterprise", + "oauth": "OAuth", + "oauth_providers": "OAuth Providers", "provider_not_specified": "Please enable at least one authentication provider", "scope": "SCOPE", + "sso": "SSO", "tenant": "TENANT", - "title": "Authentication Providers", + "title": "OAuth Providers", "update_failure": "Failed to update authentication provider configurations!!" }, "confirm_changes": "Hoppscotch server must restart to reflect the new changes. Confirm changes made to the server configurations?", @@ -83,6 +98,14 @@ "title": "Server is restarting" }, "save_changes": "Save Changes", + "tabs": { + "auth": "Authentication", + "activity": "Activity", + "infra_tokens": "Infra Tokens", + "smtp": "SMTP", + "miscellaneous": "Miscellaneous", + "reset": "Reset Configurations" + }, "title": "Configurations", "update_failure": "Failed to update server configurations" }, diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.ts index 3bfbf880..7493665f 100644 --- a/packages/hoppscotch-sh-admin/src/components.d.ts +++ b/packages/hoppscotch-sh-admin/src/components.d.ts @@ -42,10 +42,13 @@ declare module 'vue' { IconLucideInfo: typeof import('~icons/lucide/info')['default'] IconLucideSearch: typeof import('~icons/lucide/search')['default'] IconLucideUser: typeof import('~icons/lucide/user')['default'] + SettingsAuthConfiguration: typeof import('./components/settings/AuthConfiguration.vue')['default'] + SettingsAuthConfigurations: typeof import('./components/settings/AuthConfigurations.vue')['default'] SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default'] SettingsConfigurations: typeof import('./components/settings/Configurations.vue')['default'] SettingsDataSharing: typeof import('./components/settings/DataSharing.vue')['default'] SettingsHistoryConfiguration: typeof import('./components/settings/HistoryConfiguration.vue')['default'] + SettingsOAuthProviderConfigurations: typeof import('./components/settings/OAuthProviderConfigurations.vue')['default'] SettingsReset: typeof import('./components/settings/Reset.vue')['default'] SettingsServerRestart: typeof import('./components/settings/ServerRestart.vue')['default'] SettingsSmtpConfiguration: typeof import('./components/settings/SmtpConfiguration.vue')['default'] diff --git a/packages/hoppscotch-sh-admin/src/components/settings/AuthConfigurations.vue b/packages/hoppscotch-sh-admin/src/components/settings/AuthConfigurations.vue new file mode 100644 index 00000000..2eaa15c1 --- /dev/null +++ b/packages/hoppscotch-sh-admin/src/components/settings/AuthConfigurations.vue @@ -0,0 +1,114 @@ + + + diff --git a/packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue b/packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue deleted file mode 100644 index 3bcc7e47..00000000 --- a/packages/hoppscotch-sh-admin/src/components/settings/Configurations.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/packages/hoppscotch-sh-admin/src/components/settings/AuthProvider.vue b/packages/hoppscotch-sh-admin/src/components/settings/OAuthProviderConfigurations.vue similarity index 99% rename from packages/hoppscotch-sh-admin/src/components/settings/AuthProvider.vue rename to packages/hoppscotch-sh-admin/src/components/settings/OAuthProviderConfigurations.vue index 98c885c1..e1f0a797 100644 --- a/packages/hoppscotch-sh-admin/src/components/settings/AuthProvider.vue +++ b/packages/hoppscotch-sh-admin/src/components/settings/OAuthProviderConfigurations.vue @@ -1,5 +1,5 @@