From 419e576a3ee6e37c52022a2c957ab92616c576c5 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Sat, 12 Apr 2025 19:50:30 -0400 Subject: [PATCH] adjust border --- src/app/[orgId]/settings/layout.tsx | 10 +++--- .../resources/[resourceId]/layout.tsx | 14 -------- src/app/[orgId]/settings/sites/SitesTable.tsx | 2 +- .../settings/sites/[niceId]/layout.tsx | 21 ++++++----- .../[orgId]/settings/sites/create/page.tsx | 14 -------- src/app/auth/layout.tsx | 10 +++--- src/app/components/SupporterMessage.tsx | 2 +- src/app/globals.css | 8 ++--- src/app/layout.tsx | 8 ++--- src/components/Breadcrumbs.tsx | 12 +++---- src/components/CopyTextBox.tsx | 2 +- src/components/Header.tsx | 9 ++++- src/components/HorizontalTabs.tsx | 21 +++++++---- src/components/Layout.tsx | 36 +++++++++++++------ src/components/ProfileIcon.tsx | 2 +- src/components/SidebarNav.tsx | 2 +- src/components/StrategySelect.tsx | 2 +- src/components/TopBar.tsx | 4 +-- src/components/tags/autocomplete.tsx | 2 +- src/components/tags/tag-input.tsx | 2 +- src/components/ui/alert.tsx | 6 ++-- src/components/ui/button.tsx | 10 +++--- src/components/ui/checkbox.tsx | 8 ++--- src/components/ui/dropdown-menu.tsx | 4 +-- src/components/ui/input.tsx | 4 +-- src/components/ui/popover.tsx | 2 +- src/components/ui/radio-group.tsx | 2 +- src/components/ui/select.tsx | 4 +-- src/components/ui/switch.tsx | 2 +- src/components/ui/table.tsx | 2 +- tsconfig.json | 3 +- 31 files changed, 118 insertions(+), 112 deletions(-) diff --git a/src/app/[orgId]/settings/layout.tsx b/src/app/[orgId]/settings/layout.tsx index bd5e8bf1..a780d472 100644 --- a/src/app/[orgId]/settings/layout.tsx +++ b/src/app/[orgId]/settings/layout.tsx @@ -29,17 +29,17 @@ const navItems = [ { title: "Sites", href: "/{orgId}/settings/sites", - icon: + // icon: }, { title: "Resources", href: "/{orgId}/settings/resources", - icon: + // icon: }, { title: "Access Control", href: "/{orgId}/settings/access", - icon: , + // icon: , children: [ { title: "Users", @@ -54,12 +54,12 @@ const navItems = [ { title: "Shareable Links", href: "/{orgId}/settings/share-links", - icon: + // icon: }, { title: "General", href: "/{orgId}/settings/general", - icon: + // icon: } ]; diff --git a/src/app/[orgId]/settings/resources/[resourceId]/layout.tsx b/src/app/[orgId]/settings/resources/[resourceId]/layout.tsx index 2c5983a5..edaf7962 100644 --- a/src/app/[orgId]/settings/resources/[resourceId]/layout.tsx +++ b/src/app/[orgId]/settings/resources/[resourceId]/layout.tsx @@ -104,20 +104,6 @@ export default async function ResourceLayout(props: ResourceLayoutProps) { return ( <> -
- - - - Resources - - - - {resource.name} - - - -
- deleteSite(selectedSite.id)} + onConfirm={async () => deleteSite(selectedSite.id)} title="Delete Site" description="Are you sure you want to delete this site? This action cannot be undone." /> diff --git a/src/app/[orgId]/settings/sites/[niceId]/layout.tsx b/src/app/[orgId]/settings/sites/[niceId]/layout.tsx index b5b10b7e..5bcc8af9 100644 --- a/src/app/[orgId]/settings/sites/[niceId]/layout.tsx +++ b/src/app/[orgId]/settings/sites/[niceId]/layout.tsx @@ -46,13 +46,18 @@ export default async function SettingsLayout(props: SettingsLayoutProps) { ]; return ( - -
- - - {children} - -
-
+ <> + + + +
+ + {children} +
+
+ ); } diff --git a/src/app/[orgId]/settings/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx index a64d3c14..23b917ba 100644 --- a/src/app/[orgId]/settings/sites/create/page.tsx +++ b/src/app/[orgId]/settings/sites/create/page.tsx @@ -502,20 +502,6 @@ WantedBy=default.target` return ( <> -
- - - - Sites - - - - Create Site - - - -
-
+
{user && (
@@ -27,9 +27,11 @@ export default async function AuthLayout({ children }: AuthLayoutProps) { )} -
- {children} +
+
+ {children} +
- +
); } diff --git a/src/app/components/SupporterMessage.tsx b/src/app/components/SupporterMessage.tsx index bfec1112..f21cd52c 100644 --- a/src/app/components/SupporterMessage.tsx +++ b/src/app/components/SupporterMessage.tsx @@ -30,7 +30,7 @@ export default function SupporterMessage({ tier }: { tier: string }) { Pangolin -
+
Thank you for supporting Pangolin as a {tier}!
diff --git a/src/app/globals.css b/src/app/globals.css index 6a009138..5bb4f3f0 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -3,7 +3,7 @@ @custom-variant dark (&:is(.dark *)); :root { - --background: hsl(0 0% 100%); + --background: hsl(0 0% 98%); --foreground: hsl(20 0% 10%); --card: hsl(0 0% 100%); --card-foreground: hsl(20 0% 10%); @@ -22,7 +22,7 @@ --border: hsl(20 5.9% 80%); --input: hsl(20 5.9% 75%); --ring: hsl(24.6 95% 53.1%); - --radius: 0.75rem; + --radius: 0.50rem; --chart-1: hsl(12 76% 61%); --chart-2: hsl(173 58% 39%); --chart-3: hsl(197 37% 24%); @@ -31,7 +31,7 @@ } .dark { - --background: hsl(20 0% 10%); + --background: hsl(20 0% 8%); --foreground: hsl(60 9.1% 97.8%); --card: hsl(20 0% 10%); --card-foreground: hsl(60 9.1% 97.8%); @@ -47,7 +47,7 @@ --accent-foreground: hsl(60 9.1% 97.8%); --destructive: hsl(0 72.2% 50.6%); --destructive-foreground: hsl(60 9.1% 97.8%); - --border: hsl(12 6.5% 30%); + --border: hsl(12 6.5% 15%); --input: hsl(12 6.5% 35%); --ring: hsl(20.5 90.2% 48.2%); --chart-1: hsl(220 70% 50%); diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c8144c6c..61bbb601 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import "./globals.css"; -import { Figtree, Inter } from "next/font/google"; +import { Figtree, Inter, Red_Hat_Display, Red_Hat_Mono, Red_Hat_Text, Space_Grotesk } from "next/font/google"; import { Toaster } from "@/components/ui/toaster"; import { ThemeProvider } from "@app/providers/ThemeProvider"; import EnvProvider from "@app/providers/EnvProvider"; @@ -43,7 +43,7 @@ export default async function RootLayout({ return ( - + {/* Main content */} -
-
+
+
{children}
diff --git a/src/components/Breadcrumbs.tsx b/src/components/Breadcrumbs.tsx index bec0973f..02a856b7 100644 --- a/src/components/Breadcrumbs.tsx +++ b/src/components/Breadcrumbs.tsx @@ -47,19 +47,17 @@ export function Breadcrumbs() { }); return ( -
+
); -} \ No newline at end of file +} diff --git a/src/components/CopyTextBox.tsx b/src/components/CopyTextBox.tsx index b6c838ec..c8ba2049 100644 --- a/src/components/CopyTextBox.tsx +++ b/src/components/CopyTextBox.tsx @@ -28,7 +28,7 @@ export default function CopyTextBox({ return (
             
-                Pangolin
+                Pangolin Logo
+                Pangolin
             
         
); diff --git a/src/components/HorizontalTabs.tsx b/src/components/HorizontalTabs.tsx index f79b6fc8..2ed641c8 100644 --- a/src/components/HorizontalTabs.tsx +++ b/src/components/HorizontalTabs.tsx @@ -25,7 +25,10 @@ export function HorizontalTabs({ const params = useParams(); function hydrateHref(href: string) { - return href.replace("{orgId}", params.orgId as string); + return href + .replace("{orgId}", params.orgId as string) + .replace("{resourceId}", params.resourceId as string) + .replace("{niceId}", params.niceId as string); } return ( @@ -35,7 +38,9 @@ export function HorizontalTabs({
{items.map((item) => { const hydratedHref = hydrateHref(item.href); - const isActive = pathname.startsWith(hydratedHref) && !pathname.includes("create"); + const isActive = + pathname.startsWith(hydratedHref) && + !pathname.includes("create"); return ( e.preventDefault() : undefined} + onClick={ + disabled + ? (e) => e.preventDefault() + : undefined + } tabIndex={disabled ? -1 : undefined} aria-disabled={disabled} > @@ -66,9 +75,7 @@ export function HorizontalTabs({
-
- {children} -
+
{children}
); -} \ No newline at end of file +} diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 9c327019..48dff959 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -11,7 +11,13 @@ import SupporterStatus from "@app/components/SupporterStatus"; import { Separator } from "@app/components/ui/separator"; import { Button } from "@app/components/ui/button"; import { Menu, X } from "lucide-react"; -import { Sheet, SheetContent, SheetTrigger, SheetTitle, SheetDescription } from "@app/components/ui/sheet"; +import { + Sheet, + SheetContent, + SheetTrigger, + SheetTitle, + SheetDescription +} from "@app/components/ui/sheet"; import { useEnvContext } from "@app/hooks/useEnvContext"; import { Breadcrumbs } from "@app/components/Breadcrumbs"; @@ -39,24 +45,29 @@ export function Layout({ children, orgId, orgs, navItems }: LayoutProps) {
{/* Mobile Menu Button */}
- + - - Navigation Menu + + + Navigation Menu + Main navigation menu for the application -
+
-
+
{env?.app?.version && ( @@ -80,17 +91,22 @@ export function Layout({ children, orgId, orgs, navItems }: LayoutProps) {
- {env?.app?.version && ( +
- v{env.app.version} + Open Source
- )} + {env?.app?.version && ( +
+ v{env.app.version} +
+ )} +
{/* Main content */}
-
+
diff --git a/src/components/ProfileIcon.tsx b/src/components/ProfileIcon.tsx index 39f89377..4b20afee 100644 --- a/src/components/ProfileIcon.tsx +++ b/src/components/ProfileIcon.tsx @@ -66,7 +66,7 @@ export default function ProfileIcon() { -
+
{user.email} diff --git a/src/components/SidebarNav.tsx b/src/components/SidebarNav.tsx index 318a8091..0851499a 100644 --- a/src/components/SidebarNav.tsx +++ b/src/components/SidebarNav.tsx @@ -42,7 +42,7 @@ export function SidebarNav({ function renderItems(items: SidebarNavItem[]) { return items.map((item) => { const hydratedHref = hydrateHref(item.href); - const isActive = pathname.startsWith(hydratedHref) && !pathname.includes("create"); + const isActive = pathname.startsWith(hydratedHref); return (
diff --git a/src/components/StrategySelect.tsx b/src/components/StrategySelect.tsx index 86ad4660..f6a899f8 100644 --- a/src/components/StrategySelect.tsx +++ b/src/components/StrategySelect.tsx @@ -44,7 +44,7 @@ export function StrategySelect({ selected === option.id ? "checked" : "unchecked" } className={cn( - "relative flex rounded-lg border-2 p-4 transition-colors cursor-pointer", + "relative flex rounded-lg border p-4 transition-colors cursor-pointer", option.disabled ? "border-input text-muted-foreground cursor-not-allowed opacity-50" : selected === option.id diff --git a/src/components/TopBar.tsx b/src/components/TopBar.tsx index 4fbd62e3..fb2d2000 100644 --- a/src/components/TopBar.tsx +++ b/src/components/TopBar.tsx @@ -10,8 +10,8 @@ interface TopBarProps { export function TopBar({ orgId, orgs }: TopBarProps) { return ( -
-
+
+
= ({ modal={usePortal} >
{childrenWithProps} diff --git a/src/components/tags/tag-input.tsx b/src/components/tags/tag-input.tsx index 500c31f0..b50388f2 100644 --- a/src/components/tags/tag-input.tsx +++ b/src/components/tags/tag-input.tsx @@ -496,7 +496,7 @@ const TagInput = (
diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx index 2e167650..df3f143b 100644 --- a/src/components/ui/alert.tsx +++ b/src/components/ui/alert.tsx @@ -9,11 +9,11 @@ const alertVariants = cva( variants: { variant: { default: "bg-card border text-foreground", - neutral: "bg-card border-2 text-foreground", + neutral: "bg-card border text-foreground", destructive: - "border-destructive/50 border-2 bg-destructive/10 text-destructive dark:border-destructive [&>svg]:text-destructive", + "border-destructive/50 border bg-destructive/10 text-destructive dark:border-destructive [&>svg]:text-destructive", success: - "border-green-500/50 border-2 bg-green-500/10 text-green-500 dark:border-success [&>svg]:text-green-500", + "border-green-500/50 border bg-green-500/10 text-green-500 dark:border-success [&>svg]:text-green-500", }, }, defaultVariants: { diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index a96b7c83..e9936360 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -15,16 +15,16 @@ const buttonVariants = cva( destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", outline: - "border-2 border-input bg-card hover:bg-accent hover:text-accent-foreground", + "border border-input bg-card hover:bg-accent hover:text-accent-foreground", outlinePrimary: - "border-2 border-primary bg-card hover:bg-primary/10 text-primary", + "border border-primary bg-card hover:bg-primary/10 text-primary", secondary: - "bg-secondary border border-input border-2 text-secondary-foreground hover:bg-secondary/80", + "bg-secondary border border-input border text-secondary-foreground hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground", squareOutlinePrimary: - "border-2 border-primary bg-card hover:bg-primary/10 text-primary rounded-md", + "border border-primary bg-card hover:bg-primary/10 text-primary rounded-md", squareOutline: - "border-2 border-input bg-card hover:bg-accent hover:text-accent-foreground rounded-md", + "border border-input bg-card hover:bg-accent hover:text-accent-foreground rounded-md", squareDefault: "bg-primary text-primary-foreground hover:bg-primary/90 rounded-md", text: "", diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx index 083c19d7..d4aadcd3 100644 --- a/src/components/ui/checkbox.tsx +++ b/src/components/ui/checkbox.tsx @@ -14,13 +14,13 @@ const checkboxVariants = cva( variants: { variant: { outlinePrimary: - "border-2 rounded-sm border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", + "border rounded-sm border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", outline: - "border-2 rounded-sm border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground", + "border rounded-sm border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground", outlinePrimarySquare: - "border-2 rounded-[20%] border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", + "border rounded-[20%] border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", outlineSquare: - "border-2 rounded-[20%] border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground" + "border rounded-[20%] border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground" } }, defaultVariants: { diff --git a/src/components/ui/dropdown-menu.tsx b/src/components/ui/dropdown-menu.tsx index c8fc081d..b86efd86 100644 --- a/src/components/ui/dropdown-menu.tsx +++ b/src/components/ui/dropdown-menu.tsx @@ -52,7 +52,7 @@ const DropdownMenuSubContent = ( ) => ( (span]:line-clamp-1", + "flex h-9 w-full items-center justify-between border border-input bg-card px-3 py-2 text-base md:text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", "rounded-md", className )} @@ -92,7 +92,7 @@ const SelectContent = ( (