fix: pass correct props to the backend

This commit is contained in:
zhom
2025-08-17 13:22:34 +04:00
parent 6260d78901
commit 58b0067b37
2 changed files with 17 additions and 19 deletions
+4 -4
View File
@@ -1962,24 +1962,24 @@ pub async fn launch_browser_profile(
#[tauri::command]
pub async fn update_profile_proxy(
app_handle: tauri::AppHandle,
profile_id: String,
profile_name: String,
proxy_id: Option<String>,
) -> Result<BrowserProfile, String> {
let profile_manager = ProfileManager::instance();
profile_manager
.update_profile_proxy(app_handle, &profile_id, proxy_id)
.update_profile_proxy(app_handle, &profile_name, proxy_id)
.await
.map_err(|e| format!("Failed to update profile: {e}"))
}
#[tauri::command]
pub fn update_profile_tags(
profile_id: String,
profile_name: String,
tags: Vec<String>,
) -> Result<BrowserProfile, String> {
let profile_manager = ProfileManager::instance();
profile_manager
.update_profile_tags(&profile_id, tags)
.update_profile_tags(&profile_name, tags)
.map_err(|e| format!("Failed to update profile tags: {e}"))
}
+13 -15
View File
@@ -1264,8 +1264,8 @@ export function ProfilesDataTable({
profile.browser === "tor-browser"
? "Proxies are not supported for TOR browser"
: profileHasProxy && effectiveProxy
? `${effectiveProxy.name} (${effectiveProxy.proxy_settings.proxy_type.toUpperCase()})`
: "";
? effectiveProxy.name
: null;
const isSelectorOpen = meta.openProxySelectorFor === profile.name;
if (profile.browser === "tor-browser") {
@@ -1278,7 +1278,9 @@ export function ProfilesDataTable({
</span>
</span>
</TooltipTrigger>
{tooltipText && <TooltipContent>{tooltipText}</TooltipContent>}
{(tooltipText || displayName.length > 10) && (
<TooltipContent>{tooltipText || displayName}</TooltipContent>
)}
</Tooltip>
);
}
@@ -1301,18 +1303,14 @@ export function ProfilesDataTable({
: "cursor-pointer hover:bg-accent/50",
)}
>
{profileHasProxy && (
<CiCircleCheck className="w-4 h-4 text-green-500" />
)}
{displayName.length > 18 ? (
<span className="text-sm truncate text-muted-foreground max-w-[140px]">
{displayName.slice(0, 18)}...
</span>
) : (
<span className="text-sm text-muted-foreground">
{displayName}
</span>
)}
<span
className={cn(
"text-sm",
!profileHasProxy && "text-muted-foreground",
)}
>
{trimName(displayName, 10)}
</span>
</span>
</PopoverTrigger>
</TooltipTrigger>