mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-28 21:30:18 +01:00
🧩 feat: Standardize empty states, improve MCP icon upload accessibility, and refine UI layout (#11195)
* feat: Enhance accessibility and localization for empty states in prompts, bookmarks, and memories * feat: Improve accessibility and layout for icon upload component * fix: Update dialog content width for improved accessibility
This commit is contained in:
parent
ca58d70c44
commit
1544491737
8 changed files with 54 additions and 21 deletions
|
|
@ -27,11 +27,22 @@ export default function MCPIcon({ icon, onIconChange }: MCPIconProps) {
|
|||
}
|
||||
};
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
handleClick();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-4">
|
||||
<div
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={handleClick}
|
||||
className="bg-token-surface-secondary dark:bg-token-surface-tertiary border-token-border-medium flex h-16 w-16 shrink-0 cursor-pointer items-center justify-center rounded-xl border-2 border-dashed"
|
||||
onKeyDown={handleKeyDown}
|
||||
aria-label={localize('com_ui_upload_icon')}
|
||||
className="bg-token-surface-secondary dark:bg-token-surface-tertiary border-token-border-medium flex h-16 w-16 shrink-0 cursor-pointer items-center justify-center rounded-xl border-2 border-dashed focus:outline-none focus-visible:ring-2 focus-visible:ring-border-heavy"
|
||||
>
|
||||
{previewUrl ? (
|
||||
<img
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue