()
| 2143 | } |
| 2144 | |
| 2145 | function updateDualPaneTargetHint() { |
| 2146 | const hint = ensureDualPaneTargetHint(); |
| 2147 | if (!hint) return; |
| 2148 | if (!window.dualPaneEnabled || !window.__frPaneState) { |
| 2149 | hint.style.display = 'none'; |
| 2150 | return; |
| 2151 | } |
| 2152 | const active = normalizePaneKey(window.activePane); |
| 2153 | const other = active === 'secondary' ? 'primary' : 'secondary'; |
| 2154 | const otherFolder = window.__frPaneState?.[other]?.currentFolder || ''; |
| 2155 | if (!otherFolder) { |
| 2156 | hint.style.display = 'none'; |
| 2157 | return; |
| 2158 | } |
| 2159 | const otherSourceId = window.__frPaneState?.[other]?.sourceId || ''; |
| 2160 | const sideLabel = other === 'secondary' ? 'Right' : 'Left'; |
| 2161 | const folderLabel = otherFolder === 'root' ? getRootLabel(otherSourceId) : otherFolder; |
| 2162 | hint.textContent = `Target: ${sideLabel} -> ${folderLabel}`; |
| 2163 | hint.title = `Copy/move target is the ${sideLabel.toLowerCase()} pane folder.`; |
| 2164 | hint.style.display = 'inline-flex'; |
| 2165 | } |
| 2166 | |
| 2167 | function syncFolderStripWithPaneState(paneKey) { |
| 2168 | const strip = document.getElementById('folderStripContainer'); |
no test coverage detected