mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-29 23:27:51 +02:00
fix: pass correct props to the backend
This commit is contained in:
@@ -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}"))
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user