()
| 18 | |
| 19 | // One-time: localize labels |
| 20 | function localizeMenu() { |
| 21 | const m = qMenu(); if (!m) return; |
| 22 | const map = { |
| 23 | 'create_file': 'create_file', |
| 24 | 'delete_selected': 'delete_selected', |
| 25 | 'copy_selected': 'copy_selected', |
| 26 | 'move_selected': 'move_selected', |
| 27 | 'download_zip': 'download_zip', |
| 28 | 'extract_zip': 'extract_zip', |
| 29 | 'tag_selected': 'tag_selected', |
| 30 | 'preview': 'preview', |
| 31 | 'edit': 'edit', |
| 32 | 'rename': 'rename', |
| 33 | 'tag_file': 'tag_file', |
| 34 | // NEW: |
| 35 | 'download_plain': 'download_plain', |
| 36 | 'link_file': 'link_file', |
| 37 | 'share_file': 'share_file' |
| 38 | }; |
| 39 | Object.entries(map).forEach(([action, key]) => { |
| 40 | const el = m.querySelector(`.mi[data-action="${action}"]`); |
| 41 | if (el) setText(el, key); |
| 42 | }); |
| 43 | } |
| 44 | |
| 45 | // Show/hide items based on selection state |
| 46 | function configureVisibility({ any, one, many, anyZip, canEdit, allowLink, allowShare, allowZip, allowExtractZip }) { |
no test coverage detected