fix: show red in convert page w/ all videos

This commit is contained in:
JovannMC 2025-02-09 20:35:28 +03:00
parent 8529f9594e
commit 6fb6ce3b68
No known key found for this signature in database
1 changed files with 6 additions and 3 deletions

View File

@ -36,13 +36,16 @@
(file) => file.converter?.name === "ffmpeg",
);
const allImages = files.files.every(
(file) => file.converter?.name !== "ffmpeg",
(file) => file.converter?.name !== "ffmpeg" && file.converter?.name !== "vertd",
);
const allVideos = files.files.every(
(file) => file.converter?.name === "vertd",
);
if (files.files.length === 0 || (!allAudio && !allImages)) {
if (files.files.length === 0 || (!allAudio && !allImages && !allVideos)) {
gradientColor.set("");
} else {
gradientColor.set(allAudio ? "purple" : "blue");
gradientColor.set(allAudio ? "purple" : allVideos ? "red" : "blue");
}
});
</script>