1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Add scrubber height change transition css, don't apply when dragging

This commit is contained in:
Alexander Skvortsov
2020-07-05 19:30:26 -04:00
committed by Franz Liedke
parent 9c63c54868
commit 9a357f5d19
2 changed files with 14 additions and 1 deletions

View File

@@ -50,8 +50,13 @@ export default class PostStreamScrubber extends Component {
const handleHeight = Math.min(100 - beforeHeight, percentPerPost.visible * visible);
const afterHeight = 100 - beforeHeight - handleHeight;
const classNames = ['PostStreamScrubber', 'Dropdown'];
if (this.state.allVisible) classNames.push('disabled');
if (this.dragging) classNames.push('dragging');
if (this.props.className) classNames.push(this.props.className);
return (
<div className={'PostStreamScrubber Dropdown ' + (this.state.allVisible() ? 'disabled ' : '') + (this.props.className || '')}>
<div className={classNames.join(' ')}>
<button className="Button Dropdown-toggle" data-toggle="dropdown">
{viewing} {icon('fas fa-sort')}
</button>

View File

@@ -21,6 +21,14 @@
}
.Scrubber-before, .Scrubber-after {
border-left: 1px solid @control-bg;
transition: height 0.15s ease-out;
}
.Scrubber-before, .Scrubber-after {
border-left: 1px solid @control-bg;
transition: height 0.15s ease-out;
}
.dragging .Scrubber-before, .dragging .Scrubber-after {
transition: none;
}
.Scrubber-unread {
position: absolute;