mirror of
https://github.com/flarum/core.git
synced 2025-07-28 12:10:51 +02:00
Always show composer header. closes flarum/core#112
This commit is contained in:
@@ -25,12 +25,10 @@ export default class ComposerBody extends Component {
|
|||||||
view(className) {
|
view(className) {
|
||||||
this.editor.props.disabled = this.loading() || !this.ready();
|
this.editor.props.disabled = this.loading() || !this.ready();
|
||||||
|
|
||||||
var headerItems = this.headerItems().toArray();
|
|
||||||
|
|
||||||
return m('div', {className, config: this.onload.bind(this)}, [
|
return m('div', {className, config: this.onload.bind(this)}, [
|
||||||
avatar(this.props.user, {className: 'composer-avatar'}),
|
avatar(this.props.user, {className: 'composer-avatar'}),
|
||||||
m('div.composer-body', [
|
m('div.composer-body', [
|
||||||
headerItems.length ? m('ul.composer-header', listItems(headerItems)) : '',
|
m('ul.composer-header', listItems(this.headerItems().toArray())),
|
||||||
m('div.composer-editor', this.editor.view())
|
m('div.composer-editor', this.editor.view())
|
||||||
]),
|
]),
|
||||||
LoadingIndicator.component({className: 'composer-loading'+(this.loading() ? ' active' : '')})
|
LoadingIndicator.component({className: 'composer-loading'+(this.loading() ? ' active' : '')})
|
||||||
|
@@ -21,15 +21,10 @@ export default class ReplyComposer extends ComposerBody {
|
|||||||
headerItems() {
|
headerItems() {
|
||||||
var items = new ItemList();
|
var items = new ItemList();
|
||||||
|
|
||||||
if (app.composer.position() === Composer.PositionEnum.MINIMIZED ||
|
items.add('title', m('h3', [
|
||||||
// https://github.com/babel/babel/issues/1150
|
icon('reply'), ' ',
|
||||||
!app.current.discussion ||
|
m('a', {href: app.route.discussion(this.props.discussion), config: m.route}, this.props.discussion.title())
|
||||||
app.current.discussion() !== this.props.discussion) {
|
]));
|
||||||
items.add('title', m('h3', [
|
|
||||||
icon('reply'), ' ',
|
|
||||||
m('a', {href: app.route.discussion(this.props.discussion), config: m.route}, this.props.discussion.title())
|
|
||||||
]));
|
|
||||||
}
|
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
@@ -41,10 +41,12 @@
|
|||||||
|
|
||||||
&, & input, & a {
|
&, & input, & a {
|
||||||
color: @fl-secondary-color;
|
color: @fl-secondary-color;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
& input {
|
& input {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
&, &[disabled], &:focus {
|
&, &[disabled], &:focus {
|
||||||
background: none;
|
background: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
Reference in New Issue
Block a user