Compare commits

..

No commits in common. "4f40ef371c22f376de0d3e01da23ead2be7269a6" and "3c312232932bc6ccf8a8f09c7a6b6b0d9bcf0ff4" have entirely different histories.

4 changed files with 15 additions and 79 deletions

View File

@ -16,7 +16,7 @@ async function bootstrap() {
const globalPrefix = "api"; const globalPrefix = "api";
app.setGlobalPrefix(globalPrefix); app.setGlobalPrefix(globalPrefix);
app.use(helmet()); app.use(helmet());
const port = process.env.PORT || 3333; const port = process.env.PORT || 3000;
const document = SwaggerModule.createDocument(app, config); const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup("api", app, document); SwaggerModule.setup("api", app, document);

View File

@ -31,9 +31,9 @@
} }
.dark { .dark {
--background: 20 14.3% 4.1%; --background: 20 12.91% 14%;
--foreground: 0 0% 92.55%; --foreground: 0 0% 92.55%;
--muted: 12 6.5% 15.1%; --muted: 12 6.83% 26.64%;
--muted-foreground: 24 5.4% 63.9%; --muted-foreground: 24 5.4% 63.9%;
--popover: 20 14.3% 4.1%; --popover: 20 14.3% 4.1%;
--popover-foreground: 60 9.1% 97.8%; --popover-foreground: 60 9.1% 97.8%;
@ -41,13 +41,13 @@
--card-foreground: 0 0% 92.55%; --card-foreground: 0 0% 92.55%;
--border: 12 6.19% 17.63%; --border: 12 6.19% 17.63%;
--input: 12 6.5% 15.1%; --input: 12 6.5% 15.1%;
--primary: 60 96.08% 41.3%; --primary: 60 96.56% 44.61%;
--primary-foreground: 26 90.03% 12.55%; --primary-foreground: 26 90.03% 12.55%;
--secondary: 12 26.8% 16.18%; --secondary: 12 26.8% 16.18%;
--secondary-foreground: 0 0% 92.55%; --secondary-foreground: 0 0% 92.55%;
--accent: 12 5.7% 26.68%; --accent: 12 5.7% 26.68%;
--accent-foreground: 0 0% 92.55%; --accent-foreground: 0 0% 92.55%;
--destructive: 0 76.12% 38%; --destructive: 0 60.83% 54.18%;
--destructive-foreground: 0 0% 92.55%; --destructive-foreground: 0 0% 92.55%;
--ring: 47.95 95.82% 53.14%; --ring: 47.95 95.82% 53.14%;
} }

View File

@ -1,13 +1,9 @@
"use client" "use client"
import { Dispatch, SetStateAction, useState } from 'react'; import { useState } from 'react';
import { Button } from '../components/ui/button'; import { Button } from '../components/ui/button';
import { Home, NotepadTextDashed } from 'lucide-react'; import { Home, NotepadTextDashed } from 'lucide-react';
import { NewFileModal } from 'apps/frontend/src/components/new-file-modal';
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup
} from 'apps/frontend/src/components/ui/resizable';
export enum ESubPage { export enum ESubPage {
Home, Home,
@ -18,47 +14,22 @@ export default function HomePage() {
const [currentSubPage, setCurrentSubPage] = useState<ESubPage>(0) const [currentSubPage, setCurrentSubPage] = useState<ESubPage>(0)
return ( return (
<main className="w-full h-full bg-background border border-muted p-2 rounded-md flex flex-row justify-stretch items-stretch"> <main className="w-full h-full bg-background border border-muted p-2 rounded-md flex flex-row justify-stretch items-stretch">
<ResizablePanelGroup <div className={"w-1/5 h-full p-1 flex flex-col items-center"}>
direction="horizontal"> <SubPageSelector/>
<ResizablePanel </div>
defaultSize={20} <SubPage currentSubPage={currentSubPage}/>
minSize={15}
maxSize={25}
className={"w-1/5 h-full p-1 flex flex-col items-center"}>
<SubPageSelector
currentSubPage={currentSubPage}
setCurrentSubPage={setCurrentSubPage}
/>
</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel
className={"w-full flex justify-center items-center"}>
<SubPage currentSubPage={currentSubPage}/>
</ResizablePanel>
</ResizablePanelGroup>
</main> </main>
); );
} }
interface SubPageSelectorProps { function SubPageSelector() {
currentSubPage: ESubPage
setCurrentSubPage: Dispatch<SetStateAction<ESubPage>>
}
function SubPageSelector(props: SubPageSelectorProps) {
return ( return (
<div className={"w-full flex flex-col justify-center items-stretch pt-4 p-4 gap-2"}> <div className={"w-full flex flex-col justify-center items-stretch pt-4 p-4 gap-2"}>
<Button <Button className={"gap-1 font-bold"}>
onClick={()=>props.setCurrentSubPage(ESubPage.Home)}
disabled={props.currentSubPage === ESubPage.Home}
className={"gap-1 font-bold"}>
<Home/> <Home/>
Accueil Accueil
</Button> </Button>
<NewFileModal/> <Button>
<Button
onClick={()=>props.setCurrentSubPage(ESubPage.Documentation)}
disabled={props.currentSubPage === ESubPage.Documentation}>
<NotepadTextDashed /> <NotepadTextDashed />
Documentation Documentation
</Button> </Button>

View File

@ -1,35 +0,0 @@
import { Button } from './ui/button';
import {
Dialog,
DialogContent, DialogDescription,
DialogHeader, DialogTitle,
DialogTrigger
} from './ui/dialog';
import { FileInput } from 'lucide-react';
export interface NewFileModalProps {
classname?: string;
}
export function NewFileModal(props: NewFileModalProps) {
return (
<Dialog>
<DialogTrigger asChild>
<Button className={"flex gap-2 items-center bg-secondary text-secondary-foreground"}>
<FileInput />
Ajouter un fichier
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Are you absolutely sure?</DialogTitle>
<DialogDescription>
This action cannot be undone. This will permanently delete your account
and remove your data from our servers.
</DialogDescription>
</DialogHeader>
</DialogContent>
</Dialog>
)
}