manage streams: Promote "Announce stream" in UI.

The option to announce streams is tied to whether
it's public or not, so it makes sense to move it
here.
This commit is contained in:
Steve Howell 2022-03-02 12:42:33 +00:00 committed by Tim Abbott
parent 353d0f9e4f
commit 8c1ed7359f
4 changed files with 13 additions and 9 deletions

View File

@ -478,6 +478,7 @@ export function initialize() {
const stream = sub_store.get(stream_id);
const template_data = {
ask_to_announce_stream: false,
stream_privacy_policy_values: stream_data.stream_privacy_policy_values,
stream_privacy_policy: stream_data.get_stream_privacy_policy(stream_id),
stream_post_policy_values: stream_data.stream_post_policy_values,

View File

@ -621,6 +621,7 @@ export function setup_page(callback) {
// the user can create, by showing other options as disabled.
const stream_privacy_policy = stream_data.stream_privacy_policy_values.public.code;
const template_data = {
ask_to_announce_stream: true,
can_create_streams:
settings_data.user_can_create_private_streams() ||
settings_data.user_can_create_public_streams() ||

View File

@ -35,15 +35,6 @@
stream_post_policy=stream_post_policy_values.everyone.code
is_stream_edit=false }}
</div>
<div id="announce-new-stream">
<label class="checkbox">
<input type="checkbox" name="announce" value="announce" checked />
<span></span>
{{t "Announce stream" }}
</label>
<span class="fa fa-question-circle settings-info-icon" aria-hidden="true" id="announce-stream-docs"></span>
</div>
</section>
<section class="block">
<label class="stream-title" for="people_to_add">

View File

@ -13,6 +13,17 @@
{{/each}}
</div>
{{#if ask_to_announce_stream}}
<div id="announce-new-stream">
<label class="checkbox">
<input type="checkbox" name="announce" value="announce" checked />
<span></span>
{{t "Announce stream" }}
</label>
<span class="fa fa-question-circle settings-info-icon" aria-hidden="true" id="announce-stream-docs"></span>
</div>
{{/if}}
<div class="input-group">
<h4>{{t 'Who can post to the stream?'}}
{{> ../help_link_widget link="/help/stream-sending-policy" }}