| 80 | ) |
| 81 | |
| 82 | export function initializeNavigation() { |
| 83 | const file = activeFileId.value |
| 84 | if (file && file.length > 0) { |
| 85 | const current = findById(file) |
| 86 | if (current) { |
| 87 | currentModule.value = current |
| 88 | dashboardVisible.value = false |
| 89 | coverageVisible.value = false |
| 90 | } |
| 91 | else { |
| 92 | watchOnce( |
| 93 | () => client.state.getFiles(), |
| 94 | () => { |
| 95 | currentModule.value = findById(file) |
| 96 | dashboardVisible.value = false |
| 97 | coverageVisible.value = false |
| 98 | }, |
| 99 | ) |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | return dashboardVisible |
| 104 | } |
| 105 | |
| 106 | export function showDashboard(show: boolean) { |
| 107 | dashboardVisible.value = show |