From 85b9c11bf1f85206abe7b9988aae0617ce3d9d93 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Tue, 2 Dec 2025 19:46:06 -0600 Subject: [PATCH] adding daisyui --- client/src/App.tsx | 9 +- client/src/components/logbook/Logbook.tsx | 18 ++- .../components/logbookCard/LogbookCard.tsx | 23 ++- .../logbookDrawer/LogbookDrawer.tsx | 6 +- client/src/components/siteNav/SiteNav.tsx | 135 ++++++++++++------ client/src/components/trackMap/TrackMap.css | 53 ------- client/src/components/trackMap/TrackMap.tsx | 4 - client/src/index.html | 2 +- client/src/styles.css | 48 +++++-- package-lock.json | 18 +-- package.json | 1 + 11 files changed, 165 insertions(+), 152 deletions(-) delete mode 100644 client/src/components/trackMap/TrackMap.css diff --git a/client/src/App.tsx b/client/src/App.tsx index 8f73ed4..e629bd3 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,23 +1,22 @@ -import { Navigate, Route, Routes } from 'react-router-dom'; +import { Route, Routes } from 'react-router-dom'; import Flights from './components/flights/Flights'; import Logbook from './components/logbook/Logbook'; import Pilots from './components/pilots/Pilots'; import SiteNav from './components/siteNav/SiteNav'; -import { HeroUIProvider } from '@heroui/react'; -import { useHref, useNavigate } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; const App = () => { const navigate = useNavigate(); return ( - +
} /> } /> } /> - +
); }; diff --git a/client/src/components/logbook/Logbook.tsx b/client/src/components/logbook/Logbook.tsx index 2d4fa83..c621c8f 100644 --- a/client/src/components/logbook/Logbook.tsx +++ b/client/src/components/logbook/Logbook.tsx @@ -503,14 +503,20 @@ const Logbook: React.FC = () => {
{userRole === UserRole.WRITE && - + + }
{!state.isLoading && state.alert && ( diff --git a/client/src/components/logbookCard/LogbookCard.tsx b/client/src/components/logbookCard/LogbookCard.tsx index ac6f3df..fd3316b 100644 --- a/client/src/components/logbookCard/LogbookCard.tsx +++ b/client/src/components/logbookCard/LogbookCard.tsx @@ -1,4 +1,3 @@ -import { Accordion, AccordionItem, Card, CardBody, CardHeader } from '@heroui/react' import { LogbookCardProps } from "./LogbookCardProps.interface"; import TrackMap from "../trackMap/TrackMap"; @@ -11,11 +10,9 @@ const LogbookCard = ({ logs, mode, onDelete, onOpenCloseForm }: LogbookCardProps return (
- - -

{formattedDate}

-
- +
+

{formattedDate}

+
{mode === 'flights' && log.tracks && log.tracks.length > 0 &&
} - - +
+
Details
+
Aircraft Make and Model @@ -63,11 +61,10 @@ const LogbookCard = ({ logs, mode, onDelete, onOpenCloseForm }: LogbookCardProps }
- - - - - +
+
+
+
) })} diff --git a/client/src/components/logbookDrawer/LogbookDrawer.tsx b/client/src/components/logbookDrawer/LogbookDrawer.tsx index a4a61c6..c2a6f78 100644 --- a/client/src/components/logbookDrawer/LogbookDrawer.tsx +++ b/client/src/components/logbookDrawer/LogbookDrawer.tsx @@ -74,7 +74,7 @@ const LogbookDrawer = ({ onOpenClose }: LogbookDrawerProps) => { } return ( - @@ -83,13 +83,13 @@ const LogbookDrawer = ({ onOpenClose }: LogbookDrawerProps) => { isOpen={logbookContext.state.isDrawerOpen} onClose={onCancel} > - +
{`${logbookContext.state.formMode.toString().toLowerCase().charAt(0).toUpperCase() + logbookContext.state.formMode.toString().slice(1).toLowerCase()} Entry`} - +
{logbookContext.state.formAlert && (
{ }, [isUserLoggedIn]); return ( - - - - - - - - - {pages.length > 0 && pages.map((page, index) => { - return ( - - - {page.name} - - - ) - })} - - - {!isUserLoggedIn && - - } - {isUserLoggedIn && - - - - - - logout({redirectTo: 'specific url', url: '/'})} startContent={}> - Sign Out - - - - } - - +
+
+
+
+ +
+ +
+ daisyUI +
+
+ +
+
+ Button +
+
+ // + // + // + // + // + // + // + // + // {pages.length > 0 && pages.map((page, index) => { + // return ( + // + // + // {page.name} + // + // + // ) + // })} + // + // + // {!isUserLoggedIn && + // + // } + // {isUserLoggedIn && + // + // + // + // + // + // logout({redirectTo: 'specific url', url: '/'})} startContent={}> + // Sign Out + // + // + // + // } + // + // ); }; diff --git a/client/src/components/trackMap/TrackMap.css b/client/src/components/trackMap/TrackMap.css deleted file mode 100644 index 287c2f3..0000000 --- a/client/src/components/trackMap/TrackMap.css +++ /dev/null @@ -1,53 +0,0 @@ -#app { - height: 100%; -} -html, -body { - position: relative; - height: 100%; -} - -body { - background: #eee; - font-family: Helvetica Neue, Helvetica, Arial, sans-serif; - font-size: 14px; - color: #000; - margin: 0; - padding: 0; -} - -.swiper { - width: 100%; - height: 100%; -} - -.swiper-wrapper { - margin-bottom: 20px; -} - -.swiper-slide { - text-align: center; - font-size: 18px; - background: #fff; - display: flex; - justify-content: center; - align-items: center; -} - -.swiper-slide img { - display: block; - width: 100%; - height: 100%; - object-fit: cover; -} - -.swiper-pagination-bullet { - background-color: #000000; - height: 13px; - width: 13px; - border: 2px solid #FFFFFF; -} - -.swiper-pagination-bullet-active { - box-shadow: 0 0 0 1px #000000; -} diff --git a/client/src/components/trackMap/TrackMap.tsx b/client/src/components/trackMap/TrackMap.tsx index 6d548ed..66c598f 100644 --- a/client/src/components/trackMap/TrackMap.tsx +++ b/client/src/components/trackMap/TrackMap.tsx @@ -4,10 +4,6 @@ import { AxiosInstance, AxiosResponse } from 'axios'; import { useAuth } from 'react-oidc-context' import { MapContainer, TileLayer } from 'react-leaflet'; import ReactLeafletKml from 'react-leaflet-kml'; -import 'swiper/css'; -import 'swiper/css/pagination'; -import 'swiper/css'; -import './TrackMap.css'; import 'leaflet/dist/leaflet.css'; import httpClient from '../../httpClient/httpClient' diff --git a/client/src/index.html b/client/src/index.html index 3d12a78..0f1831a 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -6,7 +6,7 @@ Flying - +
diff --git a/client/src/styles.css b/client/src/styles.css index a81fa50..624f9bc 100644 --- a/client/src/styles.css +++ b/client/src/styles.css @@ -1,15 +1,41 @@ @import "tailwindcss"; -@plugin './hero.ts'; -/* Note: You may need to change the path to fit your project structure */ -@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; -@custom-variant dark (&:is(.dark *)); @plugin "@tailwindcss/typography"; - -@theme inline { - --color-primary: #000000; +@plugin "daisyui/theme" { + name: "lofi"; + default: true; + prefersdark: false; + color-scheme: "light"; + --color-base-100: oklch(100% 0 0); + --color-base-200: oklch(97% 0 0); + --color-base-300: oklch(94% 0 0); + --color-base-content: oklch(0% 0 0); + --color-primary: oklch(15.906% 0 0); + --color-primary-content: oklch(100% 0 0); + --color-secondary: oklch(21.455% 0.001 17.278); + --color-secondary-content: oklch(100% 0 0); + --color-accent: oklch(26.861% 0 0); + --color-accent-content: oklch(100% 0 0); + --color-neutral: oklch(0% 0 0); + --color-neutral-content: oklch(100% 0 0); + --color-info: oklch(79.54% 0.103 205.9); + --color-info-content: oklch(15.908% 0.02 205.9); + --color-success: oklch(90.13% 0.153 164.14); + --color-success-content: oklch(18.026% 0.03 164.14); + --color-warning: oklch(88.37% 0.135 79.94); + --color-warning-content: oklch(17.674% 0.027 79.94); + --color-error: oklch(78.66% 0.15 28.47); + --color-error-content: oklch(15.732% 0.03 28.47); + --radius-selector: 0.5rem; + --radius-field: 0.5rem; + --radius-box: 0.5rem; + --size-selector: 0.25rem; + --size-field: 0.25rem; + --border: 1px; + --depth: 0; + --noise: 0; } - - - - +body { + background-color: #f5f5f5; + min-height: 100vh; +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5c59a2d..4e92979 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", + "daisyui": "^5.5.5", "eslint": "^8.42.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-react-hooks": "^4.6.0", @@ -225,15 +226,6 @@ "react": "^16.3 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "client/node_modules/daisyui": { - "version": "5.1.10", - "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.1.10.tgz", - "integrity": "sha512-p1J/HME2WmaSiy6u2alIbeP3gd5PNVft3+6Bdll0BRSm/UdI4084+pD01LxFug/5wGexNewWqbcEL6nB2n2o+Q==", - "peer": true, - "funding": { - "url": "https://github.com/saadeghi/daisyui?sponsor=1" - } - }, "client/node_modules/react": { "version": "19.1.1", "resolved": "https://registry.npmjs.org/react/-/react-19.1.1.tgz", @@ -10843,6 +10835,14 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "devOptional": true }, + "node_modules/daisyui": { + "version": "5.5.5", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.5.5.tgz", + "integrity": "sha512-ekvI93ZkWIJoCOtDl0D2QMxnWvTejk9V5nWBqRv+7t0xjiBXqAK5U6o6JE2RPvlIC3EqwNyUoIZSdHX9MZK3nw==", + "funding": { + "url": "https://github.com/saadeghi/daisyui?sponsor=1" + } + }, "node_modules/date-fns-jalali": { "version": "4.1.0-0", "resolved": "https://registry.npmjs.org/date-fns-jalali/-/date-fns-jalali-4.1.0-0.tgz", diff --git a/package.json b/package.json index 86310e1..5270a3d 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", + "daisyui": "^5.5.5", "eslint": "^8.42.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-react-hooks": "^4.6.0",