()
| 271 | * includes 'reveal'. |
| 272 | */ |
| 273 | export function getAvailableOpenInApps(): AvailableOpenInApp[] { |
| 274 | const platform = currentPlatform(); |
| 275 | const result: AvailableOpenInApp[] = []; |
| 276 | |
| 277 | for (const app of OPEN_IN_APPS) { |
| 278 | if (!isAppAvailable(app, platform)) continue; |
| 279 | |
| 280 | let label = app.label; |
| 281 | let icon = app.icon; |
| 282 | if (app.id === "reveal") { |
| 283 | label = resolveRevealLabel(platform); |
| 284 | icon = resolveRevealIcon(platform); |
| 285 | } |
| 286 | |
| 287 | result.push({ id: app.id, label, kind: app.kind, icon }); |
| 288 | } |
| 289 | |
| 290 | return result; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * GET /api/open-in/apps handler. |
no test coverage detected