mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 11:27:32 +08:00
FIX: various fixes to channel archive status (#19649)
- improves UI by displaying channel status on it's own line - ensures channel status is correctly updated right after the request on frontend - adds status on info page
This commit is contained in:
@ -38,9 +38,9 @@ export default Component.extend(ModalFunctionality, {
|
||||
|
||||
return this.chatApi
|
||||
.createChannelArchive(this.chatChannel.id, this._data())
|
||||
.then((result) => {
|
||||
.then(() => {
|
||||
this.flash(I18n.t("chat.channel_archive.process_started"), "success");
|
||||
result.target.status = CHANNEL_STATUSES.archived;
|
||||
this.chatChannel.set("status", CHANNEL_STATUSES.archived);
|
||||
|
||||
discourseLater(() => {
|
||||
this.closeModal();
|
||||
|
@ -2,5 +2,7 @@
|
||||
<div class="chat-channel-status">
|
||||
{{d-icon this.channelStatusIcon}}
|
||||
<span>{{this.channelStatusMessage}}</span>
|
||||
|
||||
<ChatChannelArchiveStatus @channel={{this.channel}} />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
@ -33,10 +33,9 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<ChatChannelArchiveStatus @channel={{this.chatChannel}} />
|
||||
<ChatChannelStatus @channel={{this.chatChannel}} />
|
||||
</div>
|
||||
|
||||
<ChatChannelStatus @channel={{this.chatChannel}} />
|
||||
{{/if}}
|
||||
|
||||
<ChatRetentionReminder @chatChannel={{this.chatChannel}} />
|
||||
@ -153,4 +152,4 @@
|
||||
{{else}}
|
||||
<ChatChannelPreviewCard @channel={{this.chatChannel}} />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
@ -26,6 +26,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ChatChannelStatus @channel={{this.model}} />
|
||||
|
||||
<div class="chat-tabs chat-info-tabs">
|
||||
<ul class="chat-tabs-list nav-pills" role="tablist">
|
||||
{{#each this.tabs as |tab|}}
|
||||
@ -60,4 +62,4 @@
|
||||
{{outlet}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user