mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 20:20:16 +08:00
This new navbar component is used for every navbar in chat, full page or drawer, and any screen.
This commit also uses this opportunity to correctly decouple drawer-routes from full page routes. This will avoid having this kind of properties in components: `@includeHeader={{false}}`. The header is now defined in the parent template using a navbar. Each route has now its own template wrapped in a div of the name of the route, eg: `<div class="c-routes-threads">..</div>`.
The navbar API:
```gjs
<Navbar as |navbar|>
<navbar.BackButton />
<navbar.Title @title="Foo" />
<navbar.ChannelTitle @channel={{@channel}} />
<navbar.Actions as |action|>
<action.CloseThreadButton />
</navbar.Actions>
</navbar>
```
The full list of components is listed in `plugins/chat/assets/javascripts/discourse/components/navbar/index.gjs` and `plugins/chat/assets/javascripts/discourse/components/navbar/actions.gjs`.
Visually the header is not changing much, only in drawer mode the background has been removed.
This commit also introduces a `<List />` component to facilitate rendering lists in chat plugin.
29 lines
475 B
SCSS
Vendored
29 lines
475 B
SCSS
Vendored
.chat-side-panel-resizer {
|
|
top: 0;
|
|
bottom: 0;
|
|
position: absolute;
|
|
z-index: z("composer", "content") - 1;
|
|
transition: background-color 0.15s 0.15s;
|
|
background-color: transparent;
|
|
|
|
.touch & {
|
|
left: -6px;
|
|
width: 10px;
|
|
|
|
&:active {
|
|
cursor: col-resize;
|
|
background: var(--tertiary);
|
|
}
|
|
}
|
|
|
|
.no-touch & {
|
|
left: -3px;
|
|
width: 5px;
|
|
|
|
&:hover,
|
|
&:active {
|
|
cursor: col-resize;
|
|
background: var(--tertiary);
|
|
}
|
|
}
|
|
}
|