mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Make scrollbar transparent and work on making transitions more apealing
This commit is contained in:
parent
fa2c20b7f6
commit
3c54a6261d
3 changed files with 21 additions and 10 deletions
|
@ -427,6 +427,7 @@
|
||||||
"badge": "Not found",
|
"badge": "Not found",
|
||||||
"detailsButton": "Show details",
|
"detailsButton": "Show details",
|
||||||
"homeButton": "Go home",
|
"homeButton": "Go home",
|
||||||
|
"discoverButton": "Discover more",
|
||||||
"text": "We have searched through our providers and cannot find the media you are looking for! We do not host the media and have no control over what is available. Please click 'Show details' below for more details.",
|
"text": "We have searched through our providers and cannot find the media you are looking for! We do not host the media and have no control over what is available. Please click 'Show details' below for more details.",
|
||||||
"title": "We couldn't find that"
|
"title": "We couldn't find that"
|
||||||
},
|
},
|
||||||
|
|
|
@ -258,10 +258,11 @@ export function Discover() {
|
||||||
</h2>
|
</h2>
|
||||||
<div
|
<div
|
||||||
id={`carousel-${categorySlug}`}
|
id={`carousel-${categorySlug}`}
|
||||||
className="flex whitespace-nowrap overflow-auto pb-2 scrollbar rounded-xl"
|
className="flex whitespace-nowrap overflow-auto rounded-xl"
|
||||||
style={{
|
style={{
|
||||||
scrollbarWidth: "thin",
|
scrollbarWidth: "thin",
|
||||||
scrollbarColor: `${bgColor} transparent`,
|
// scrollbarColor: `${bgColor} transparent`,
|
||||||
|
scrollbarColor: `transparent transparent`,
|
||||||
}}
|
}}
|
||||||
ref={(el) => {
|
ref={(el) => {
|
||||||
carouselRefs.current[categorySlug] = el;
|
carouselRefs.current[categorySlug] = el;
|
||||||
|
@ -280,7 +281,7 @@ export function Discover() {
|
||||||
}`,
|
}`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
className="text-center relative mt-4 mb-4 ml-[0.4em] mr-[0.2em]"
|
className="text-center relative mt-2 ml-[0.285em] mr-[0.2em]"
|
||||||
style={{ flex: `0 0 ${movieWidth}` }} // Set a fixed width for each movie
|
style={{ flex: `0 0 ${movieWidth}` }} // Set a fixed width for each movie
|
||||||
>
|
>
|
||||||
<div className="relative transition-transform hover:scale-105 duration-[0.45s]">
|
<div className="relative transition-transform hover:scale-105 duration-[0.45s]">
|
||||||
|
@ -310,7 +311,7 @@ export function Discover() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
title="Back"
|
title="Back"
|
||||||
className="absolute top-1/2 transform -translate-y-1/2 z-10 left-5"
|
className="absolute pb-12 left-5 top-1/2 transform -translate-y-1/2 z-10"
|
||||||
onClick={() => scrollCarousel(categorySlug, "left")}
|
onClick={() => scrollCarousel(categorySlug, "left")}
|
||||||
>
|
>
|
||||||
<div className="cursor-pointer text-white flex justify-center items-center h-10 w-10 rounded-full bg-search-hoverBackground active:scale-110 transition-[transform,background-color] duration-200">
|
<div className="cursor-pointer text-white flex justify-center items-center h-10 w-10 rounded-full bg-search-hoverBackground active:scale-110 transition-[transform,background-color] duration-200">
|
||||||
|
@ -320,7 +321,7 @@ export function Discover() {
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
title="Next"
|
title="Next"
|
||||||
className="absolute top-1/2 right-5 transform -translate-y-1/2 z-10"
|
className="absolute pb-12 right-5 top-1/2 transform -translate-y-1/2 z-10"
|
||||||
onClick={() => scrollCarousel(categorySlug, "right")}
|
onClick={() => scrollCarousel(categorySlug, "right")}
|
||||||
>
|
>
|
||||||
<div className="cursor-pointer text-white flex justify-center items-center h-10 w-10 rounded-full bg-search-hoverBackground active:scale-110 transition-[transform,background-color] duration-200">
|
<div className="cursor-pointer text-white flex justify-center items-center h-10 w-10 rounded-full bg-search-hoverBackground active:scale-110 transition-[transform,background-color] duration-200">
|
||||||
|
@ -514,7 +515,7 @@ export function Discover() {
|
||||||
{renderMovies(genreMovies[genre.id] || [], genre.name)}
|
{renderMovies(genreMovies[genre.id] || [], genre.name)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<div className="flex items-center mt-6">
|
<div className="flex items-center">
|
||||||
<Divider marginClass="mr-5" />
|
<Divider marginClass="mr-5" />
|
||||||
<h1 className="text-4xl font-bold text-white mx-auto">Shows</h1>
|
<h1 className="text-4xl font-bold text-white mx-auto">Shows</h1>
|
||||||
<Divider marginClass="ml-5" />
|
<Divider marginClass="ml-5" />
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { sendPage } from "@/backend/extension/messaging";
|
import { sendPage } from "@/backend/extension/messaging";
|
||||||
import { Button } from "@/components/buttons/Button";
|
import { Button } from "@/components/buttons/Button";
|
||||||
|
@ -30,6 +30,7 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const [extensionState, setExtensionState] =
|
const [extensionState, setExtensionState] =
|
||||||
useState<ExtensionStatus>("unknown");
|
useState<ExtensionStatus>("unknown");
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const error = useMemo(() => {
|
const error = useMemo(() => {
|
||||||
const data = props.data;
|
const data = props.data;
|
||||||
|
@ -117,14 +118,22 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) {
|
||||||
{t("player.scraping.notFound.homeButton")}
|
{t("player.scraping.notFound.homeButton")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => modal.show()}
|
onClick={() => navigate("/discover")}
|
||||||
theme="purple"
|
theme="secondary"
|
||||||
padding="md:px-12 p-2.5"
|
padding="md:px-12 p-2.5"
|
||||||
className="mt-6"
|
className="mt-6"
|
||||||
>
|
>
|
||||||
{t("player.scraping.notFound.detailsButton")}
|
{t("player.scraping.notFound.discoverButton")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
<Button
|
||||||
|
onClick={() => modal.show()}
|
||||||
|
theme="purple"
|
||||||
|
padding="md:px-12 p-2.5"
|
||||||
|
className="mt-6"
|
||||||
|
>
|
||||||
|
{t("player.scraping.notFound.detailsButton")}
|
||||||
|
</Button>
|
||||||
</ErrorContainer>
|
</ErrorContainer>
|
||||||
{error ? (
|
{error ? (
|
||||||
<ErrorCardInModal
|
<ErrorCardInModal
|
||||||
|
|
Loading…
Reference in a new issue