mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 23:23:52 +08:00
Improve appearance of text editor buttons
- Change preview icon to Font Awesome Regular instead of Solid - Give the preview button a tooltip - Change submit button icon to paper plane (shown on mobile) - Tweak mobile header button touch target - Scroll overflowing text editor controls horizontally
This commit is contained in:
parent
4718bf4d81
commit
a6a4cf3fbc
|
@ -70,7 +70,7 @@ export default class TextEditor extends Component {
|
||||||
items.add('submit',
|
items.add('submit',
|
||||||
Button.component({
|
Button.component({
|
||||||
children: this.props.submitLabel,
|
children: this.props.submitLabel,
|
||||||
icon: 'fas fa-check',
|
icon: 'fas fa-paper-plane',
|
||||||
className: 'Button Button--primary',
|
className: 'Button Button--primary',
|
||||||
itemClassName: 'App-primaryControl',
|
itemClassName: 'App-primaryControl',
|
||||||
onclick: this.onsubmit.bind(this)
|
onclick: this.onsubmit.bind(this)
|
||||||
|
@ -80,10 +80,11 @@ export default class TextEditor extends Component {
|
||||||
if (this.props.preview) {
|
if (this.props.preview) {
|
||||||
items.add('preview',
|
items.add('preview',
|
||||||
Button.component({
|
Button.component({
|
||||||
icon: 'fas fa-eye',
|
icon: 'far fa-eye',
|
||||||
className: 'Button Button--icon',
|
className: 'Button Button--icon',
|
||||||
onclick: this.props.preview,
|
onclick: this.props.preview,
|
||||||
title: app.translator.trans('core.forum.composer.preview_tooltip')
|
title: app.translator.trans('core.forum.composer.preview_tooltip'),
|
||||||
|
config: elm => $(elm).tooltip()
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,9 @@
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
> .Button--icon {
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.App-primaryControl {
|
.App-primaryControl {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
@ -71,12 +74,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.App-primaryControl, .App-backControl {
|
.App-primaryControl, .App-backControl {
|
||||||
|
margin: 0 !important;
|
||||||
|
|
||||||
> .Button {
|
> .Button {
|
||||||
color: @header-control-color !important;
|
color: @header-control-color !important;
|
||||||
|
|
||||||
.Button-icon {
|
.Button-icon {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
.Button-label {
|
.Button-label {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -343,11 +343,14 @@
|
||||||
}
|
}
|
||||||
.TextEditor-controls {
|
.TextEditor-controls {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 15px 0;
|
padding: 10px 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
& li {
|
li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,10 +360,6 @@
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-top: 1px solid @control-bg;
|
border-top: 1px solid @control-bg;
|
||||||
|
|
||||||
li {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fullScreen & {
|
.fullScreen & {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-top: 0;
|
border-top: 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user