* Activates the given sidebar app and deactivates all others. * @param {string} id * @returns {void}
(id)
| 172 | * @returns {void} |
| 173 | */ |
| 174 | function setActiveApp(id) { |
| 175 | const app = apps.find((app) => app.id === id); |
| 176 | if (!app) return; |
| 177 | |
| 178 | currentSection = id; |
| 179 | localStorage.setItem(SIDEBAR_APPS_LAST_SECTION, id); |
| 180 | |
| 181 | for (const currentApp of apps) { |
| 182 | currentApp.active = currentApp.id === id; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | export default { |
| 187 | init, |
no outgoing calls
no test coverage detected