mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 04:25:40 +08:00
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:
parent
40e4fe4423
commit
22d4fbf59c
plugins/chat/assets
javascripts/discourse/components/chat
stylesheets
@ -15,7 +15,7 @@ export default class ChatDrawerRoutesThreads extends Component {
|
|||||||
<Navbar @onClick={{this.chat.toggleDrawer}} as |navbar|>
|
<Navbar @onClick={{this.chat.toggleDrawer}} as |navbar|>
|
||||||
<navbar.BackButton @title={{this.backButtonTitle}} />
|
<navbar.BackButton @title={{this.backButtonTitle}} />
|
||||||
<navbar.Title
|
<navbar.Title
|
||||||
@title={{i18n "chat.threads.list"}}
|
@title={{i18n "chat.my_threads.title"}}
|
||||||
@icon="discourse-threads"
|
@icon="discourse-threads"
|
||||||
as |title|
|
as |title|
|
||||||
>
|
>
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
|
import { inject as service } from "@ember/service";
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import i18n from "discourse-common/helpers/i18n";
|
||||||
import Navbar from "discourse/plugins/chat/discourse/components/chat/navbar";
|
import Navbar from "discourse/plugins/chat/discourse/components/chat/navbar";
|
||||||
import UserThreads from "discourse/plugins/chat/discourse/components/user-threads";
|
import UserThreads from "discourse/plugins/chat/discourse/components/user-threads";
|
||||||
|
|
||||||
export default class ChatRoutesThreads extends Component {
|
export default class ChatRoutesThreads extends Component {
|
||||||
|
@service site;
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="c-routes-threads">
|
<div class="c-routes-threads">
|
||||||
<Navbar as |navbar|>
|
<Navbar as |navbar|>
|
||||||
|
{{#if this.site.mobileView}}
|
||||||
<navbar.BackButton />
|
<navbar.BackButton />
|
||||||
|
{{/if}}
|
||||||
<navbar.Title
|
<navbar.Title
|
||||||
@title={{i18n "chat.my_threads.title"}}
|
@title={{i18n "chat.my_threads.title"}}
|
||||||
@icon="discourse-threads"
|
@icon="discourse-threads"
|
||||||
|
@ -24,11 +24,13 @@ export default class ChatThreadListHeader extends Component {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Navbar as |navbar|>
|
<Navbar as |navbar|>
|
||||||
|
{{#if this.site.mobileView}}
|
||||||
<navbar.BackButton
|
<navbar.BackButton
|
||||||
@route="chat.channel"
|
@route="chat.channel"
|
||||||
@routeModels={{@channel.routeModels}}
|
@routeModels={{@channel.routeModels}}
|
||||||
@title={{i18n "chat.return_to_channel"}}
|
@title={{i18n "chat.return_to_channel"}}
|
||||||
/>
|
/>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<navbar.Title @title={{this.title}} @icon="discourse-threads" />
|
<navbar.Title @title={{this.title}} @icon="discourse-threads" />
|
||||||
|
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
z-index: z("composer", "content") - 1;
|
z-index: z("composer", "content") - 1;
|
||||||
|
|
||||||
.full-page & {
|
|
||||||
padding-inline: 1rem;
|
padding-inline: 1rem;
|
||||||
}
|
|
||||||
.chat-drawer & {
|
.chat-drawer &,
|
||||||
padding-inline: 0.25rem;
|
.c-routes-channel-thread &,
|
||||||
|
.c-routes-channel-info & {
|
||||||
|
padding-inline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.-clickable {
|
&.-clickable {
|
||||||
@ -37,7 +37,18 @@
|
|||||||
.c-navbar__title {
|
.c-navbar__title {
|
||||||
@include ellipsis();
|
@include ellipsis();
|
||||||
font-weight: 700;
|
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 {
|
.c-navbar__sub-title {
|
||||||
|
5
plugins/chat/assets/stylesheets/mobile/chat-navbar.scss
Normal file
5
plugins/chat/assets/stylesheets/mobile/chat-navbar.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.c-navbar {
|
||||||
|
&-container {
|
||||||
|
padding-inline: 0.25rem;
|
||||||
|
}
|
||||||
|
}
|
@ -17,5 +17,6 @@
|
|||||||
@import "chat-channel-settings";
|
@import "chat-channel-settings";
|
||||||
@import "chat-form";
|
@import "chat-form";
|
||||||
@import "chat-modal-new-message";
|
@import "chat-modal-new-message";
|
||||||
|
@import "chat-navbar";
|
||||||
@import "chat-thread-list-header";
|
@import "chat-thread-list-header";
|
||||||
@import "chat-user-threads";
|
@import "chat-user-threads";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user