FIX: renders channels-list wrapper only once (#25383)
This bug was causing broken layout when using the `header_dropdown` setting instead of `sidebar` as we were rendering `<div class="channels-list"></div>` two times.
This commit is contained in:
parent
9d3800adec
commit
eff485e4c0
|
@ -59,12 +59,6 @@ export default class ChannelsListDirect extends Component {
|
|||
}
|
||||
|
||||
<template>
|
||||
<div
|
||||
role="region"
|
||||
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
||||
class="channels-list"
|
||||
>
|
||||
|
||||
<PluginOutlet
|
||||
@name="below-direct-chat-channels"
|
||||
@tagName=""
|
||||
|
@ -128,6 +122,5 @@ export default class ChannelsListDirect extends Component {
|
|||
{{/each}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
}
|
||||
|
|
|
@ -51,12 +51,6 @@ export default class ChannelsListPublic extends Component {
|
|||
}
|
||||
|
||||
<template>
|
||||
<div
|
||||
role="region"
|
||||
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
||||
class="channels-list"
|
||||
>
|
||||
|
||||
{{#if this.site.desktopView}}
|
||||
<LinkTo @route="chat.threads" class="chat-channel-row --threads">
|
||||
<span class="chat-channel-title">
|
||||
|
@ -117,10 +111,7 @@ export default class ChannelsListPublic extends Component {
|
|||
</LinkTo>
|
||||
</div>
|
||||
{{else}}
|
||||
{{#each
|
||||
this.chatChannelsManager.publicMessageChannels
|
||||
as |channel|
|
||||
}}
|
||||
{{#each this.chatChannelsManager.publicMessageChannels as |channel|}}
|
||||
<ChatChannelRow
|
||||
@channel={{channel}}
|
||||
@options={{hash settingsButton=true}}
|
||||
|
@ -136,6 +127,5 @@ export default class ChannelsListPublic extends Component {
|
|||
@tagName=""
|
||||
@outletArgs={{hash inSidebar=this.inSidebar}}
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { inject as service } from "@ember/service";
|
||||
import i18n from "discourse-common/helpers/i18n";
|
||||
import ChannelsListDirect from "discourse/plugins/chat/discourse/components/channels-list-direct";
|
||||
import ChannelsListPublic from "discourse/plugins/chat/discourse/components/channels-list-public";
|
||||
|
||||
|
@ -7,10 +8,16 @@ export default class ChannelsList extends Component {
|
|||
@service chat;
|
||||
|
||||
<template>
|
||||
<div
|
||||
role="region"
|
||||
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
||||
class="channels-list"
|
||||
>
|
||||
<ChannelsListPublic />
|
||||
|
||||
{{#if this.chat.userCanAccessDirectMessages}}
|
||||
<ChannelsListDirect />
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue