-

ModeToggle React Component Documentation#

-

The ModeToggle component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the lucide-react library for icon components and leverages the DropdownMenu component for the theme selection options.

+

ToggleMode React Component Documentation#

+

The ToggleMode component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the lucide-react library for icon components and leverages the DropdownMenu component for the theme selection options.

Overview#

-

The ModeToggle component offers a user-friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options.

+

The ToggleMode component offers a user-friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options.

Key Components#

@@ -260,15 +260,15 @@

Key Components

Usage#

-

To use the ModeToggle component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly.

+

To use the ToggleMode component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly.

Example:

```jsx -import ModeToggle from “@/path/to/ModeToggle”;

+import ToggleMode from “@/path/to/ToggleMode”;

function ThemeSettingsPage() {
return (
<div>

<h1>Theme Settings</h1> -<ModeToggle />

+<ToggleMode />

</div>

@@ -336,7 +336,7 @@

Usage#<
-
ModeToggle React Component Documentation
+
ToggleMode React Component Documentation
diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 56ba5cd..6dc32df 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -202,7 +202,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/index.html b/docs/build/html/index.html index 7f1cd23..d40358c 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/lib/index.html b/docs/build/html/lib/index.html index 552753b..23403cd 100644 --- a/docs/build/html/lib/index.html +++ b/docs/build/html/lib/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/manage.html b/docs/build/html/manage.html index 1088c06..e9cf1e7 100644 --- a/docs/build/html/manage.html +++ b/docs/build/html/manage.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/course.html b/docs/build/html/models/course.html index c4ec565..b49db51 100644 --- a/docs/build/html/models/course.html +++ b/docs/build/html/models/course.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/index.html b/docs/build/html/models/index.html index 93fca53..e012ad3 100644 --- a/docs/build/html/models/index.html +++ b/docs/build/html/models/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/issue.html b/docs/build/html/models/issue.html index 932e489..ea395b6 100644 --- a/docs/build/html/models/issue.html +++ b/docs/build/html/models/issue.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/professor.html b/docs/build/html/models/professor.html index a35f3da..7c38f55 100644 --- a/docs/build/html/models/professor.html +++ b/docs/build/html/models/professor.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/section.html b/docs/build/html/models/section.html index 646e9d0..22298bf 100644 --- a/docs/build/html/models/section.html +++ b/docs/build/html/models/section.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/ticket.html b/docs/build/html/models/ticket.html index 66265bd..05585dc 100644 --- a/docs/build/html/models/ticket.html +++ b/docs/build/html/models/ticket.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/models/user.html b/docs/build/html/models/user.html index aa053ea..cfd4ac3 100644 --- a/docs/build/html/models/user.html +++ b/docs/build/html/models/user.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/modules.html b/docs/build/html/modules.html index d3f8c74..56d4e1a 100644 --- a/docs/build/html/modules.html +++ b/docs/build/html/modules.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/py-modindex.html b/docs/build/html/py-modindex.html index e760d42..a2d8993 100644 --- a/docs/build/html/py-modindex.html +++ b/docs/build/html/py-modindex.html @@ -202,7 +202,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/routes/index.html b/docs/build/html/routes/index.html index 34e542e..b04f4f9 100644 --- a/docs/build/html/routes/index.html +++ b/docs/build/html/routes/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/scripts/index.html b/docs/build/html/scripts/index.html index 6768cfe..193ecb4 100644 --- a/docs/build/html/scripts/index.html +++ b/docs/build/html/scripts/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/scripts/load-semester.html b/docs/build/html/scripts/load-semester.html index a12d016..99ffaf6 100644 --- a/docs/build/html/scripts/load-semester.html +++ b/docs/build/html/scripts/load-semester.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/search.html b/docs/build/html/search.html index 4d19ab4..f90c423 100644 --- a/docs/build/html/search.html +++ b/docs/build/html/search.html @@ -201,7 +201,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/settings/index.html b/docs/build/html/settings/index.html index 81d2620..1d1c3dd 100644 --- a/docs/build/html/settings/index.html +++ b/docs/build/html/settings/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/settings/settings.html b/docs/build/html/settings/settings.html index b78f4d8..e8c8ab5 100644 --- a/docs/build/html/settings/settings.html +++ b/docs/build/html/settings/settings.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/style/index.html b/docs/build/html/style/index.html index ae88e31..b74336b 100644 --- a/docs/build/html/style/index.html +++ b/docs/build/html/style/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/tests/index.html b/docs/build/html/tests/index.html index 1bdb64a..1978a28 100644 --- a/docs/build/html/tests/index.html +++ b/docs/build/html/tests/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/html/views/index.html b/docs/build/html/views/index.html index 8dc7371..e034a4c 100644 --- a/docs/build/html/views/index.html +++ b/docs/build/html/views/index.html @@ -204,7 +204,7 @@
  • TicketForm React Component Documentation
  • AnnouncementForm
  • ThemeProvider React Component Documentation
  • -
  • ModeToggle React Component Documentation
  • +
  • ToggleMode React Component Documentation
  • TutorTicketForm React Component Documentation
  • diff --git a/docs/build/latex/universityofnebraska-computersciencetutoringportal.aux b/docs/build/latex/universityofnebraska-computersciencetutoringportal.aux index b429829..8b4b5f7 100644 --- a/docs/build/latex/universityofnebraska-computersciencetutoringportal.aux +++ b/docs/build/latex/universityofnebraska-computersciencetutoringportal.aux @@ -347,9 +347,9 @@ \newlabel{forms/theme:key-components}{{6.4.2}{26}{Key Components}{subsection.6.4.2}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {6.4.3}Usage}{27}{subsection.6.4.3}\protected@file@percent } \newlabel{forms/theme:usage}{{6.4.3}{27}{Usage}{subsection.6.4.3}{}} -\@writefile{toc}{\contentsline {section}{\numberline {6.5}ModeToggle React Component Documentation}{28}{section.6.5}\protected@file@percent } -\newlabel{forms/toggle:modetoggle-react-component-documentation}{{6.5}{28}{ModeToggle React Component Documentation}{section.6.5}{}} -\newlabel{forms/toggle::doc}{{6.5}{28}{ModeToggle React Component Documentation}{section.6.5}{}} +\@writefile{toc}{\contentsline {section}{\numberline {6.5}ToggleMode React Component Documentation}{28}{section.6.5}\protected@file@percent } +\newlabel{forms/toggle:modetoggle-react-component-documentation}{{6.5}{28}{ToggleMode React Component Documentation}{section.6.5}{}} +\newlabel{forms/toggle::doc}{{6.5}{28}{ToggleMode React Component Documentation}{section.6.5}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {6.5.1}Overview}{28}{subsection.6.5.1}\protected@file@percent } \newlabel{forms/toggle:overview}{{6.5.1}{28}{Overview}{subsection.6.5.1}{}} \@writefile{toc}{\contentsline {subsection}{\numberline {6.5.2}Key Components}{28}{subsection.6.5.2}\protected@file@percent } diff --git a/docs/build/latex/universityofnebraska-computersciencetutoringportal.tex b/docs/build/latex/universityofnebraska-computersciencetutoringportal.tex index 1d7bc61..c383a01 100644 --- a/docs/build/latex/universityofnebraska-computersciencetutoringportal.tex +++ b/docs/build/latex/universityofnebraska-computersciencetutoringportal.tex @@ -3199,16 +3199,16 @@ \subsection{Usage} \sphinxstepscope -\section{ModeToggle React Component Documentation} +\section{ToggleMode React Component Documentation} \label{\detokenize{forms/toggle:modetoggle-react-component-documentation}}\label{\detokenize{forms/toggle::doc}} \sphinxAtStartPar -The \sphinxtitleref{ModeToggle} component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the \sphinxtitleref{lucide\sphinxhyphen{}react} library for icon components and leverages the \sphinxtitleref{DropdownMenu} component for the theme selection options. +The \sphinxtitleref{ToggleMode} component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the \sphinxtitleref{lucide\sphinxhyphen{}react} library for icon components and leverages the \sphinxtitleref{DropdownMenu} component for the theme selection options. \subsection{Overview} \label{\detokenize{forms/toggle:overview}} \sphinxAtStartPar -The \sphinxtitleref{ModeToggle} component offers a user\sphinxhyphen{}friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options. +The \sphinxtitleref{ToggleMode} component offers a user\sphinxhyphen{}friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options. \subsection{Key Components} @@ -3235,21 +3235,21 @@ \subsection{Key Components} \subsection{Usage} \label{\detokenize{forms/toggle:usage}} \sphinxAtStartPar -To use the \sphinxtitleref{ModeToggle} component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly. +To use the \sphinxtitleref{ToggleMode} component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly. \sphinxAtStartPar Example: \sphinxAtStartPar {\color{red}\bfseries{}\textasciigrave{}\textasciigrave{}}{\color{red}\bfseries{}\textasciigrave{}}jsx -import ModeToggle from “@/path/to/ModeToggle”; +import ToggleMode from “@/path/to/ToggleMode”; \begin{description} \sphinxlineitem{function ThemeSettingsPage() \{}\begin{description} \sphinxlineitem{return (}\begin{description} \sphinxlineitem{\textless{}div\textgreater{}} \sphinxAtStartPar \textless{}h1\textgreater{}Theme Settings\textless{}/h1\textgreater{} -\textless{}ModeToggle /\textgreater{} +\textless{}ToggleMode /\textgreater{} \end{description} diff --git a/docs/build/latex/universityofnebraska-computersciencetutoringportal.toc b/docs/build/latex/universityofnebraska-computersciencetutoringportal.toc index 7c6acfa..9597f2e 100644 --- a/docs/build/latex/universityofnebraska-computersciencetutoringportal.toc +++ b/docs/build/latex/universityofnebraska-computersciencetutoringportal.toc @@ -41,7 +41,7 @@ \contentsline {subsection}{\numberline {6.4.1}Overview}{26}{subsection.6.4.1}% \contentsline {subsection}{\numberline {6.4.2}Key Components}{26}{subsection.6.4.2}% \contentsline {subsection}{\numberline {6.4.3}Usage}{27}{subsection.6.4.3}% -\contentsline {section}{\numberline {6.5}ModeToggle React Component Documentation}{28}{section.6.5}% +\contentsline {section}{\numberline {6.5}ToggleMode React Component Documentation}{28}{section.6.5}% \contentsline {subsection}{\numberline {6.5.1}Overview}{28}{subsection.6.5.1}% \contentsline {subsection}{\numberline {6.5.2}Key Components}{28}{subsection.6.5.2}% \contentsline {subsection}{\numberline {6.5.3}Usage}{28}{subsection.6.5.3}% diff --git a/docs/source/forms/toggle.rst b/docs/source/forms/toggle.rst index 8910059..5cd06ed 100644 --- a/docs/source/forms/toggle.rst +++ b/docs/source/forms/toggle.rst @@ -1,12 +1,12 @@ -ModeToggle React Component Documentation +ToggleMode React Component Documentation ======================================== -The `ModeToggle` component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the `lucide-react` library for icon components and leverages the `DropdownMenu` component for the theme selection options. +The `ToggleMode` component is a React component that provides a mode toggle button for changing the theme of a ticketing portal. It utilizes icons for the sun and moon to represent light and dark themes, respectively. The component is implemented using the `lucide-react` library for icon components and leverages the `DropdownMenu` component for the theme selection options. Overview -------- -The `ModeToggle` component offers a user-friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options. +The `ToggleMode` component offers a user-friendly way to switch between light, dark, and system (default) themes in the ticketing portal. Users can click on the button to reveal a dropdown menu with theme options. Key Components -------------- @@ -26,18 +26,18 @@ The `useTheme` hook from `@/forms/ThemeProvider` is used to access the `setTheme Usage ----- -To use the `ModeToggle` component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly. +To use the `ToggleMode` component, integrate it into a parent component or page within a React application. Ensure that the necessary dependencies are imported, and handle theme changes accordingly. Example: ```jsx -import ModeToggle from "@/path/to/ModeToggle"; +import ToggleMode from "@/path/to/ToggleMode"; function ThemeSettingsPage() { return (

    Theme Settings

    - +
    ); } diff --git a/frontend/src/Root.tsx b/frontend/src/Root.tsx index 3451c03..e3dee22 100644 --- a/frontend/src/Root.tsx +++ b/frontend/src/Root.tsx @@ -1,5 +1,5 @@ import {Outlet, useLocation, useNavigate} from "react-router-dom"; -import Navbar from "@/components/navigation/Navbar"; +import Navbar from "@/components/navigation/navbar.tsx"; import { Toaster } from "@/components/ui/toaster"; import {TooltipProvider} from "@/components/ui/tooltip.tsx"; import {ResizableHandle, ResizablePanel, ResizablePanelGroup} from "@/components/ui/resizable.tsx"; diff --git a/frontend/src/authConfig.ts b/frontend/src/auth-config.ts similarity index 100% rename from frontend/src/authConfig.ts rename to frontend/src/auth-config.ts diff --git a/frontend/src/components/navigation/NewSidebar.tsx b/frontend/src/components/navigation/NewSidebar.tsx index e82f50b..bdbc3e8 100644 --- a/frontend/src/components/navigation/NewSidebar.tsx +++ b/frontend/src/components/navigation/NewSidebar.tsx @@ -1,7 +1,7 @@ import {useEffect, useState} from "react"; import {useLocation} from "react-router-dom"; import {Outlet, useLocation, useNavigate} from "react-router-dom"; -import Navbar from "@/components/navigation/Navbar"; +import Navbar from "@/components/navigation/navbar.tsx"; import { Toaster } from "@/components/ui/toaster"; import {TooltipProvider} from "@/components/ui/tooltip.tsx"; import {ResizableHandle, ResizablePanel, ResizablePanelGroup} from "@/components/ui/resizable.tsx"; diff --git a/frontend/src/components/navigation/Sidebar.tsx b/frontend/src/components/navigation/Sidebar.tsx index fd47dbf..244a2cc 100644 --- a/frontend/src/components/navigation/Sidebar.tsx +++ b/frontend/src/components/navigation/Sidebar.tsx @@ -2,7 +2,7 @@ import ZoomIcon from "@/components/assets/zoom-icon.tsx"; import { useEffect, useState } from "react"; import { useLocation, useNavigate } from "react-router-dom"; import { ScrollArea } from "@/components/ui/scroll-area"; -import Navlink from "@/components/navigation/Navlink"; +import Navlink from "@/components/navigation/navlink.tsx"; import { BugIcon, CalendarClockIcon, diff --git a/frontend/src/components/navigation/Navbar.tsx b/frontend/src/components/navigation/navbar.tsx similarity index 99% rename from frontend/src/components/navigation/Navbar.tsx rename to frontend/src/components/navigation/navbar.tsx index 306f4ff..2f856a8 100644 --- a/frontend/src/components/navigation/Navbar.tsx +++ b/frontend/src/components/navigation/navbar.tsx @@ -1,5 +1,5 @@ import { GithubIcon } from "lucide-react"; -import { ModeToggle } from "@/forms/ModeToggle"; +import { ToggleMode } from "@/forms/toggle-mode.tsx"; import { Button } from "@/components/ui/button"; import UnoIcon from "@/components/assets/uno-icon.tsx"; import { Separator } from "@/components/ui/separator"; @@ -100,7 +100,7 @@ export default function Navbar() { - +

    Color Theme

    diff --git a/frontend/src/components/navigation/Navlink.tsx b/frontend/src/components/navigation/navlink.tsx similarity index 100% rename from frontend/src/components/navigation/Navlink.tsx rename to frontend/src/components/navigation/navlink.tsx diff --git a/frontend/src/components/tables/TicketTable.tsx b/frontend/src/components/tables/TicketTable.tsx index 6b5a1e6..e3630bc 100644 --- a/frontend/src/components/tables/TicketTable.tsx +++ b/frontend/src/components/tables/TicketTable.tsx @@ -1,4 +1,4 @@ -import TutorTicketForm from "@/forms/TutorTicketForm"; +import TutorTicketForm from "@/forms/tutor-ticket-form.tsx"; import { Button } from "@/components/ui/button"; import { Table, diff --git a/frontend/src/components/tickets/Ticket.tsx b/frontend/src/components/tickets/ticket.tsx similarity index 95% rename from frontend/src/components/tickets/Ticket.tsx rename to frontend/src/components/tickets/ticket.tsx index 8acb001..cfdccd0 100644 --- a/frontend/src/components/tickets/Ticket.tsx +++ b/frontend/src/components/tickets/ticket.tsx @@ -1,6 +1,6 @@ import { CardDescription, CardTitle } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; -import TutorTicketForm from "@/forms/TutorTicketForm"; +import TutorTicketForm from "@/forms/tutor-ticket-form.tsx"; import { CSCIIcon } from "@/components/assets/department-icons.tsx"; import { CheckIcon, CircleDashedIcon, CircleIcon, XIcon } from "lucide-react"; @@ -14,7 +14,7 @@ export default function Ticket({ ticket }: any) { {ticket.title} {ticket.status === "CLOSED" && - (ticket.was_successful === true ? ( + (ticket.was_successful ? ( ) : ( diff --git a/frontend/src/forms/AnnouncementForm.tsx b/frontend/src/forms/announcement-form.tsx similarity index 100% rename from frontend/src/forms/AnnouncementForm.tsx rename to frontend/src/forms/announcement-form.tsx diff --git a/frontend/src/forms/ThemeProvider.tsx b/frontend/src/forms/theme-provider.tsx similarity index 100% rename from frontend/src/forms/ThemeProvider.tsx rename to frontend/src/forms/theme-provider.tsx diff --git a/frontend/src/forms/TicketForm.tsx b/frontend/src/forms/ticket-form.tsx similarity index 100% rename from frontend/src/forms/TicketForm.tsx rename to frontend/src/forms/ticket-form.tsx diff --git a/frontend/src/forms/ModeToggle.tsx b/frontend/src/forms/toggle-mode.tsx similarity index 81% rename from frontend/src/forms/ModeToggle.tsx rename to frontend/src/forms/toggle-mode.tsx index 7d26c76..9b3d3bf 100644 --- a/frontend/src/forms/ModeToggle.tsx +++ b/frontend/src/forms/toggle-mode.tsx @@ -7,33 +7,33 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { useTheme } from "@/forms/ThemeProvider"; +import { useTheme } from "@/forms/theme-provider.tsx"; /* - * ModeToggle component provides a theme toggling mechanism with a dropdown menu. + * ToggleMode component provides a theme toggling mechanism with a dropdown menu. * * This component utilizes the useTheme hook to manage theme changes. * It renders a button with sun and moon icons, allowing users to toggle between * light, dark, and system themes through a dropdown menu. * - * @returns {JSX.Element} The JSX element representing the ModeToggle component. + * @returns {JSX.Element} The JSX element representing the ToggleMode component. * * @example - * // Example usage of ModeToggle component: - * import { ModeToggle } from './ModeToggle'; + * // Example usage of ToggleMode component: + * import { ToggleMode } from './ToggleMode'; * * function App() { * return ( *
    *

    My App

    - * + * * ... *
    * ); * } */ -export function ModeToggle() { +export function ToggleMode() { const { setTheme } = useTheme(); return ( diff --git a/frontend/src/forms/TutorTicketForm.tsx b/frontend/src/forms/tutor-ticket-form.tsx similarity index 100% rename from frontend/src/forms/TutorTicketForm.tsx rename to frontend/src/forms/tutor-ticket-form.tsx diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index abe85d1..73ba499 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -2,34 +2,34 @@ import React from "react"; import ReactDOM from "react-dom/client"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import Root from "./Root.tsx"; -import ErrorPage from "@/pages/ErrorPage.tsx"; +import ErrorPage from "@/pages/error/error-page.tsx"; import InfoPage from "@/pages/info-page.tsx"; -import DownloadView from "@/pages/admin/DownloadPage.tsx"; +import DownloadView from "@/pages/admin/download-page.tsx"; import "./style/globals.css"; -import TicketPage from "@/pages/TicketPage.tsx"; -import SchedulePage from "@/pages/SchedulePage.tsx"; -import ProfilePage from "@/pages/ProfilePage.tsx"; -import MessagePage from "@/pages/MessagePage.tsx"; -import AnnouncementPage from "@/pages/admin/AnnouncementPage.tsx"; -import AdminSettings from "@/pages/admin/AdminSettings.tsx"; -import TutorDashboard from "@/pages/tutor/TutorDashboardView.tsx"; -import DevAPIView from "@/pages/development/DevAPIView.tsx"; -import DevSandbox from "@/pages/development/DevSandbox.tsx"; -import AdminDashboard from "@/pages/admin/AdminDashboard.tsx"; -import HomePage from "@/pages/HomePage.tsx"; -import HoursPage from "@/pages/HoursPage.tsx"; -import BlamePage from "@/pages/admin/BlamePage.tsx"; +import TicketPage from "@/pages/ticket-page.tsx"; +import SchedulePage from "@/pages/schedule-page.tsx"; +import ProfilePage from "@/pages/profile-page.tsx"; +import MessagePage from "@/pages/message-page.tsx"; +import AnnouncementPage from "@/pages/admin/announcement-page.tsx"; +import AdminSettings from "@/pages/admin/admin-settings.tsx"; +import TutorDashboard from "@/pages/tutor/tutor-dashboard-page.tsx"; +import DevApiPage from "@/pages/development/dev-api-page.tsx"; +import DevSandbox from "@/pages/development/dev-sandbox.tsx"; +import AdminDashboard from "@/pages/admin/admin-dashboard.tsx"; +import HomePage from "@/pages/home-page.tsx"; +import HoursPage from "@/pages/hours-page.tsx"; +import BlamePage from "@/pages/admin/blame-page.tsx"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import TutorView from "@/pages/tutor/TutorView.tsx"; -import AdminRequired from "./routes/AdminRequired.tsx"; -import TutorRequired from "./routes/TutorRequired.tsx"; -import LoginRequired from "./routes/LoginRequired.tsx"; -import LoginPage from "@/pages/LoginPage.tsx"; +import TutorPage from "@/pages/tutor/tutor-page.tsx"; +import AdminRequired from "./routes/admin-required.tsx"; +import TutorRequired from "./routes/tutor-required.tsx"; +import LoginRequired from "./routes/login-required.tsx"; +import LoginPage from "@/pages/login-page.tsx"; import { PublicClientApplication } from "@azure/msal-browser"; import { MsalProvider } from "@azure/msal-react"; -import { msalConfig } from "./authConfig.ts"; +import { msalConfig } from "./auth-config.ts"; // import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import { ThemeProvider } from "@/forms/ThemeProvider.tsx"; +import { ThemeProvider } from "@/forms/theme-provider.tsx"; import {ReactQueryDevtools} from "@tanstack/react-query-devtools"; const queryClient = new QueryClient(); @@ -91,7 +91,7 @@ const router = createBrowserRouter([ }, { path: "tutor/tutors/", - element: } />, + element: } />, }, { path: "tutor/dashboard/", diff --git a/frontend/src/pages/admin/AdminDashboard.tsx b/frontend/src/pages/admin/admin-dashboard.tsx similarity index 99% rename from frontend/src/pages/admin/AdminDashboard.tsx rename to frontend/src/pages/admin/admin-dashboard.tsx index f7fe1b0..f8f75fd 100644 --- a/frontend/src/pages/admin/AdminDashboard.tsx +++ b/frontend/src/pages/admin/admin-dashboard.tsx @@ -1,4 +1,4 @@ -import Ticket from "@/components/tickets/Ticket"; +import Ticket from "@/components/tickets/ticket.tsx"; import Header from "@/components/typography/Header"; import { Card, diff --git a/frontend/src/pages/admin/AdminSettings.tsx b/frontend/src/pages/admin/admin-settings.tsx similarity index 100% rename from frontend/src/pages/admin/AdminSettings.tsx rename to frontend/src/pages/admin/admin-settings.tsx diff --git a/frontend/src/pages/admin/AnnouncementPage.tsx b/frontend/src/pages/admin/announcement-page.tsx similarity index 97% rename from frontend/src/pages/admin/AnnouncementPage.tsx rename to frontend/src/pages/admin/announcement-page.tsx index 0f6aea9..3e9429f 100644 --- a/frontend/src/pages/admin/AnnouncementPage.tsx +++ b/frontend/src/pages/admin/announcement-page.tsx @@ -1,6 +1,6 @@ import Header from "@/components/typography/Header"; import { Separator } from "@/components/ui/separator"; -import AnnouncementForm from "@/forms/AnnouncementForm"; +import AnnouncementForm from "@/forms/announcement-form.tsx"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import {useQuery} from "@tanstack/react-query"; import {fetchData} from "@/API/api.ts"; diff --git a/frontend/src/pages/admin/BlamePage.tsx b/frontend/src/pages/admin/blame-page.tsx similarity index 100% rename from frontend/src/pages/admin/BlamePage.tsx rename to frontend/src/pages/admin/blame-page.tsx diff --git a/frontend/src/pages/admin/DownloadPage.tsx b/frontend/src/pages/admin/download-page.tsx similarity index 100% rename from frontend/src/pages/admin/DownloadPage.tsx rename to frontend/src/pages/admin/download-page.tsx diff --git a/frontend/src/pages/development/DevAPIView.tsx b/frontend/src/pages/development/dev-api-page.tsx similarity index 90% rename from frontend/src/pages/development/DevAPIView.tsx rename to frontend/src/pages/development/dev-api-page.tsx index b414c00..001be90 100644 --- a/frontend/src/pages/development/DevAPIView.tsx +++ b/frontend/src/pages/development/dev-api-page.tsx @@ -2,7 +2,7 @@ // import useFetchTicket from "@/API/tickets/useFetchTicket"; // import useFetchTutor from "@/API/tutors/useFetchTutor"; -export default function DevAPIView() { +export default function DevApiPage() { // const professors = useFetchProfessor(); // const tutors = useFetchTutor(); // const tickets = useFetchTicket(); diff --git a/frontend/src/pages/development/DevGenerateData.tsx b/frontend/src/pages/development/dev-generate-page.tsx similarity index 100% rename from frontend/src/pages/development/DevGenerateData.tsx rename to frontend/src/pages/development/dev-generate-page.tsx diff --git a/frontend/src/pages/development/DevSandbox.tsx b/frontend/src/pages/development/dev-sandbox.tsx similarity index 100% rename from frontend/src/pages/development/DevSandbox.tsx rename to frontend/src/pages/development/dev-sandbox.tsx diff --git a/frontend/src/pages/ErrorPage.tsx b/frontend/src/pages/error/error-page.tsx similarity index 100% rename from frontend/src/pages/ErrorPage.tsx rename to frontend/src/pages/error/error-page.tsx diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/home-page.tsx similarity index 100% rename from frontend/src/pages/HomePage.tsx rename to frontend/src/pages/home-page.tsx diff --git a/frontend/src/pages/HoursPage.tsx b/frontend/src/pages/hours-page.tsx similarity index 100% rename from frontend/src/pages/HoursPage.tsx rename to frontend/src/pages/hours-page.tsx diff --git a/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/login-page.tsx similarity index 98% rename from frontend/src/pages/LoginPage.tsx rename to frontend/src/pages/login-page.tsx index a17ae3a..cc628c1 100644 --- a/frontend/src/pages/LoginPage.tsx +++ b/frontend/src/pages/login-page.tsx @@ -6,7 +6,7 @@ import { Link } from "@radix-ui/themes"; import Uno from "@/components/assets/uno.tsx"; import { useIsAuthenticated } from "@azure/msal-react"; import { useMsal } from "@azure/msal-react"; -import { loginRequest } from "../authConfig"; +import { loginRequest } from "../auth-config.ts"; import MicrosoftIcon from "@/components/assets/microsoft-icon.tsx"; import { useNavigate } from "react-router-dom"; diff --git a/frontend/src/pages/MessagePage.tsx b/frontend/src/pages/message-page.tsx similarity index 100% rename from frontend/src/pages/MessagePage.tsx rename to frontend/src/pages/message-page.tsx diff --git a/frontend/src/pages/ProfilePage.tsx b/frontend/src/pages/profile-page.tsx similarity index 100% rename from frontend/src/pages/ProfilePage.tsx rename to frontend/src/pages/profile-page.tsx diff --git a/frontend/src/pages/SchedulePage.tsx b/frontend/src/pages/schedule-page.tsx similarity index 100% rename from frontend/src/pages/SchedulePage.tsx rename to frontend/src/pages/schedule-page.tsx diff --git a/frontend/src/pages/TicketPage.tsx b/frontend/src/pages/ticket-page.tsx similarity index 95% rename from frontend/src/pages/TicketPage.tsx rename to frontend/src/pages/ticket-page.tsx index 5b0cba8..39cbb10 100644 --- a/frontend/src/pages/TicketPage.tsx +++ b/frontend/src/pages/ticket-page.tsx @@ -1,4 +1,4 @@ -import TicketForm from "@/forms/TicketForm"; +import TicketForm from "@/forms/ticket-form.tsx"; import Header from "@/components/typography/Header"; import {Separator} from "@/components/ui/separator"; import {Announcement} from "@/components/display/announcement.tsx"; diff --git a/frontend/src/pages/tutor/TutorDashboardView.tsx b/frontend/src/pages/tutor/tutor-dashboard-page.tsx similarity index 99% rename from frontend/src/pages/tutor/TutorDashboardView.tsx rename to frontend/src/pages/tutor/tutor-dashboard-page.tsx index f61b5da..6c8c731 100644 --- a/frontend/src/pages/tutor/TutorDashboardView.tsx +++ b/frontend/src/pages/tutor/tutor-dashboard-page.tsx @@ -1,4 +1,4 @@ -import Ticket from "@/components/tickets/Ticket"; +import Ticket from "@/components/tickets/ticket.tsx"; import Header from "@/components/typography/Header"; import { Card, diff --git a/frontend/src/pages/tutor/TutorView.tsx b/frontend/src/pages/tutor/tutor-page.tsx similarity index 99% rename from frontend/src/pages/tutor/TutorView.tsx rename to frontend/src/pages/tutor/tutor-page.tsx index 2595b99..2212ba2 100644 --- a/frontend/src/pages/tutor/TutorView.tsx +++ b/frontend/src/pages/tutor/tutor-page.tsx @@ -20,7 +20,7 @@ import { import { CalendarIcon } from "@radix-ui/react-icons"; import { TableCell } from "@radix-ui/themes"; -export default function TutorView() { +export default function TutorPage() { const tutors = useFetchTutor(); return ( <> diff --git a/frontend/src/pages/WebsocketView.tsx b/frontend/src/pages/websocket-page.tsx similarity index 97% rename from frontend/src/pages/WebsocketView.tsx rename to frontend/src/pages/websocket-page.tsx index 7542024..69184f4 100644 --- a/frontend/src/pages/WebsocketView.tsx +++ b/frontend/src/pages/websocket-page.tsx @@ -3,7 +3,7 @@ import { Button } from "@/components/ui/button"; import { useCallback } from "react"; import useWebSocket, { ReadyState } from "react-use-websocket"; -export default function WebSocketView() { +export default function WebsocketPage() { // const [websocket, setWebsocket] = useState({ // filledForm: false, // messages: [], diff --git a/frontend/src/routes/AdminRequired.tsx b/frontend/src/routes/admin-required.tsx similarity index 100% rename from frontend/src/routes/AdminRequired.tsx rename to frontend/src/routes/admin-required.tsx diff --git a/frontend/src/routes/LoginRequired.tsx b/frontend/src/routes/login-required.tsx similarity index 100% rename from frontend/src/routes/LoginRequired.tsx rename to frontend/src/routes/login-required.tsx diff --git a/frontend/src/routes/LogoutView.tsx b/frontend/src/routes/logout-page.tsx similarity index 100% rename from frontend/src/routes/LogoutView.tsx rename to frontend/src/routes/logout-page.tsx diff --git a/frontend/src/routes/LogoutRequired.tsx b/frontend/src/routes/logout-required.tsx similarity index 100% rename from frontend/src/routes/LogoutRequired.tsx rename to frontend/src/routes/logout-required.tsx diff --git a/frontend/src/routes/TutorRequired.tsx b/frontend/src/routes/tutor-required.tsx similarity index 100% rename from frontend/src/routes/TutorRequired.tsx rename to frontend/src/routes/tutor-required.tsx