mirror of https://github.com/zulip/zulip.git
user_profile: Display `Saved` feedback.
Visually confirms successful profile changes with a clear `Saved` message. Fixes part of #26692. Co-authored-by: Kunal Sharma <v.shm.kunal@gmail.com>. Co-authored-by: Angelica <angelica.ferlin@gmail.com>.
This commit is contained in:
parent
5a0abeed92
commit
ca74c95c60
|
@ -592,6 +592,11 @@ export function show_edit_bot_info_modal(user_id, $container) {
|
||||||
hide_button_spinner($submit_btn);
|
hide_button_spinner($submit_btn);
|
||||||
original_values = get_current_values($("#bot-edit-form"));
|
original_values = get_current_values($("#bot-edit-form"));
|
||||||
toggle_submit_button($("#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);
|
$cancel_btn.prop("disabled", false);
|
||||||
},
|
},
|
||||||
error(xhr) {
|
error(xhr) {
|
||||||
|
@ -868,6 +873,11 @@ export function show_edit_user_info_modal(user_id, $container) {
|
||||||
hide_button_spinner($submit_btn);
|
hide_button_spinner($submit_btn);
|
||||||
original_values = get_current_values($("#edit-user-form"));
|
original_values = get_current_values($("#edit-user-form"));
|
||||||
toggle_submit_button($("#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);
|
$cancel_btn.prop("disabled", false);
|
||||||
},
|
},
|
||||||
error(xhr) {
|
error(xhr) {
|
||||||
|
|
|
@ -157,6 +157,20 @@
|
||||||
color: hsl(0deg 0% 100%) !important;
|
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,
|
#read_receipts_error,
|
||||||
#dialog_error {
|
#dialog_error {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
</main>
|
</main>
|
||||||
<div class="manage-profile-tab-footer">
|
<div class="manage-profile-tab-footer">
|
||||||
<footer class="modal__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_exit_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{t "Cancel" }}</button>
|
||||||
<button type="button" class="modal__btn dialog_submit_button">
|
<button type="button" class="modal__btn dialog_submit_button">
|
||||||
<span>{{t "Save changes"}}</span>
|
<span>{{t "Save changes"}}</span>
|
||||||
|
|
Loading…
Reference in New Issue