discourse/plugins/chat/assets/stylesheets/mobile/base-mobile.scss
Joffrey JAFFEUX 53b96638c5
DEV: implements <Chat::Navbar /> (#24917)
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.
2023-12-18 17:49:58 +01:00

92 lines
1.4 KiB
SCSS

:root {
--channel-list-avatar-size: 38px;
}
.chat-message-container:not(.-user-info-hidden) {
.chat-message {
padding-top: 0.75em;
}
}
html.has-full-page-chat {
.footer-nav {
display: none !important;
}
body #main-outlet {
padding: 0;
.main-chat-outlet {
.chat-channel {
min-width: 0;
}
&.has-side-panel-expanded {
grid-template-columns: 1fr;
grid-template-areas: "threads";
.c-routes-channel {
display: none;
}
}
}
}
}
.full-page-chat {
grid-template-columns: 100%;
width: 100%;
.btn:active,
.btn:hover {
background: var(--secondary-very-high);
.d-icon {
color: var(--primary-medium);
}
}
.chat-channel {
border-radius: 0;
padding: 0;
}
.chat-drawer {
width: 100%;
}
}
.sidebar-container .channels-list .chat-channel-divider {
padding-left: 1em;
}
.sidebar-container .channels-list .chat-channel-row {
padding: 0.5em;
}
.create-channel-modal {
.modal-inner-container {
width: 95%;
}
}
.chat-message-separator {
margin-left: 0;
}
.header-dropdown-toggle.chat-header-icon {
.icon {
&.active {
border: 1px solid var(--primary-low);
background: var(--primary-very-low);
.d-icon {
color: var(--primary-medium);
}
}
.chat-channel-unread-indicator {
border-color: var(--primary-very-low);
}
}
}