mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -07:00
Misc UI Fixes
This commit is contained in:
parent
52f4f1de03
commit
f3e55a236c
16 changed files with 118 additions and 98 deletions
|
@ -340,29 +340,6 @@ class PageSidebar extends Component {
|
|||
this._touchStartY = touchStartY;
|
||||
}
|
||||
|
||||
onTouchEnd = (event) => {
|
||||
const touches = event.changedTouches;
|
||||
const currentTouch = touches[0].pageX;
|
||||
|
||||
if (!this._touchStartX) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentTouch > this._touchStartX && currentTouch > 50) {
|
||||
this._setSidebarTransform(true, 'none');
|
||||
} else if (currentTouch < this._touchStartX && currentTouch < 80) {
|
||||
this._setSidebarTransform(false, 'transform 50ms ease-in-out');
|
||||
} else {
|
||||
this._setSidebarTransform(this.props.isSidebarVisible);
|
||||
}
|
||||
|
||||
this._touchStartX = null;
|
||||
}
|
||||
|
||||
onTouchCancel = (event) => {
|
||||
this._touchStartX = null;
|
||||
}
|
||||
|
||||
onTouchMove = (event) => {
|
||||
const touches = event.touches;
|
||||
const currentTouchX = touches[0].pageX;
|
||||
|
@ -393,6 +370,31 @@ class PageSidebar extends Component {
|
|||
});
|
||||
}
|
||||
|
||||
onTouchEnd = (event) => {
|
||||
const touches = event.changedTouches;
|
||||
const currentTouch = touches[0].pageX;
|
||||
|
||||
if (!this._touchStartX) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentTouch > this._touchStartX && currentTouch > 50) {
|
||||
this._setSidebarTransform(true, 'none');
|
||||
} else if (currentTouch < this._touchStartX && currentTouch < 80) {
|
||||
this._setSidebarTransform(false, 'transform 50ms ease-in-out');
|
||||
} else {
|
||||
this._setSidebarTransform(this.props.isSidebarVisible);
|
||||
}
|
||||
|
||||
this._touchStartX = null;
|
||||
this._touchStartY = null;
|
||||
}
|
||||
|
||||
onTouchCancel = (event) => {
|
||||
this._touchStartX = null;
|
||||
this._touchStartY = null;
|
||||
}
|
||||
|
||||
onItemPress = () => {
|
||||
this.props.onSidebarVisibleChange(false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue