fix: resolve UI bugs and pasting behavior

- Add global Cmd+V keyboard paste support for downloading links
- Restore striped background styling for alternate rows in download list
- Add ghost rows to seamlessly fill empty download space
- Map correctly formatted item size into the queue immediately
- Remove unused Tauri manager imports from backend
This commit is contained in:
NimBold
2026-06-15 19:57:20 +03:30
parent b4b3104c67
commit fde5eaacba
6 changed files with 76 additions and 49 deletions
+19
View File
@@ -155,6 +155,25 @@ function App() {
initNotifications();
}, []);
useEffect(() => {
const handlePaste = (e: ClipboardEvent) => {
if (
e.target instanceof HTMLInputElement ||
e.target instanceof HTMLTextAreaElement ||
e.target instanceof HTMLSelectElement ||
(e.target as HTMLElement).isContentEditable
) {
return;
}
const text = e.clipboardData?.getData('text/plain');
if (text && text.trim().length > 0) {
useDownloadStore.getState().openAddModalWithUrls(text.trim());
}
};
window.addEventListener('paste', handlePaste);
return () => window.removeEventListener('paste', handlePaste);
}, []);
useEffect(() => {
const root = window.document.documentElement;