From b5dec3258fd58bacf13436e30bf8fad6a8f24157 Mon Sep 17 00:00:00 2001 From: Maneesh Shukla Date: Fri, 31 Jan 2025 18:35:22 +0530 Subject: [PATCH] personal_settings: Restyle the profile, account & privacy settings btns. This commit restyles the profile, account and privacy settings buttons as follows: - "Preview profile": action-button-quiet-brand - Pencil for email editing: icon-button-brand - "Change your password": action-button-quiet-brand - "Deactivate account": action-button-quiet-danger - "Manage your API key": action-button-quiet-brand Fixes part of #33130. --- web/styles/settings.css | 5 +++ web/templates/components/action_button.hbs | 4 +- web/templates/components/icon_button.hbs | 4 +- web/templates/settings/account_settings.hbs | 43 +++++++++++++++------ web/templates/settings/profile_settings.hbs | 12 ++++-- 5 files changed, 50 insertions(+), 18 deletions(-) diff --git a/web/styles/settings.css b/web/styles/settings.css index eb6d0153d7..9a377ae140 100644 --- a/web/styles/settings.css +++ b/web/styles/settings.css @@ -119,6 +119,11 @@ h3, min-width: 0; } +.change-email { + display: flex; + gap: 0.5rem; +} + .admin-realm-description { height: 16em; width: 100%; diff --git a/web/templates/components/action_button.hbs b/web/templates/components/action_button.hbs index 186b64b472..f535cc3121 100644 --- a/web/templates/components/action_button.hbs +++ b/web/templates/components/action_button.hbs @@ -1,4 +1,6 @@ - diff --git a/web/templates/settings/account_settings.hbs b/web/templates/settings/account_settings.hbs index 769ae9a159..74e4292ef8 100644 --- a/web/templates/settings/account_settings.hbs +++ b/web/templates/settings/account_settings.hbs @@ -8,13 +8,20 @@ {{#if user_has_email_set}}
-
+
- + {{> ../components/icon_button + id="change_email_button" + icon="edit" + intent="brand" + custom_classes="tippy-zulip-delayed-tooltip" + hidden=(not user_can_change_email) + aria-label=(t "Change your email") + aria-hidden="true" + data-tippy-content=(t "Change your email") + }}
@@ -48,7 +55,12 @@
- + {{> ../components/action_button + label=(t "Change your password") + type="quiet" + intent="brand" + id="change_password" + }}
{{/if}} @@ -56,10 +68,13 @@
- + {{> ../components/action_button + label=(t "Deactivate account") + type="quiet" + intent="danger" + id="user_deactivate_account_button" + disabled=user_is_only_organization_owner + }}
{{#if owner_is_only_user_in_organization}} + {{> ../components/action_button + label=(t "Manage your API key") + type="quiet" + intent="brand" + id="api_key_button" + disabled=(not user_has_email_set) + }}
diff --git a/web/templates/settings/profile_settings.hbs b/web/templates/settings/profile_settings.hbs index d6d2b4bc0f..b65d229d5c 100644 --- a/web/templates/settings/profile_settings.hbs +++ b/web/templates/settings/profile_settings.hbs @@ -69,10 +69,14 @@ {{date_joined_text}} - + {{> ../components/action_button + label=(t "Preview profile") + type="quiet" + intent="brand" + id="show_my_user_profile_modal" + icon="external-link" + aria-hidden="true" + }}