From baf85dcbec63a0e990040bb63f7cc25086ddf0b7 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Thu, 15 May 2025 17:13:16 +0200 Subject: [PATCH] refactor: Migrate from tailwind.js config to Tailwind CSS config (#451) * refactor: Migrate from tailwind.js config to Tailwind CSS configuration and improve component styling - Removed extensive theme and animation configurations from tailwind.config.js, migrating them to index.css for better organization. - Updated components to utilize CSS variables for grid layouts and animations, enhancing maintainability. - Adjusted various components to reflect the new CSS structure, ensuring consistent styling across the application. - Improved accessibility and responsiveness in several UI components, including headers and popovers. - Fixed minor styling issues and optimized class usage for better performance. * style: use default tailwindcss/forms options * refactor(Header): remove unused LuUser icon import --- ui/src/components/AuthLayout.tsx | 2 +- ui/src/components/Checkbox.tsx | 6 +- ui/src/components/GridBackground.tsx | 4 +- ui/src/components/Header.tsx | 57 ++++---- ui/src/components/WebRTCVideo.tsx | 4 +- .../components/popovers/ExtensionPopover.tsx | 2 +- ui/src/components/popovers/MountPopover.tsx | 2 +- ui/src/components/popovers/PasteModal.tsx | 2 +- .../components/popovers/WakeOnLan/Index.tsx | 2 +- ui/src/components/sidebar/connectionStats.tsx | 2 +- ui/src/index.css | 128 ++++++++++++++++++ ui/src/routes/devices.$id.deregister.tsx | 2 +- ui/src/routes/devices.$id.rename.tsx | 2 +- ui/src/routes/devices.$id.setup.tsx | 2 +- ui/src/routes/devices.$id.tsx | 4 +- ui/src/routes/devices.already-adopted.tsx | 2 +- ui/src/routes/devices.tsx | 4 +- ui/src/routes/login-local.tsx | 2 +- ui/src/routes/welcome-local.mode.tsx | 31 +++-- ui/src/routes/welcome-local.password.tsx | 30 ++-- ui/src/routes/welcome-local.tsx | 32 ++--- ui/tailwind.config.js | 96 ------------- 22 files changed, 233 insertions(+), 185 deletions(-) diff --git a/ui/src/components/AuthLayout.tsx b/ui/src/components/AuthLayout.tsx index b1e9cbc..6c6d5da 100644 --- a/ui/src/components/AuthLayout.tsx +++ b/ui/src/components/AuthLayout.tsx @@ -37,7 +37,7 @@ export default function AuthLayout({ <> -
+
(function Checkbox( ref, ) { const classes = checkboxVariants({ size }); - return ; + return ( + + ); }); Checkbox.displayName = "Checkbox"; diff --git a/ui/src/components/GridBackground.tsx b/ui/src/components/GridBackground.tsx index d0a73ce..7b4349e 100644 --- a/ui/src/components/GridBackground.tsx +++ b/ui/src/components/GridBackground.tsx @@ -1,8 +1,8 @@ export default function GridBackground() { return ( -
+
+
@@ -81,7 +81,7 @@ export default function DashboardNavbar({
-
+
{showConnectionStatus && ( <>
@@ -100,47 +100,50 @@ export default function DashboardNavbar({ )} {isLoggedIn ? ( <> -
+
- - + className="right-0 mt-1 w-56 origin-top-right p-px focus:outline-hidden data-closed:opacity-0" + > -
- {userEmail && ( + {userEmail && ( +
-
Logged in as
-
+
+ Logged in as +
+
{userEmail}
- )} -
-
+
+ )} +