style: adjust modal height

This commit is contained in:
zhom
2025-07-08 04:57:25 +04:00
parent 689ac8e3ca
commit 3ca454a2c5
5 changed files with 32 additions and 15 deletions
+5
View File
@@ -17,6 +17,7 @@
"cmdk", "cmdk",
"codegen", "codegen",
"CTYPE", "CTYPE",
"datareporting",
"devedition", "devedition",
"doesn", "doesn",
"donutbrowser", "donutbrowser",
@@ -32,12 +33,14 @@
"gettimezone", "gettimezone",
"gifs", "gifs",
"gsettings", "gsettings",
"healthreport",
"hkcu", "hkcu",
"icns", "icns",
"idletime", "idletime",
"Inno", "Inno",
"KHTML", "KHTML",
"launchservices", "launchservices",
"letterboxing",
"libatk", "libatk",
"libayatana", "libayatana",
"libcairo", "libcairo",
@@ -63,6 +66,7 @@
"objc", "objc",
"orhun", "orhun",
"osascript", "osascript",
"peerconnection",
"pixbuf", "pixbuf",
"plasmohq", "plasmohq",
"prefs", "prefs",
@@ -94,6 +98,7 @@
"timedatectl", "timedatectl",
"titlebar", "titlebar",
"Torbrowser", "Torbrowser",
"trackingprotection",
"turbopack", "turbopack",
"udeps", "udeps",
"unlisten", "unlisten",
+1 -1
View File
@@ -140,7 +140,7 @@ export function CamoufoxConfigDialog({
</DialogTitle> </DialogTitle>
</DialogHeader> </DialogHeader>
<ScrollArea className="flex-1 pr-6 h-[350px]"> <ScrollArea className="flex-1 pr-6 h-[320px]">
<div className="py-4 space-y-6"> <div className="py-4 space-y-6">
{/* Operating System */} {/* Operating System */}
<div className="space-y-3"> <div className="space-y-3">
+2 -12
View File
@@ -25,7 +25,7 @@ import {
} from "@/components/ui/select"; } from "@/components/ui/select";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { useBrowserDownload } from "@/hooks/use-browser-download"; 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"; import type { BrowserReleaseTypes, CamoufoxConfig, StoredProxy } from "@/types";
type BrowserTypeString = 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({ export function CreateProfileDialog({
isOpen, isOpen,
onClose, onClose,
@@ -325,7 +315,7 @@ export function CreateProfileDialog({
<TabsTrigger value="anti-detect">Anti-Detect</TabsTrigger> <TabsTrigger value="anti-detect">Anti-Detect</TabsTrigger>
</TabsList> </TabsList>
<ScrollArea className="flex-1 pr-6 h-[350px]"> <ScrollArea className="flex-1 pr-6 h-[320px]">
<div className="py-4 space-y-6"> <div className="py-4 space-y-6">
{/* Profile Name - Common to both tabs */} {/* Profile Name - Common to both tabs */}
<div className="space-y-2"> <div className="space-y-2">
+14 -2
View File
@@ -45,7 +45,12 @@ import {
TooltipTrigger, TooltipTrigger,
} from "@/components/ui/tooltip"; } from "@/components/ui/tooltip";
import { useTableSorting } from "@/hooks/use-table-sorting"; 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 type { BrowserProfile, StoredProxy } from "@/types";
import { Input } from "./ui/input"; import { Input } from "./ui/input";
import { Label } from "./ui/label"; import { Label } from "./ui/label";
@@ -524,9 +529,16 @@ export function ProfilesDataTable({
getCoreRowModel: getCoreRowModel(), getCoreRowModel: getCoreRowModel(),
}); });
const platform = getCurrentOS();
return ( return (
<> <>
<ScrollArea className="h-[400px] rounded-md border"> <ScrollArea
className={cn(
"rounded-md border",
platform === "macos" ? "h-[380px]" : "h-[320px]",
)}
>
<Table> <Table>
<TableHeader> <TableHeader>
{table.getHeaderGroups().map((headerGroup) => ( {table.getHeaderGroups().map((headerGroup) => (
+10
View File
@@ -49,3 +49,13 @@ export function getBrowserIcon(browserType: string) {
return null; 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";
};