mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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>
|
<template>
|
||||||
<div
|
|
||||||
role="region"
|
|
||||||
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
|
||||||
class="channels-list"
|
|
||||||
>
|
|
||||||
|
|
||||||
<PluginOutlet
|
<PluginOutlet
|
||||||
@name="below-direct-chat-channels"
|
@name="below-direct-chat-channels"
|
||||||
@tagName=""
|
@tagName=""
|
||||||
@ -128,6 +122,5 @@ export default class ChannelsListDirect extends Component {
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
}
|
}
|
||||||
|
@ -51,12 +51,6 @@ export default class ChannelsListPublic extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
|
||||||
role="region"
|
|
||||||
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
|
||||||
class="channels-list"
|
|
||||||
>
|
|
||||||
|
|
||||||
{{#if this.site.desktopView}}
|
{{#if this.site.desktopView}}
|
||||||
<LinkTo @route="chat.threads" class="chat-channel-row --threads">
|
<LinkTo @route="chat.threads" class="chat-channel-row --threads">
|
||||||
<span class="chat-channel-title">
|
<span class="chat-channel-title">
|
||||||
@ -117,10 +111,7 @@ export default class ChannelsListPublic extends Component {
|
|||||||
</LinkTo>
|
</LinkTo>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#each
|
{{#each this.chatChannelsManager.publicMessageChannels as |channel|}}
|
||||||
this.chatChannelsManager.publicMessageChannels
|
|
||||||
as |channel|
|
|
||||||
}}
|
|
||||||
<ChatChannelRow
|
<ChatChannelRow
|
||||||
@channel={{channel}}
|
@channel={{channel}}
|
||||||
@options={{hash settingsButton=true}}
|
@options={{hash settingsButton=true}}
|
||||||
@ -136,6 +127,5 @@ export default class ChannelsListPublic extends Component {
|
|||||||
@tagName=""
|
@tagName=""
|
||||||
@outletArgs={{hash inSidebar=this.inSidebar}}
|
@outletArgs={{hash inSidebar=this.inSidebar}}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { inject as service } from "@ember/service";
|
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 ChannelsListDirect from "discourse/plugins/chat/discourse/components/channels-list-direct";
|
||||||
import ChannelsListPublic from "discourse/plugins/chat/discourse/components/channels-list-public";
|
import ChannelsListPublic from "discourse/plugins/chat/discourse/components/channels-list-public";
|
||||||
|
|
||||||
@ -7,10 +8,16 @@ export default class ChannelsList extends Component {
|
|||||||
@service chat;
|
@service chat;
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div
|
||||||
|
role="region"
|
||||||
|
aria-label={{i18n "chat.aria_roles.channels_list"}}
|
||||||
|
class="channels-list"
|
||||||
|
>
|
||||||
<ChannelsListPublic />
|
<ChannelsListPublic />
|
||||||
|
|
||||||
{{#if this.chat.userCanAccessDirectMessages}}
|
{{#if this.chat.userCanAccessDirectMessages}}
|
||||||
<ChannelsListDirect />
|
<ChannelsListDirect />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user