mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 20:42:11 +08:00
format
This commit is contained in:
parent
7b6ab61508
commit
b965a82bb1
@ -34,9 +34,7 @@ export default class PostStreamScrubber extends Component {
|
||||
const index = this.stream.index;
|
||||
|
||||
const showBackButton =
|
||||
this.lastPosition > count / 20 &&
|
||||
this.lastPosition < count - count / 20 &&
|
||||
100 * Math.abs((index - this.lastPosition) / count) > 25;
|
||||
this.lastPosition > count / 20 && this.lastPosition < count - count / 20 && 100 * Math.abs((index - this.lastPosition) / count) > 25;
|
||||
|
||||
const unreadCount = this.stream.discussion.unreadCount();
|
||||
const unreadPercent = count ? Math.min(count - index, unreadCount) / count : 0;
|
||||
@ -99,7 +97,7 @@ export default class PostStreamScrubber extends Component {
|
||||
|
||||
backButton() {
|
||||
return (
|
||||
<div style={"top: " + this.percentPerPost().index * this.lastPosition + "%"} className="Scrubber-back">
|
||||
<div style={'top: ' + this.percentPerPost().index * this.lastPosition + '%'} className="Scrubber-back">
|
||||
{icon('fas fa-minus')}
|
||||
<button className="Button Button--primary" onclick={this.returnToLastPosition.bind(this)}>
|
||||
{app.translator.trans('core.forum.post_scrubber.back')}
|
||||
|
Loading…
x
Reference in New Issue
Block a user