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",
"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",
+1 -1
View File
@@ -140,7 +140,7 @@ export function CamoufoxConfigDialog({
</DialogTitle>
</DialogHeader>
<ScrollArea className="flex-1 pr-6 h-[350px]">
<ScrollArea className="flex-1 pr-6 h-[320px]">
<div className="py-4 space-y-6">
{/* Operating System */}
<div className="space-y-3">
+2 -12
View File
@@ -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({
<TabsTrigger value="anti-detect">Anti-Detect</TabsTrigger>
</TabsList>
<ScrollArea className="flex-1 pr-6 h-[350px]">
<ScrollArea className="flex-1 pr-6 h-[320px]">
<div className="py-4 space-y-6">
{/* Profile Name - Common to both tabs */}
<div className="space-y-2">
+14 -2
View File
@@ -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 (
<>
<ScrollArea className="h-[400px] rounded-md border">
<ScrollArea
className={cn(
"rounded-md border",
platform === "macos" ? "h-[380px]" : "h-[320px]",
)}
>
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
+10
View File
@@ -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";
};