refactor: remove mullvad and tor browser artifacts

This commit is contained in:
zhom
2025-12-01 12:25:21 +04:00
parent 98a8369f60
commit effe229067
18 changed files with 50 additions and 1352 deletions
+3 -16
View File
@@ -42,13 +42,11 @@ const getCurrentOS = (): CamoufoxOS => {
import { RippleButton } from "./ui/ripple";
type BrowserTypeString =
| "mullvad-browser"
| "firefox"
| "firefox-developer"
| "chromium"
| "brave"
| "zen"
| "tor-browser"
| "camoufox";
interface CreateProfileDialogProps {
@@ -92,14 +90,6 @@ const browserOptions: BrowserOption[] = [
value: "zen",
label: "Zen Browser",
},
{
value: "mullvad-browser",
label: "Mullvad Browser",
},
{
value: "tor-browser",
label: "Tor Browser",
},
];
export function CreateProfileDialog({
@@ -429,12 +419,9 @@ export function CreateProfileDialog({
isBrowserVersionAvailable,
]);
// Filter supported browsers for regular browsers (excluding mullvad and tor)
const regularBrowsers = browserOptions.filter(
(browser) =>
supportedBrowsers.includes(browser.value) &&
browser.value !== "mullvad-browser" &&
browser.value !== "tor-browser",
// Filter supported browsers for regular browsers
const regularBrowsers = browserOptions.filter((browser) =>
supportedBrowsers.includes(browser.value),
);
return (
+1 -4
View File
@@ -62,10 +62,7 @@ export function ImportProfileDialog({
const { supportedBrowsers, isLoading: isLoadingSupport } =
useBrowserSupport();
// Exclude browsers that are no longer supported for import
const importableBrowsers = supportedBrowsers.filter(
(b) => b !== "mullvad-browser" && b !== "tor-browser",
);
const importableBrowsers = supportedBrowsers;
const loadDetectedProfiles = useCallback(async () => {
setIsLoading(true);
+4 -28
View File
@@ -1680,19 +1680,12 @@ export function ProfilesDataTable({
? (meta.storedProxies.find((p) => p.id === effectiveProxyId) ??
null)
: null;
const displayName =
profile.browser === "tor-browser"
? "Not supported"
: effectiveProxy
? effectiveProxy.name
: "Not Selected";
const displayName = effectiveProxy
? effectiveProxy.name
: "Not Selected";
const profileHasProxy = Boolean(effectiveProxy);
const tooltipText =
profile.browser === "tor-browser"
? "Proxies are not supported for TOR browser"
: profileHasProxy && effectiveProxy
? effectiveProxy.name
: null;
profileHasProxy && effectiveProxy ? effectiveProxy.name : null;
const isSelectorOpen = meta.openProxySelectorFor === profile.id;
// When profile is running, show bandwidth chart instead of proxy selector
@@ -1717,23 +1710,6 @@ export function ProfilesDataTable({
);
}
if (profile.browser === "tor-browser") {
return (
<Tooltip>
<TooltipTrigger asChild>
<span className="flex gap-2 items-center">
<span className="text-sm text-muted-foreground">
Not supported
</span>
</span>
</TooltipTrigger>
{(tooltipText || displayName.length > 10) && (
<TooltipContent>{tooltipText || displayName}</TooltipContent>
)}
</Tooltip>
);
}
return (
<div className="flex gap-2 items-center">
<Popover
+1 -5
View File
@@ -142,11 +142,7 @@ export function ProfileSelectorDialog({
const runningAvailableProfile = profiles.find((profile) => {
const isRunning = runningProfiles.has(profile.id);
// Simple check without browserState dependency
return (
isRunning &&
profile.browser !== "tor-browser" &&
profile.browser !== "mullvad-browser"
);
return isRunning;
});
if (runningAvailableProfile) {
+1 -8
View File
@@ -49,10 +49,9 @@ export function ProxyAssignmentDialog({
setIsAssigning(true);
setError(null);
try {
// Filter out TOR browser profiles as they don't support proxies
const validProfiles = selectedProfiles.filter((profileId) => {
const profile = profiles.find((p) => p.id === profileId);
return profile && profile.browser !== "tor-browser";
return profile;
});
if (validProfiles.length === 0) {
@@ -119,15 +118,9 @@ export function ProxyAssignmentDialog({
(p: BrowserProfile) => p.id === profileId,
);
const displayName = profile ? profile.name : profileId;
const isTorBrowser = profile?.browser === "tor-browser";
return (
<li key={profileId} className="truncate">
{displayName}
{isTorBrowser && (
<span className="ml-2 text-xs text-muted-foreground">
(TOR - no proxy support)
</span>
)}
</li>
);
})}