mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
feat: improve auto-approve button responsiveness (#8798)
- Add responsive breakpoint at 300px for compact view - Icon correctly reflects state (X when off, ✓ when on) at all screen sizes - Show abbreviated labels on very narrow screens (< 300px) - Add triggerLabelOffShort translation key to all locales Fixes issues from PR #8152: - Icon always showing checkmark on narrow screens - Breakpoint activating too early (was 400px) - Incorrect Tailwind class ordering
This commit is contained in:
parent
4f084f89e4
commit
3349c02595
19 changed files with 27 additions and 1 deletions
|
|
@ -173,6 +173,7 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
|
|||
"inline-flex items-center gap-1.5 relative whitespace-nowrap px-1.5 py-1 text-xs",
|
||||
"bg-transparent border border-[rgba(255,255,255,0.08)] rounded-md text-vscode-foreground",
|
||||
"transition-all duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder focus-visible:ring-inset",
|
||||
"max-[300px]:shrink-0",
|
||||
disabled
|
||||
? "opacity-50 cursor-not-allowed"
|
||||
: "opacity-90 hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)] cursor-pointer",
|
||||
|
|
@ -184,13 +185,20 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
|
|||
<CheckCheck className="size-3 flex-shrink-0" />
|
||||
)}
|
||||
|
||||
<span className="truncate min-w-0">
|
||||
<span className="hidden min-[300px]:inline truncate min-w-0">
|
||||
{!effectiveAutoApprovalEnabled
|
||||
? t("chat:autoApprove.triggerLabelOff")
|
||||
: enabledCount === totalCount
|
||||
? t("chat:autoApprove.triggerLabelAll")
|
||||
: t("chat:autoApprove.triggerLabel", { count: enabledCount })}
|
||||
</span>
|
||||
<span className="inline min-[300px]:hidden min-w-0">
|
||||
{!effectiveAutoApprovalEnabled
|
||||
? t("chat:autoApprove.triggerLabelOffShort")
|
||||
: enabledCount === totalCount
|
||||
? t("chat:autoApprove.triggerLabelAll")
|
||||
: enabledCount}
|
||||
</span>
|
||||
</PopoverTrigger>
|
||||
</StandardTooltip>
|
||||
<PopoverContent
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/ca/chat.json
generated
1
webview-ui/src/i18n/locales/ca/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Commuta l'aprovació automàtica",
|
||||
"disabledAriaLabel": "Aprovació automàtica desactivada - selecciona primer les opcions",
|
||||
"triggerLabelOff": "Aprovació automàtica desactivada",
|
||||
"triggerLabelOffShort": "Off",
|
||||
"triggerLabel_zero": "0 aprovacions automàtiques",
|
||||
"triggerLabel_one": "1 aprovació automàtica",
|
||||
"triggerLabel_other": "{{count}} aprovacions automàtiques",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/de/chat.json
generated
1
webview-ui/src/i18n/locales/de/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Automatische Genehmigung umschalten",
|
||||
"disabledAriaLabel": "Automatische Genehmigung deaktiviert - wähle zuerst Optionen aus",
|
||||
"triggerLabelOff": "Automatische Genehmigung aus",
|
||||
"triggerLabelOffShort": "Aus",
|
||||
"triggerLabel_zero": "0 automatisch genehmigt",
|
||||
"triggerLabel_one": "1 automatisch genehmigt",
|
||||
"triggerLabel_other": "{{count}} automatisch genehmigt",
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@
|
|||
"toggleAriaLabel": "Toggle auto-approval",
|
||||
"disabledAriaLabel": "Auto-approval disabled - select options first",
|
||||
"triggerLabelOff": "Auto-approve off",
|
||||
"triggerLabelOffShort": "Off",
|
||||
"triggerLabel_zero": "0 auto-approve",
|
||||
"triggerLabel_one": "1 auto-approved",
|
||||
"triggerLabel_other": "{{count}} auto-approved",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/es/chat.json
generated
1
webview-ui/src/i18n/locales/es/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Conmutar la aprobación automática",
|
||||
"disabledAriaLabel": "Aprobación automática deshabilitada: selecciona primero las opciones",
|
||||
"triggerLabelOff": "Aprobación automática desactivada",
|
||||
"triggerLabelOffShort": "Desactivado",
|
||||
"triggerLabel_zero": "0 aprobaciones automáticas",
|
||||
"triggerLabel_one": "1 aprobación automática",
|
||||
"triggerLabel_other": "{{count}} aprobaciones automáticas",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/fr/chat.json
generated
1
webview-ui/src/i18n/locales/fr/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Basculer l'approbation automatique",
|
||||
"disabledAriaLabel": "Approbation automatique désactivée - sélectionnez d'abord les options",
|
||||
"triggerLabelOff": "Approbation automatique désactivée",
|
||||
"triggerLabelOffShort": "Désactivé",
|
||||
"triggerLabel_zero": "0 approuvé automatiquement",
|
||||
"triggerLabel_one": "1 approuvé automatiquement",
|
||||
"triggerLabel_other": "{{count}} approuvés automatiquement",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/hi/chat.json
generated
1
webview-ui/src/i18n/locales/hi/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "स्वतः-अनुमोदन टॉगल करें",
|
||||
"disabledAriaLabel": "स्वतः-अनुमोदन अक्षम है - पहले विकल्प चुनें",
|
||||
"triggerLabelOff": "स्वतः-अनुमोदन बंद",
|
||||
"triggerLabelOffShort": "बंद",
|
||||
"triggerLabel_zero": "0 स्वतः-अनुमोदन",
|
||||
"triggerLabel_one": "1 स्वतः-अनुमोदित",
|
||||
"triggerLabel_other": "{{count}} स्वतः-अनुमोदित",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/id/chat.json
generated
1
webview-ui/src/i18n/locales/id/chat.json
generated
|
|
@ -291,6 +291,7 @@
|
|||
"toggleAriaLabel": "Beralih persetujuan otomatis",
|
||||
"disabledAriaLabel": "Persetujuan otomatis dinonaktifkan - pilih opsi terlebih dahulu",
|
||||
"triggerLabelOff": "Persetujuan otomatis mati",
|
||||
"triggerLabelOffShort": "Mati",
|
||||
"triggerLabel_zero": "0 disetujui otomatis",
|
||||
"triggerLabel_one": "1 disetujui otomatis",
|
||||
"triggerLabel_other": "{{count}} disetujui otomatis",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/it/chat.json
generated
1
webview-ui/src/i18n/locales/it/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Attiva/disattiva approvazione automatica",
|
||||
"disabledAriaLabel": "Approvazione automatica disabilitata - seleziona prima le opzioni",
|
||||
"triggerLabelOff": "Approvazione automatica disattivata",
|
||||
"triggerLabelOffShort": "Disattivata",
|
||||
"triggerLabel_zero": "0 approvati automaticamente",
|
||||
"triggerLabel_one": "1 approvato automaticamente",
|
||||
"triggerLabel_other": "{{count}} approvati automaticamente",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/ja/chat.json
generated
1
webview-ui/src/i18n/locales/ja/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "自動承認を切り替える",
|
||||
"disabledAriaLabel": "自動承認が無効です - 最初にオプションを選択してください",
|
||||
"triggerLabelOff": "自動承認オフ",
|
||||
"triggerLabelOffShort": "オフ",
|
||||
"triggerLabel_zero": "0個の自動承認",
|
||||
"triggerLabel_one": "1個の自動承認済み",
|
||||
"triggerLabel_other": "{{count}}個の自動承認済み",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/ko/chat.json
generated
1
webview-ui/src/i18n/locales/ko/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "자동 승인 전환",
|
||||
"disabledAriaLabel": "자동 승인 비활성화됨 - 먼저 옵션을 선택하십시오",
|
||||
"triggerLabelOff": "자동 승인 꺼짐",
|
||||
"triggerLabelOffShort": "꺼짐",
|
||||
"triggerLabel_zero": "0개 자동 승인됨",
|
||||
"triggerLabel_one": "1개 자동 승인됨",
|
||||
"triggerLabel_other": "{{count}}개 자동 승인됨",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/nl/chat.json
generated
1
webview-ui/src/i18n/locales/nl/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Automatische goedkeuring in-/uitschakelen",
|
||||
"disabledAriaLabel": "Automatische goedkeuring uitgeschakeld - selecteer eerst opties",
|
||||
"triggerLabelOff": "Automatisch goedkeuren uit",
|
||||
"triggerLabelOffShort": "Uit",
|
||||
"triggerLabel_zero": "0 automatisch goedgekeurd",
|
||||
"triggerLabel_one": "1 automatisch goedgekeurd",
|
||||
"triggerLabel_other": "{{count}} automatisch goedgekeurd",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/pl/chat.json
generated
1
webview-ui/src/i18n/locales/pl/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Przełącz automatyczne zatwierdzanie",
|
||||
"disabledAriaLabel": "Automatyczne zatwierdzanie wyłączone - najpierw wybierz opcje",
|
||||
"triggerLabelOff": "Automatyczne zatwierdzanie wyłączone",
|
||||
"triggerLabelOffShort": "Wyłączone",
|
||||
"triggerLabel_zero": "0 automatycznie zatwierdzone",
|
||||
"triggerLabel_one": "1 automatycznie zatwierdzony",
|
||||
"triggerLabel_other": "{{count}} automatycznie zatwierdzonych",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/pt-BR/chat.json
generated
1
webview-ui/src/i18n/locales/pt-BR/chat.json
generated
|
|
@ -264,6 +264,7 @@
|
|||
"toggleAriaLabel": "Alternar aprovação automática",
|
||||
"disabledAriaLabel": "Aprovação automática desativada - selecione as opções primeiro",
|
||||
"triggerLabelOff": "Aprovação automática desativada",
|
||||
"triggerLabelOffShort": "Desativada",
|
||||
"triggerLabel_zero": "0 aprovados automaticamente",
|
||||
"triggerLabel_one": "1 aprovado automaticamente",
|
||||
"triggerLabel_other": "{{count}} aprovados automaticamente",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/ru/chat.json
generated
1
webview-ui/src/i18n/locales/ru/chat.json
generated
|
|
@ -265,6 +265,7 @@
|
|||
"toggleAriaLabel": "Переключить авто-утверждение",
|
||||
"disabledAriaLabel": "Авто-утверждение отключено - сначала выберите опции",
|
||||
"triggerLabelOff": "Авто-утверждение выкл",
|
||||
"triggerLabelOffShort": "Выкл",
|
||||
"triggerLabel_zero": "0 авто-утвержденных",
|
||||
"triggerLabel_one": "1 авто-утвержден",
|
||||
"triggerLabel_other": "{{count}} авто-утвержденных",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/tr/chat.json
generated
1
webview-ui/src/i18n/locales/tr/chat.json
generated
|
|
@ -265,6 +265,7 @@
|
|||
"toggleAriaLabel": "Otomatik onayı aç/kapat",
|
||||
"disabledAriaLabel": "Otomatik onay devre dışı - önce seçenekleri seçin",
|
||||
"triggerLabelOff": "Otomatik onay kapalı",
|
||||
"triggerLabelOffShort": "Kapalı",
|
||||
"triggerLabel_zero": "0 otomatik onaylandı",
|
||||
"triggerLabel_one": "1 otomatik onaylandı",
|
||||
"triggerLabel_other": "{{count}} otomatik onaylandı",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/vi/chat.json
generated
1
webview-ui/src/i18n/locales/vi/chat.json
generated
|
|
@ -265,6 +265,7 @@
|
|||
"toggleAriaLabel": "Bật/tắt tự động phê duyệt",
|
||||
"disabledAriaLabel": "Tự động phê duyệt đã tắt - trước tiên hãy chọn các tùy chọn",
|
||||
"triggerLabelOff": "Tự động phê duyệt tắt",
|
||||
"triggerLabelOffShort": "Tắt",
|
||||
"triggerLabel_zero": "0 được tự động phê duyệt",
|
||||
"triggerLabel_one": "1 được tự động phê duyệt",
|
||||
"triggerLabel_other": "{{count}} được tự động phê duyệt",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/zh-CN/chat.json
generated
1
webview-ui/src/i18n/locales/zh-CN/chat.json
generated
|
|
@ -265,6 +265,7 @@
|
|||
"toggleAriaLabel": "切换自动批准",
|
||||
"disabledAriaLabel": "自动批准已禁用 - 请先选择选项",
|
||||
"triggerLabelOff": "自动批准已关闭",
|
||||
"triggerLabelOffShort": "关闭",
|
||||
"triggerLabel_zero": "0 个自动批准",
|
||||
"triggerLabel_one": "1 个自动批准",
|
||||
"triggerLabel_other": "{{count}} 个自动批准",
|
||||
|
|
|
|||
1
webview-ui/src/i18n/locales/zh-TW/chat.json
generated
1
webview-ui/src/i18n/locales/zh-TW/chat.json
generated
|
|
@ -289,6 +289,7 @@
|
|||
"toggleAriaLabel": "切換自動批准",
|
||||
"disabledAriaLabel": "自動批准已禁用 - 請先選擇選項",
|
||||
"triggerLabelOff": "自動批准已關閉",
|
||||
"triggerLabelOffShort": "關閉",
|
||||
"triggerLabel_zero": "0 個自動核准",
|
||||
"triggerLabel_one": "1 個自動核准",
|
||||
"triggerLabel_other": "{{count}} 個自動核准",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue