Remove unused components and models for improved maintainability

- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files.
- Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter.
- Updated project structure and references to reflect these removals.
This commit is contained in:
natreex
2026-03-22 22:37:31 -04:00
parent e8aaef108b
commit 64ed90d993
229 changed files with 15091 additions and 21289 deletions

View File

@@ -1,13 +1,13 @@
import InputField from "@/components/form/InputField";
import TexteAreaInput from "@/components/form/TexteAreaInput";
import TextAreaInput from "@/components/form/TextAreaInput";
import {ChangeEvent, Dispatch, SetStateAction, useContext, useEffect} from "react";
import {faGuilded} from "@fortawesome/free-brands-svg-icons";
import {Wand2} from "lucide-react";
import {AlertContext} from "@/context/AlertContext";
import System from "@/lib/models/System";
import {apiGet} from "@/lib/api/client";
import {SessionContext} from "@/context/SessionContext";
import {BookContext} from "@/context/BookContext";
import {LangContext, LangContextProps} from "@/context/LangContext";
import {useTranslations} from "next-intl";
import {useTranslations} from "@/lib/i18n";
interface GhostWriterSettingsProps {
advancedPrompt: string;
@@ -24,14 +24,14 @@ export default function GhostWriterSettings(
const t = useTranslations();
const {lang} = useContext<LangContextProps>(LangContext)
const {book} = useContext(BookContext);
useEffect((): void => {
getAdvancedSettings().catch();
}, []);
async function getAdvancedSettings(): Promise<void> {
try {
const setting: string = await System.authGetQueryToServer<string>(`quillsense/ghostwriter/advanced-settings`, session.accessToken, lang, {
const setting: string = await apiGet<string>(`quillsense/ghostwriter/advanced-settings`, session.accessToken, lang, {
bookId: book?.bookId
});
if (setting) {
@@ -45,14 +45,14 @@ export default function GhostWriterSettings(
}
}
}
return (
<div className={`p-4 lg:p-5 space-y-5 overflow-y-auto flex-grow custom-scrollbar`}>
<InputField input={<TexteAreaInput value={advancedPrompt}
setValue={(e: ChangeEvent<HTMLTextAreaElement>): void => setAdvancedPrompt(e.target.value)}
placeholder={`Information complémentaire pour la génération...`}
maxLength={600}/>}
fieldName={`Prompt additionnel`} icon={faGuilded}/>
<InputField input={<TextAreaInput value={advancedPrompt}
setValue={(e: ChangeEvent<HTMLTextAreaElement>): void => setAdvancedPrompt(e.target.value)}
placeholder={`Information complémentaire pour la génération...`}
maxLength={600}/>}
fieldName={`Prompt additionnel`} icon={Wand2}/>
</div>
);
}
}