mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-30 19:54:16 -04:00
Small cleanups
This commit is contained in:
parent
4b7f59e2e9
commit
a6c645c33f
@ -35,7 +35,7 @@ export const tooltip = (tooltip: string, up?: boolean) =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const WebTooltip = ({ theme }: { theme: Theme }) => {
|
export const WebTooltip = ({ theme }: { theme: Theme }) => {
|
||||||
const background = `${theme.colors.black}CC`;
|
const background = `${theme.light.colors.black}CC`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<style jsx global>{`
|
<style jsx global>{`
|
||||||
|
@ -157,9 +157,12 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
|
|||||||
>
|
>
|
||||||
<Pressable
|
<Pressable
|
||||||
focusable={false}
|
focusable={false}
|
||||||
onPress={
|
onPress={(e) => {
|
||||||
Platform.OS === "web"
|
// TODO: use onPress event to diferenciate touch and click on the web (requires react native web 0.19)
|
||||||
? (e) => {
|
if (Platform.OS !== "web") {
|
||||||
|
displayControls ? setMouseMoved(false) : show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
touchCount++;
|
touchCount++;
|
||||||
if (touchCount == 2) {
|
if (touchCount == 2) {
|
||||||
@ -171,9 +174,7 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
|
|||||||
touchCount = 0;
|
touchCount = 0;
|
||||||
}, 400);
|
}, 400);
|
||||||
setPlay(!isPlaying);
|
setPlay(!isPlaying);
|
||||||
}
|
}}
|
||||||
: () => (displayControls ? setMouseMoved(false) : show())
|
|
||||||
}
|
|
||||||
{...css(StyleSheet.absoluteFillObject)}
|
{...css(StyleSheet.absoluteFillObject)}
|
||||||
>
|
>
|
||||||
<Video
|
<Video
|
||||||
|
Loading…
x
Reference in New Issue
Block a user