Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Live update tooltip in users and deactivated users table.
Ujjawal Modiba1405df9615
diff --git a/web/src/tippyjs.js b/web/src/tippyjs.jsindex f12b83b1f48..e7aa60d69a8 100644--- a/web/src/tippyjs.js+++ b/web/src/tippyjs.js@@ -429,6 +429,23 @@ export function initialize() {},});+ delegate("body", {+ target: [".user_row .actions button"],+ trigger: "mouseenter",+ onShow(instance) {+ if ($(instance.reference).hasClass("deactivate")) {+ instance.setContent($t({defaultMessage: "Deactivate"}));+ return true;+ } else if ($(instance.reference).hasClass("reactivate")) {+ instance.setContent($t({defaultMessage: "Reactivate"}));+ return true;+ }+ return false;+ },+ delay: LONG_HOVER_DELAY,+ appendTo: () => document.body,+ });+delegate("body", {target: "#user_info_popover .status-emoji",appendTo: () => document.body,diff --git a/web/templates/settings/admin_user_list.hbs b/web/templates/settings/admin_user_list.hbsindex 222c9ef2cf4..c1c46dd5ce8 100644--- a/web/templates/settings/admin_user_list.hbs+++ b/web/templates/settings/admin_user_list.hbs@@ -45,12 +45,12 @@</span>{{#if is_active}}<span {{#if (and is_bot cannot_deactivate)}}class="tippy-zulip-tooltip"{{/if}} {{#if (and is_bot cannot_deactivate)}}data-tippy-content="{{t 'This bot cannot be deactivated.'}}"{{/if}}>- <button data-tippy-content="{{#unless (and is_bot cannot_deactivate) }}{{t 'Deactivate' }}{{/unless}}" class="button rounded small deactivate btn-danger tippy-zulip-delayed-tooltip" {{#if cannot_deactivate}}disabled="disabled"{{/if}}>+ <button class="button rounded small btn-danger {{#unless (and is_bot cannot_deactivate) }}deactivate{{/unless}}" {{#if cannot_deactivate}}disabled="disabled"{{/if}}><i class="fa fa-user-times" aria-hidden="true"></i></button></span>{{else}}- <button data-tippy-content="{{t 'Reactivate' }}" class="button rounded small reactivate btn-warning tippy-zulip-delayed-tooltip">+ <button class="button rounded small reactivate btn-warning"><i class="fa fa-user-plus" aria-hidden="true"></i></button>{{/if}}