From 3ca454a2c554a975648d660cfa8d01b9c9210cc5 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Tue, 8 Jul 2025 04:57:25 +0400 Subject: [PATCH] style: adjust modal height --- .vscode/settings.json | 5 +++++ src/components/camoufox-config-dialog.tsx | 2 +- src/components/create-profile-dialog.tsx | 14 ++------------ src/components/profile-data-table.tsx | 16 ++++++++++++++-- src/lib/browser-utils.ts | 10 ++++++++++ 5 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 102b30a..deed89f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,6 +17,7 @@ "cmdk", "codegen", "CTYPE", + "datareporting", "devedition", "doesn", "donutbrowser", @@ -32,12 +33,14 @@ "gettimezone", "gifs", "gsettings", + "healthreport", "hkcu", "icns", "idletime", "Inno", "KHTML", "launchservices", + "letterboxing", "libatk", "libayatana", "libcairo", @@ -63,6 +66,7 @@ "objc", "orhun", "osascript", + "peerconnection", "pixbuf", "plasmohq", "prefs", @@ -94,6 +98,7 @@ "timedatectl", "titlebar", "Torbrowser", + "trackingprotection", "turbopack", "udeps", "unlisten", diff --git a/src/components/camoufox-config-dialog.tsx b/src/components/camoufox-config-dialog.tsx index bf2a365..78d99b5 100644 --- a/src/components/camoufox-config-dialog.tsx +++ b/src/components/camoufox-config-dialog.tsx @@ -140,7 +140,7 @@ export function CamoufoxConfigDialog({ - +
{/* Operating System */}
diff --git a/src/components/create-profile-dialog.tsx b/src/components/create-profile-dialog.tsx index ee63040..2409766 100644 --- a/src/components/create-profile-dialog.tsx +++ b/src/components/create-profile-dialog.tsx @@ -25,7 +25,7 @@ import { } from "@/components/ui/select"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { useBrowserDownload } from "@/hooks/use-browser-download"; -import { getBrowserIcon } from "@/lib/browser-utils"; +import { getBrowserIcon, getCurrentOS } from "@/lib/browser-utils"; import type { BrowserReleaseTypes, CamoufoxConfig, StoredProxy } from "@/types"; type BrowserTypeString = @@ -95,16 +95,6 @@ const browserOptions: BrowserOption[] = [ }, ]; -const getCurrentOS = () => { - if (typeof window !== "undefined") { - const userAgent = window.navigator.userAgent; - if (userAgent.includes("Win")) return "windows"; - if (userAgent.includes("Mac")) return "macos"; - if (userAgent.includes("Linux")) return "linux"; - } - return "unknown"; -}; - export function CreateProfileDialog({ isOpen, onClose, @@ -325,7 +315,7 @@ export function CreateProfileDialog({ Anti-Detect - +
{/* Profile Name - Common to both tabs */}
diff --git a/src/components/profile-data-table.tsx b/src/components/profile-data-table.tsx index 61a87b9..aff1e26 100644 --- a/src/components/profile-data-table.tsx +++ b/src/components/profile-data-table.tsx @@ -45,7 +45,12 @@ import { TooltipTrigger, } from "@/components/ui/tooltip"; import { useTableSorting } from "@/hooks/use-table-sorting"; -import { getBrowserDisplayName, getBrowserIcon } from "@/lib/browser-utils"; +import { + getBrowserDisplayName, + getBrowserIcon, + getCurrentOS, +} from "@/lib/browser-utils"; +import { cn } from "@/lib/utils"; import type { BrowserProfile, StoredProxy } from "@/types"; import { Input } from "./ui/input"; import { Label } from "./ui/label"; @@ -524,9 +529,16 @@ export function ProfilesDataTable({ getCoreRowModel: getCoreRowModel(), }); + const platform = getCurrentOS(); + return ( <> - + {table.getHeaderGroups().map((headerGroup) => ( diff --git a/src/lib/browser-utils.ts b/src/lib/browser-utils.ts index 0fee1c6..c88980b 100644 --- a/src/lib/browser-utils.ts +++ b/src/lib/browser-utils.ts @@ -49,3 +49,13 @@ export function getBrowserIcon(browserType: string) { return null; } } + +export const getCurrentOS = () => { + if (typeof window !== "undefined") { + const userAgent = window.navigator.userAgent; + if (userAgent.includes("Win")) return "windows"; + if (userAgent.includes("Mac")) return "macos"; + if (userAgent.includes("Linux")) return "linux"; + } + return "unknown"; +};