my movies modal download text (#432)

- added download text to my movies completed videos next to icon
- removed unused import
This commit is contained in:
BFlat authored and GitHub committed 2024-05-27 16:16:18 -04:00
1 parent a4199c9a33
commit 68206c86ea
2 files changed
+14 -21

No files matched your search

@@ -4,7 +4,6 @@ import { faArrowDownToLine } from "@fortawesome/pro-solid-svg-icons";
import { useRef, useState } from "react";
import { BucketConfig } from "~/api/BucketConfig";
import dayjs from "dayjs";
import { Tooltip } from "~/components";
import { environmentVariables } from "~/signals";
import { useSignals } from "@preact/signals-react/runtime";
import { downloadFile } from "~/pages/PageEnigma/comps/GenerateModals/utils/downloadFile";
@@ -69,20 +68,19 @@ export function CompletedCard({ movie, setMovieId }: Props) {
</div>
</div>
<div className="pr-5">
<Tooltip content="Download" position="top">
<button
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
const title =
movie.maybe_title !== null ? movie.maybe_title : "Untitled";
downloadFile({ url: downloadLink, title });
}}
className="text-xl text-white/50 transition-all duration-150 hover:text-white/90"
>
<FontAwesomeIcon icon={faArrowDownToLine} />
</button>
</Tooltip>
<button
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
const title =
movie.maybe_title !== null ? movie.maybe_title : "Untitled";
downloadFile({ url: downloadLink, title });
}}
className="text-[15px] font-medium text-white/50 transition-all duration-150 hover:text-white/100"
>
<FontAwesomeIcon icon={faArrowDownToLine} className="mr-2" />
Download
</button>
</div>
</div>
);
@@ -1,9 +1,4 @@
import {
activeJobs,
generateMovieId,
movies,
viewMyMovies,
} from "~/pages/PageEnigma/signals";
import { activeJobs, movies, viewMyMovies } from "~/pages/PageEnigma/signals";
import { CompletedCard } from "~/pages/PageEnigma/comps/GenerateModals/CompletedCard";
import { InProgressCard } from "~/pages/PageEnigma/comps/GenerateModals/InProgressCard";
import { useSignals } from "@preact/signals-react/runtime";