Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
banners: Redesign the permission banners.
Maneesh Shukladeaa6390a832
diff --git a/web/styles/app_components.css b/web/styles/app_components.cssindex fef69e25fac..4830450c015 100644--- a/web/styles/app_components.css+++ b/web/styles/app_components.css@@ -547,6 +547,7 @@ input.settings_text_input {}}+.admin-permissions-banner,.desktop-setting-notifications {margin-bottom: 10px;}diff --git a/web/templates/settings/auth_methods_settings_admin.hbs b/web/templates/settings/auth_methods_settings_admin.hbsindex a65e11ecc89..129e3f2ad1f 100644--- a/web/templates/settings/auth_methods_settings_admin.hbs+++ b/web/templates/settings/auth_methods_settings_admin.hbs@@ -1,6 +1,12 @@<div id="organization-auth-settings" class="settings-section" data-name="auth-methods">{{#unless is_owner}}- <div class='tip'>{{t "Only organization owners can edit these settings."}}</div>+ <div class="banner-wrapper">+ {{> ../components/banner+ label=(t "Only organization owners can edit these settings.")+ intent="info"+ custom_classes="admin-permissions-banner"+ }}+ </div>{{/unless}}<form class="admin-realm-form org-authentications-form"><div id="org-auth_settings" class="settings-subsection-parent">diff --git a/web/templates/settings/bot_list_admin.hbs b/web/templates/settings/bot_list_admin.hbsindex e496b384951..205a0130d7d 100644--- a/web/templates/settings/bot_list_admin.hbs+++ b/web/templates/settings/bot_list_admin.hbs@@ -1,5 +1,5 @@<div id="admin-bot-list" class="settings-section" data-name="bot-list-admin">- <div class="bot-settings-tip" id="admin-bot-settings-tip">+ <div class="bot-settings-tip banner-wrapper" id="admin-bot-settings-tip"></div><div class="clear-float"></div><div>diff --git a/web/templates/settings/bot_settings.hbs b/web/templates/settings/bot_settings.hbsindex 4ac97b32e08..bbd80ee15ac 100644--- a/web/templates/settings/bot_settings.hbs+++ b/web/templates/settings/bot_settings.hbs@@ -8,7 +8,7 @@{{#*inline "z-api"}}<a href="/api/" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}{{/tr}}</div>- <div class="bot-settings-tip" id="personal-bot-settings-tip">+ <div class="bot-settings-tip banner-wrapper" id="personal-bot-settings-tip"></div><div>{{> ../components/action_buttondiff --git a/web/templates/settings/bot_settings_tip.hbs b/web/templates/settings/bot_settings_tip.hbsindex 5815b85a9d7..38b144e3bfb 100644--- a/web/templates/settings/bot_settings_tip.hbs+++ b/web/templates/settings/bot_settings_tip.hbs@@ -1,7 +1,15 @@{{#unless can_create_any_bots}}{{#if can_create_incoming_webhooks}}- <div class='tip'>{{t "You can create bots that can only send messages." }}</div>+ {{> ../components/banner+ label=(t "You can create bots that can only send messages.")+ intent="info"+ custom_classes="admin-permissions-banner"+ }}{{else}}- <div class='tip'>{{t "You do not have permission to create bots." }}</div>+ {{> ../components/banner+ label=(t "You do not have permission to create bots.")+ intent="info"+ custom_classes="admin-permissions-banner"+ }}{{/if}}{{/unless}}diff --git a/web/templates/settings/organization_settings_tip.hbs b/web/templates/settings/organization_settings_tip.hbsindex f5f62e2d43c..f9f7fe6b690 100644--- a/web/templates/settings/organization_settings_tip.hbs+++ b/web/templates/settings/organization_settings_tip.hbs@@ -1,3 +1,9 @@{{#unless is_admin}}-<div class='tip'>{{t "Only organization administrators can edit these settings."}}</div>+<div class="banner-wrapper">+ {{> ../components/banner+ label=(t "Only organization administrators can edit these settings.")+ intent="info"+ custom_classes="admin-permissions-banner"+ }}+</div>{{/unless}}diff --git a/web/templates/stream_settings/stream_settings_tip.hbs b/web/templates/stream_settings/stream_settings_tip.hbsindex d0ee50eab08..4f8c97ee5e3 100644--- a/web/templates/stream_settings/stream_settings_tip.hbs+++ b/web/templates/stream_settings/stream_settings_tip.hbs@@ -1,3 +1,9 @@{{#unless can_change_stream_permissions_requiring_metadata_access}}- <div class="tip">{{t "Only channel administrators can edit these settings."}}</div>+ {{> ../components/banner+ label=(t "Only channel administrators can edit these settings.")+ intent="info"+ custom_classes="admin-permissions-banner"+ close_button=false+ process=false+ }}{{/unless}}