mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-08 10:23:29 +00:00
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:
+19
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user