Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Add tooltip to clarify invalid Jitsi URL.
Kislay Vermaa90f7cce6fd3
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.pyindex a2c521e4017..c130abe26b7 100644--- a/tools/lib/capitalization.py+++ b/tools/lib/capitalization.py@@ -27,6 +27,7 @@ IGNORED_PHRASES = [r"Inbox",r"IP",r"JSON",+ r"Jitsi",r"Kerberos",r"LinkedIn",r"LDAP",diff --git a/web/src/settings_components.ts b/web/src/settings_components.tsindex 01b8c6c3150..46b8b3badd4 100644--- a/web/src/settings_components.ts+++ b/web/src/settings_components.ts@@ -1,6 +1,6 @@import $ from "jquery";import assert from "minimalistic-assert";-import type {Props} from "tippy.js";+import type {PopperElement, Props} from "tippy.js";import tippy from "tippy.js";import render_compose_banner from "../templates/compose_banner/compose_banner.hbs";@@ -916,6 +916,23 @@ function enable_or_disable_save_button($subsection_elem: JQuery): void {disable_save_btn = should_disable_save_button_for_time_limit_settings(time_limit_settings);} else if ($subsection_elem.attr("id") === "org-other-settings") {disable_save_btn = should_disable_save_button_for_jitsi_server_url_setting();+ const $button_wrapper = $subsection_elem.find<PopperElement>(".subsection-changes-save");+ const tippy_instance = $button_wrapper[0]._tippy;+ if (disable_save_btn) {+ // avoid duplication of tippy+ if (!tippy_instance) {+ const opts: Partial<Props> = {placement: "top"};+ initialize_disable_btn_hint_popover(+ $button_wrapper,+ $t({defaultMessage: "Cannot save invalid Jitsi server URL."}),+ opts,+ );+ }+ } else {+ if (tippy_instance) {+ tippy_instance.destroy();+ }+ }}$subsection_elem.find(".subsection-changes-save button").prop("disabled", disable_save_btn);