(silent=True)
| 7525 | var editorPanel=document.getElementById('editorPanel'); if(editorPanel && window.matchMedia('(max-width:760px)').matches) window.setTimeout(function(){ editorPanel.scrollIntoView({behavior:'smooth',block:'start'}); },80); |
| 7526 | } catch (err) { handleError(err); } |
| 7527 | }); |
| 7528 | }); |
| 7529 | document.querySelectorAll('.copy-item').forEach(function(btn) { |
| 7530 | btn.addEventListener('click', function(){ |
| 7531 | state.clipboard = { mode: 'copy', path: btn.getAttribute('data-path') }; |
| 7532 | showToast(t('Copied to clipboard')); |
| 7533 | }); |
| 7534 | }); |
| 7535 | document.querySelectorAll('.move-item').forEach(function(btn) { |
| 7536 | btn.addEventListener('click', function(){ |
| 7537 | state.clipboard = { mode: 'move', path: btn.getAttribute('data-path') }; |
| 7538 | showToast(t('Move queued')); |
| 7539 | }); |
| 7540 | }); |
| 7541 | document.querySelectorAll('.delete-item').forEach(function(btn) { |
| 7542 | btn.addEventListener('click', async function(){ |
| 7543 | if (!window.confirm(t('Delete this item?'))) return; |
| 7544 | try { |
| 7545 | await apiPost('/api/fs/delete', { path: btn.getAttribute('data-path') }); |
| 7546 | await loadFiles(state.filesPath); |
| 7547 | showToast(t('Deleted')); |
| 7548 | } catch (err) { handleError(err); } |
no test coverage detected