mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-25 17:11:51 +01:00
Fix remaining time for mobile + smaller heading sizes
This commit is contained in:
parent
bc22c323a0
commit
761884ee01
@ -111,9 +111,10 @@
|
||||
"short": "Back"
|
||||
},
|
||||
"time": {
|
||||
"short": "-{{timeLeft}}",
|
||||
"regular": "{{timeWatched}} / {{duration}}",
|
||||
"remaining": "{{timeLeft}} left • Finish at {{timeFinished, datetime}}"
|
||||
"shortRegular": "{{timeWatched}}",
|
||||
"remaining": "{{timeLeft}} left • Finish at {{timeFinished, datetime}}",
|
||||
"shortRemaining": "-{{timeLeft}}"
|
||||
},
|
||||
"nextEpisode": {
|
||||
"next": "Next episode",
|
||||
@ -203,15 +204,9 @@
|
||||
"stopEditing": "Stop editing"
|
||||
},
|
||||
"titles": {
|
||||
"morning": [
|
||||
"Morning title"
|
||||
],
|
||||
"day": [
|
||||
"Day title"
|
||||
],
|
||||
"night": [
|
||||
"Night title"
|
||||
]
|
||||
"morning": ["Morning title"],
|
||||
"day": ["Day title"],
|
||||
"night": ["Night title"]
|
||||
},
|
||||
"search": {
|
||||
"loading": "Loading...",
|
||||
|
@ -40,10 +40,14 @@ export function Time(props: { short?: boolean }) {
|
||||
const timeFinished = new Date(Date.now() + secondsRemaining * 1e3);
|
||||
const duration = formatSeconds(timeDuration, hasHours);
|
||||
|
||||
let localizationKey = "regular";
|
||||
if (props.short) localizationKey = "short";
|
||||
else if (timeFormat === VideoPlayerTimeFormat.REMAINING)
|
||||
localizationKey = "remaining";
|
||||
let localizationKey =
|
||||
timeFormat === VideoPlayerTimeFormat.REGULAR ? "regular" : "remaining";
|
||||
if (props.short) {
|
||||
localizationKey =
|
||||
timeFormat === VideoPlayerTimeFormat.REGULAR
|
||||
? "shortRegular"
|
||||
: "shortRemaining";
|
||||
}
|
||||
|
||||
return (
|
||||
<VideoPlayerButton onClick={() => toggleMode()}>
|
||||
|
@ -24,7 +24,7 @@ export function Heading2(props: TextProps) {
|
||||
return (
|
||||
<h2
|
||||
className={[
|
||||
"text-xl lg:text-3xl font-bold text-white mt-20 mb-9",
|
||||
"text-xl lg:text-2xl font-bold text-white mt-20 mb-9",
|
||||
props.border ? borderClass : null,
|
||||
props.className ?? "",
|
||||
].join(" ")}
|
||||
|
Loading…
Reference in New Issue
Block a user