settings: Remove lock icon when the user can add bots.

Being able to add bots at the admin bot settings page, the lock icon is
unintuitive.

Fixes #24154

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li 2023-01-24 16:35:56 -05:00 committed by Tim Abbott
parent a4963df6ad
commit 2b2a3b41be
2 changed files with 2 additions and 1 deletions

View File

@ -175,6 +175,7 @@ export function initialize() {
show_uploaded_files_section: page_params.max_file_upload_size_mib > 0, show_uploaded_files_section: page_params.max_file_upload_size_mib > 0,
show_emoji_settings_lock: show_emoji_settings_lock:
!page_params.is_admin && page_params.realm_add_emoji_by_admins_only, !page_params.is_admin && page_params.realm_add_emoji_by_admins_only,
can_create_new_bots: settings_bots.can_create_new_bots(),
}); });
$("#settings_overlay_container").append(rendered_settings_overlay); $("#settings_overlay_container").append(rendered_settings_overlay);
} }

View File

@ -127,7 +127,7 @@
<li tabindex="0" data-section="bot-list-admin"> <li tabindex="0" data-section="bot-list-admin">
<i class="icon zulip-icon zulip-icon-smart-toy" aria-hidden="true"></i> <i class="icon zulip-icon zulip-icon-smart-toy" aria-hidden="true"></i>
<div class="text">{{t "Bots" }}</div> <div class="text">{{t "Bots" }}</div>
{{#unless is_admin}} {{#unless can_create_new_bots}}
<i class="locked fa fa-lock" title="{{t 'Only organization administrators can edit these settings.' }}"></i> <i class="locked fa fa-lock" title="{{t 'Only organization administrators can edit these settings.' }}"></i>
{{/unless}} {{/unless}}
</li> </li>