added tooltips for the sorting icon in the proxy list

This commit is contained in:
coolcoala
2025-07-11 20:16:24 +03:00
parent f604416532
commit 1c5e43690e
3 changed files with 26 additions and 7 deletions

View File

@@ -237,11 +237,23 @@ export const ProxySelectors: React.FC = () => {
<div className="flex flex-col items-start gap-2">
<div className="flex justify-between items-center w-100">
<label className="text-sm font-medium text-muted-foreground">{t("Proxy")}</label>
<Button variant="ghost" size="sm" onClick={handleSortChange} disabled={isDirectMode}>
{sortType === 'default' && <ChevronsUpDown className="h-4 w-4" />}
{sortType === 'delay' && <Timer className="h-4 w-4" />}
{sortType === 'name' && <WholeWord className="h-4 w-4" />}
</Button>
<Tooltip>
<TooltipTrigger asChild>
<span className="truncate">
<Button variant="ghost" size="sm" onClick={handleSortChange} disabled={isDirectMode}>
{sortType === 'default' && <ChevronsUpDown className="h-4 w-4" />}
{sortType === 'delay' && <Timer className="h-4 w-4" />}
{sortType === 'name' && <WholeWord className="h-4 w-4" />}
</Button>
</span>
</TooltipTrigger>
<TooltipContent>
{sortType === 'default' && <p>{t("Default")}</p>}
{sortType === 'delay' && <p>{t("sort by ping")}</p>}
{sortType === 'name' && <p>{t("sort by name")}</p>}
</TooltipContent>
</Tooltip>
</div>
<Select value={selectedProxy} onValueChange={handleProxyChange} disabled={isDirectMode}>
<SelectTrigger className="w-100">

View File

@@ -644,5 +644,8 @@
"Menu": "Menu",
"Add New Profile": "Add New Profile",
"Delete Profile": "Delete Profile {{name}}?",
"This action cannot be undone.": "This action cannot be undone."
"This action cannot be undone.": "This action cannot be undone.",
"Default": "Default",
"sort by ping": "Sort by ping",
"sort by name": "Sort by name"
}

View File

@@ -593,5 +593,9 @@
"Disconnecting...": "Отключение...",
"Add New Profile": "Добавить новый профиль",
"Delete Profile": "Удалить профиль {{name}}?",
"This action cannot be undone.": "Это действие не может быть отменено"
"This action cannot be undone.": "Это действие не может быть отменено",
"Update via proxy": "Обновить через прокси",
"Default": "По умолчанию",
"sort by ping": "Сортировка по пингу",
"sort by name": "Сортировка по имени"
}