mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Merge conflicts :(
This commit is contained in:
commit
257032289e
2 changed files with 13 additions and 2 deletions
|
@ -395,7 +395,8 @@
|
|||
},
|
||||
"nextEpisode": {
|
||||
"replay": "Replay",
|
||||
"next": "Next episode"
|
||||
"nextIn": "Next episode in {{seconds}}",
|
||||
"next": "Next Episode"
|
||||
},
|
||||
"playbackError": {
|
||||
"badge": "Playback error",
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import classNames from "classnames";
|
||||
<<<<<<< HEAD
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
=======
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
>>>>>>> a945fcc4c5cabb28279db4a7d23bf052d97ed057
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Icon, Icons } from "@/components/Icon";
|
||||
|
@ -19,6 +23,11 @@ function shouldShowNextEpisodeButton(
|
|||
return "none";
|
||||
}
|
||||
|
||||
function shouldStartCountdown(time: number, duration: number): boolean {
|
||||
const secondsFromEnd = duration - time;
|
||||
return secondsFromEnd <= 30 || time / duration >= 0.93;
|
||||
}
|
||||
|
||||
function Button(props: {
|
||||
className: string;
|
||||
onClick?: () => void;
|
||||
|
@ -54,6 +63,7 @@ export function NextEpisodeButton(props: {
|
|||
const setShouldStartFromBeginning = usePlayerStore(
|
||||
(s) => s.setShouldStartFromBeginning,
|
||||
);
|
||||
const [countdown, setCountdown] = useState(15);
|
||||
|
||||
let show = false;
|
||||
if (showingState === "always") show = true;
|
||||
|
@ -116,7 +126,7 @@ export function NextEpisodeButton(props: {
|
|||
>
|
||||
<div
|
||||
className={classNames([
|
||||
"absolute bottom-0 right-0 transition-[bottom] duration-200 flex items-center space-x-3",
|
||||
"absolute bottom-0 right-0 transition-[bottom] duration-200 flex flex-col items-center space-y-3",
|
||||
bottom,
|
||||
])}
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue