refactor: create profile in the currently selected group

This commit is contained in:
zhom
2025-08-07 04:15:31 +04:00
parent 9ba51cd4e3
commit 5fed6b7c3f
4 changed files with 41 additions and 47 deletions
+5
View File
@@ -48,7 +48,9 @@ interface CreateProfileDialogProps {
releaseType: string;
proxyId?: string;
camoufoxConfig?: CamoufoxConfig;
groupId?: string;
}) => Promise<void>;
selectedGroupId?: string;
}
interface BrowserOption {
@@ -99,6 +101,7 @@ export function CreateProfileDialog({
isOpen,
onClose,
onCreateProfile,
selectedGroupId,
}: CreateProfileDialogProps) {
const [profileName, setProfileName] = useState("");
const [activeTab, setActiveTab] = useState("regular");
@@ -272,6 +275,7 @@ export function CreateProfileDialog({
version: bestVersion.version,
releaseType: bestVersion.releaseType,
proxyId: selectedProxyId,
groupId: selectedGroupId !== "default" ? selectedGroupId : undefined,
});
} else {
// Anti-detect tab - always use Camoufox with best available version
@@ -295,6 +299,7 @@ export function CreateProfileDialog({
releaseType: bestCamoufoxVersion.releaseType,
proxyId: selectedProxyId,
camoufoxConfig: finalCamoufoxConfig,
groupId: selectedGroupId !== "default" ? selectedGroupId : undefined,
});
}