diff --git a/backend/app/settings.py b/backend/app/settings.py index c8426af..6c13270 100644 --- a/backend/app/settings.py +++ b/backend/app/settings.py @@ -224,6 +224,8 @@ def determine_type(file_path): return 'Regex Pattern' elif 'custom_formats' in file_path: return 'Custom Format' + elif 'profiles' in file_path: + return 'Quality Profile' return 'Unknown' def interpret_git_status(x, y): diff --git a/frontend/src/components/format/FormatPage.jsx b/frontend/src/components/format/FormatPage.jsx index 7903c72..45996b1 100644 --- a/frontend/src/components/format/FormatPage.jsx +++ b/frontend/src/components/format/FormatPage.jsx @@ -1,10 +1,11 @@ -import { useState, useEffect } from "react"; +import React, { useState, useEffect } from "react"; import FormatCard from "./FormatCard"; import FormatModal from "./FormatModal"; import AddNewCard from "../ui/AddNewCard"; import { getFormats } from "../../api/api"; import FilterMenu from "../ui/FilterMenu"; import SortMenu from "../ui/SortMenu"; +import { Loader } from "lucide-react"; function FormatPage() { const [formats, setFormats] = useState([]); @@ -15,6 +16,15 @@ function FormatPage() { const [filterValue, setFilterValue] = useState(""); const [allTags, setAllTags] = useState([]); const [isCloning, setIsCloning] = useState(false); + const [isLoading, setIsLoading] = useState(true); + + const loadingMessages = [ + "Decoding the custom format matrix...", + "Parsing the digital alphabet soup...", + "Untangling the format spaghetti...", + "Calibrating the format-o-meter...", + "Indexing your media DNA...", + ]; useEffect(() => { fetchFormats(); @@ -30,6 +40,8 @@ function FormatPage() { setAllTags(tags); } catch (error) { console.error("Error fetching formats:", error); + } finally { + setIsLoading(false); } }; @@ -86,6 +98,17 @@ function FormatPage() { return 0; }); + if (isLoading) { + return ( +
+ {loadingMessages[Math.floor(Math.random() * loadingMessages.length)]} +
+