feat: Account-Screen mit Nutzerprofil, App-Version aus package.json

- AccountScreen zeigt jetzt Profilbild, Anzeigename und @Login des eingeloggten Twitch-Nutzers (via neuem IPC-Kanal twitch:get-own-user)
- CSS: account__avatar zeigt Profilbild, neue Klassen für identity, name, login und error
This commit is contained in:
Andre
2026-04-25 16:14:59 +02:00
parent eeddcb9dff
commit f365170ded
9 changed files with 154 additions and 5 deletions
+11 -1
View File
@@ -10,6 +10,7 @@ const IPC = {
authEvent: 'auth:event',
twitchGetFollowed: 'twitch:get-followed',
twitchGetOwnUser: 'twitch:get-own-user',
twitchGetVideos: 'twitch:get-videos',
twitchGetTopGames: 'twitch:get-top-games',
twitchGetTopStreams: 'twitch:get-top-streams',
@@ -62,6 +63,13 @@ export interface FollowedChannelInfo {
language?: string
}
export interface OwnUserInfo {
id: string
login: string
displayName: string
profileImageUrl: string
}
export interface PlaybackEvent {
kind: 'started' | 'stopped' | 'error'
channelLogin?: string
@@ -103,7 +111,7 @@ export interface TopStreamsResult {
}
const api = {
appVersion: process.env.npm_package_version ?? '0.0.0',
appVersion: process.env.APP_VERSION ?? process.env.npm_package_version ?? '0.0.0-dev',
app: {
quit: (): Promise<void> => ipcRenderer.invoke(IPC.appQuit)
},
@@ -122,6 +130,8 @@ const api = {
twitch: {
getFollowed: (): Promise<FollowedChannelInfo[]> =>
ipcRenderer.invoke(IPC.twitchGetFollowed),
getOwnUser: (): Promise<OwnUserInfo> =>
ipcRenderer.invoke(IPC.twitchGetOwnUser),
getVideos: (broadcasterId: string): Promise<VodInfo[]> =>
ipcRenderer.invoke(IPC.twitchGetVideos, broadcasterId),
getTopGames: (cursor?: string): Promise<{ games: GameInfo[]; cursor?: string }> =>