Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
user_profile: Display `Saved` feedback.
sanchi-tca74c95c60e9
diff --git a/web/src/user_profile.js b/web/src/user_profile.jsindex 3472b879fd9..65c86e2b144 100644--- a/web/src/user_profile.js+++ b/web/src/user_profile.js@@ -592,6 +592,11 @@ export function show_edit_bot_info_modal(user_id, $container) {hide_button_spinner($submit_btn);original_values = get_current_values($("#bot-edit-form"));toggle_submit_button($("#edit-user-form"));+ ui_report.success(+ $t_html({defaultMessage: "Saved"}),+ $("#user-profile-modal .save-success"),+ 1200,+ );$cancel_btn.prop("disabled", false);},error(xhr) {@@ -868,6 +873,11 @@ export function show_edit_user_info_modal(user_id, $container) {hide_button_spinner($submit_btn);original_values = get_current_values($("#edit-user-form"));toggle_submit_button($("#edit-user-form"));+ ui_report.success(+ $t_html({defaultMessage: "Saved"}),+ $("#user-profile-modal .save-success"),+ 1200,+ );$cancel_btn.prop("disabled", false);},error(xhr) {diff --git a/web/styles/modal.css b/web/styles/modal.cssindex 062e2b27bdf..530a3181bf4 100644--- a/web/styles/modal.css+++ b/web/styles/modal.css@@ -157,6 +157,20 @@color: hsl(0deg 0% 100%) !important;}+#user-profile-modal .save-success {+ vertical-align: top;+ background-color: transparent;+ border-radius: 4px;+ margin-right: 10px;+ color: hsl(156deg 30% 50%);+ padding: 0.5rem 1rem;+ line-height: 1.15;++ &:not(:empty) {+ border: 1px solid hsl(156deg 30% 50%);+ }+}+#read_receipts_error,#dialog_error {margin-bottom: 10px;diff --git a/web/templates/user_profile_modal.hbs b/web/templates/user_profile_modal.hbsindex e4c218897c9..5bf31f413e5 100644--- a/web/templates/user_profile_modal.hbs+++ b/web/templates/user_profile_modal.hbs@@ -135,6 +135,7 @@</main><div class="manage-profile-tab-footer"><footer class="modal__footer">+ <div class="save-success"></div><button type="button" class="modal__btn dialog_exit_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{t "Cancel" }}</button><button type="button" class="modal__btn dialog_submit_button"><span>{{t "Save changes"}}</span>