stream_settings: Show disabled create stream button and text.

Now user who don't have permission can see disabled stream create
button with message.
This commit is contained in:
sujal 2024-03-22 21:40:59 +05:30 committed by Tim Abbott
parent d1e7c082b3
commit aafcd43038
2 changed files with 10 additions and 1 deletions

View File

@ -697,6 +697,11 @@ div.overlay {
box-shadow: 0 1px 4px 0 hsl(235deg 18% 7%);
outline: none;
}
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}
.color_animated_button {

View File

@ -58,14 +58,18 @@
<div id="stream_settings_title" class="stream-info-title">{{t 'Channel settings' }}</div>
</div>
<div class="nothing-selected">
<button type="button" class="create_stream_button animated-purple-button" {{#unless can_create_streams}}disabled{{/unless}}>{{t 'Create channel' }}</button>
{{#if can_create_streams}}
<button type="button" class="create_stream_button animated-purple-button">{{t 'Create channel' }}</button>
<span class="settings-empty-option-text">
{{#tr}}
First time? Read our <z-link>guidelines</z-link> for creating and naming channels.
{{#*inline "z-link"}}<a href="/help/getting-your-organization-started-with-zulip#create-channels" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}
{{/tr}}
</span>
{{else}}
<span class="settings-empty-option-text">
{{t 'You do not have permission to create channels in this organization.' }}
</span>
{{/if}}
</div>
<div id="stream_settings" class="settings" data-simplebar data-simplebar-tab-index="-1" data-simplebar-auto-hide="false">