feat(model-modal): add keyboard navigation and UI controls for model browsing, fixes #714 and #350

- Add CSS for modal navigation buttons with hover and disabled states
- Implement keyboard shortcuts (arrow keys) for navigating between models
- Add navigation controls UI to modal header with previous/next buttons
- Store navigation state to enable sequential model browsing
- Clean up event handlers to prevent memory leaks when modal closes
This commit is contained in:
Will Miao
2025-12-05 22:20:31 +08:00
parent 22ee37b817
commit 4d6f4fcf69
4 changed files with 258 additions and 9 deletions

View File

@@ -45,8 +45,8 @@ export async function copyToClipboard(text, successMessage = null) {
}
}
export function showToast(key, params = {}, type = 'info') {
const message = translate(key, params);
export function showToast(key, params = {}, type = 'info', fallback = null) {
const message = translate(key, params, fallback);
const toast = document.createElement('div');
toast.className = `toast toast-${type}`;
toast.textContent = message;