Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_move: Disable stream select dropdown for unprivileged users.
Vector736801ea33ba23
diff --git a/web/src/stream_popover.js b/web/src/stream_popover.jsindex 44ef99d0aef..7653d035c42 100644--- a/web/src/stream_popover.js+++ b/web/src/stream_popover.js@@ -555,6 +555,9 @@ export async function build_move_topic_to_stream_popover(render_selected_stream();$("#move_topic_to_stream_widget").prop("disabled", disable_stream_input);+ if (disable_stream_input) {+ $stream_header_colorblock.addClass("disabled");+ }$("#move_topic_modal .move_messages_edit_topic").on("input", () => {update_submit_button_disabled_state(stream_widget_value);});diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.tsindex f9d114b0faf..aa64776c512 100644--- a/web/src/tippyjs.ts+++ b/web/src/tippyjs.ts@@ -520,4 +520,21 @@ export function initialize(): void {placement: "bottom",appendTo: () => document.body,});++ delegate("body", {+ target: "#move_topic_to_stream_widget_wrapper",+ onShow(instance) {+ if ($("#move_topic_to_stream_widget").prop("disabled")) {+ instance.setContent(+ $t({+ defaultMessage:+ "You do not have permission to move messages to another stream in this organization.",+ }),+ );+ return undefined;+ }+ return false;+ },+ appendTo: () => document.body,+ });}diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.cssindex c114393849c..759d1908662 100644--- a/web/styles/dark_theme.css+++ b/web/styles/dark_theme.css@@ -378,6 +378,10 @@}}+ .stream_header_colorblock.disabled {+ filter: brightness(50%);+ }+/* this one is because in the app we have blue and in dark-theme it should be white. */.popover a {color: inherit;