update creamlinux config #64

This commit is contained in:
Novattz
2025-12-23 02:42:19 +01:00
parent a00cc92b70
commit 7960019cd9
6 changed files with 124 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
import { createContext } from 'react'
import { Game, DlcInfo } from '@/types'
import { ActionType } from '@/components/buttons/ActionButton'
import { DlcDialogState } from '@/hooks/useDlcManager'
// Types for context sub-components
export interface InstallationInstructions {
@@ -10,17 +11,6 @@ export interface InstallationInstructions {
dlc_count?: number
}
export interface DlcDialogState {
visible: boolean
gameId: string
gameTitle: string
dlcs: DlcInfo[]
isLoading: boolean
isEditMode: boolean
progress: number
timeLeft?: string
}
export interface ProgressDialogState {
visible: boolean
title: string
@@ -49,6 +39,7 @@ export interface AppContextType {
dlcDialog: DlcDialogState
handleGameEdit: (gameId: string) => void
handleDlcDialogClose: () => void
handleUpdateDlcs: (gameId: string) => Promise<void>
// Game actions
progressDialog: ProgressDialogState
@@ -74,4 +65,4 @@ export interface AppContextType {
}
// Create the context with a default value
export const AppContext = createContext<AppContextType | undefined>(undefined)
export const AppContext = createContext<AppContextType | undefined>(undefined)

View File

@@ -25,6 +25,7 @@ export const AppProvider = ({ children }: AppProviderProps) => {
handleDlcDialogClose: closeDlcDialog,
streamGameDlcs,
handleGameEdit,
handleUpdateDlcs,
} = useDlcManager()
const {
@@ -220,6 +221,7 @@ export const AppProvider = ({ children }: AppProviderProps) => {
handleGameEdit(gameId, games)
},
handleDlcDialogClose: closeDlcDialog,
handleUpdateDlcs: (gameId: string) => handleUpdateDlcs(gameId),
// Game actions
progressDialog,