feat: Quit-Dialog und Xbox-Button-Prompts ergänzen

This commit is contained in:
Andre
2026-04-25 15:12:45 +02:00
parent e035ec9ac9
commit eeddcb9dff
12 changed files with 433 additions and 19 deletions
+6 -1
View File
@@ -1,4 +1,4 @@
import { BrowserWindow, ipcMain } from 'electron'
import { app, BrowserWindow, ipcMain } from 'electron'
import type { AuthEvent, AuthService } from '../auth/authService'
import type { HelixClient } from '../twitch/helixClient'
import type { PlaybackService } from '../playback/playbackService'
@@ -6,6 +6,7 @@ import type { PlaybackEvent } from '../playback/types'
import { getProgressMap } from '../store/historyRepo'
export const IPC = {
appQuit: 'app:quit',
authStatus: 'auth:get-status',
authStart: 'auth:start-device-flow',
authCancel: 'auth:cancel',
@@ -41,6 +42,10 @@ export function registerIpcHandlers(
helix: HelixClient,
playback: PlaybackService
): void {
ipcMain.handle(IPC.appQuit, () => {
app.quit()
})
ipcMain.handle(IPC.authStatus, () => auth.getStatus())
ipcMain.handle(IPC.authConfigured, () => auth.isConfigured())
ipcMain.handle(IPC.authStart, () => auth.startDeviceFlow())