| 238 | |
| 239 | /** Wo die Tastatur gerade hingeht und was die Zeile zeigt. */ |
| 240 | const commandSeam = (page) => |
| 241 | page.evaluate((panelIds) => { |
| 242 | const line = document.querySelector('[data-testid="atlas-command"]'); |
| 243 | const input = document.querySelector('[data-testid="atlas-command-input"]'); |
| 244 | const prompt = document.querySelector('[data-testid="atlas-command-prompt"]'); |
| 245 | const results = document.querySelector('[data-testid="atlas-search-results"]'); |
| 246 | return { |
| 247 | value: input === null ? '' : input.value, |
| 248 | focused: document.activeElement === input, |
| 249 | activeElement: document.activeElement?.tagName ?? '', |
| 250 | dataFocused: line?.getAttribute('data-focused') ?? '', |
| 251 | promptColor: prompt === null ? '' : globalThis.getComputedStyle(prompt).color, |
| 252 | lineBorder: line === null ? '' : globalThis.getComputedStyle(line).borderTopColor, |
| 253 | lineBackground: line === null ? '' : globalThis.getComputedStyle(line).backgroundColor, |
| 254 | hasTitle: (input?.hasAttribute('title') ?? false) || (line?.hasAttribute('title') ?? false), |
| 255 | hint: document.querySelector('.atlas-command-hint')?.textContent?.trim() ?? '', |
| 256 | resultsShown: results !== null, |
| 257 | resultsHeadline: |
| 258 | document.querySelector('[data-testid="atlas-search-headline"]')?.textContent?.trim() ?? '', |
| 259 | openPanels: panelIds.filter((id) => document.querySelector(`[data-testid="${id}"]`) !== null), |
| 260 | galaxyVisible: |
| 261 | document.querySelector('[data-testid="atlas-galaxy"]')?.getAttribute('data-visible') ?? '', |
| 262 | }; |
| 263 | }, PANEL_TESTIDS); |
| 264 | |
| 265 | /** Die beiden Linsen des Twins, so wie sie im Panel stehen. */ |
| 266 | const twinLensSeam = (page) => |