mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-27 22:02:50 -05:00
update creamlinux config #64
This commit is contained in:
@@ -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)
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user