UX: chat navbar > alignments part 2 (#24985)

* UX: chat navbar > alignments part 2

* Change copy to be consistent My threads

* Dont show back button on full page desktop
This commit is contained in:
chapoi 2023-12-20 17:24:10 +02:00 committed by GitHub
parent 40e4fe4423
commit 22d4fbf59c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 13 deletions

View File

@ -15,7 +15,7 @@ export default class ChatDrawerRoutesThreads extends Component {
<Navbar @onClick={{this.chat.toggleDrawer}} as |navbar|>
<navbar.BackButton @title={{this.backButtonTitle}} />
<navbar.Title
@title={{i18n "chat.threads.list"}}
@title={{i18n "chat.my_threads.title"}}
@icon="discourse-threads"
as |title|
>

View File

@ -1,13 +1,18 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import i18n from "discourse-common/helpers/i18n";
import Navbar from "discourse/plugins/chat/discourse/components/chat/navbar";
import UserThreads from "discourse/plugins/chat/discourse/components/user-threads";
export default class ChatRoutesThreads extends Component {
@service site;
<template>
<div class="c-routes-threads">
<Navbar as |navbar|>
<navbar.BackButton />
{{#if this.site.mobileView}}
<navbar.BackButton />
{{/if}}
<navbar.Title
@title={{i18n "chat.my_threads.title"}}
@icon="discourse-threads"

View File

@ -24,11 +24,13 @@ export default class ChatThreadListHeader extends Component {
<template>
<Navbar as |navbar|>
<navbar.BackButton
@route="chat.channel"
@routeModels={{@channel.routeModels}}
@title={{i18n "chat.return_to_channel"}}
/>
{{#if this.site.mobileView}}
<navbar.BackButton
@route="chat.channel"
@routeModels={{@channel.routeModels}}
@title={{i18n "chat.return_to_channel"}}
/>
{{/if}}
<navbar.Title @title={{this.title}} @icon="discourse-threads" />

View File

@ -12,12 +12,12 @@
box-sizing: border-box;
display: flex;
z-index: z("composer", "content") - 1;
padding-inline: 1rem;
.full-page & {
padding-inline: 1rem;
}
.chat-drawer & {
padding-inline: 0.25rem;
.chat-drawer &,
.c-routes-channel-thread &,
.c-routes-channel-info & {
padding-inline: 0;
}
&.-clickable {
@ -37,7 +37,18 @@
.c-navbar__title {
@include ellipsis();
font-weight: 700;
padding-left: 0.75rem;
.c-routes-channel-threads & {
padding-left: 0;
}
.chat-drawer & {
padding-left: 1rem;
}
}
.c-navbar__back-button ~ .c-navbar__title {
padding-left: 0;
}
.c-navbar__sub-title {

View File

@ -0,0 +1,5 @@
.c-navbar {
&-container {
padding-inline: 0.25rem;
}
}

View File

@ -17,5 +17,6 @@
@import "chat-channel-settings";
@import "chat-form";
@import "chat-modal-new-message";
@import "chat-navbar";
@import "chat-thread-list-header";
@import "chat-user-threads";