mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2025-12-06 03:55:37 -05:00
Dialog fixes
This commit is contained in:
@@ -34,6 +34,7 @@ function App() {
|
||||
const {
|
||||
dlcDialog,
|
||||
handleDlcDialogClose,
|
||||
handleProgressDialogClose,
|
||||
progressDialog,
|
||||
handleGameAction,
|
||||
handleDlcConfirm,
|
||||
@@ -91,7 +92,7 @@ function App() {
|
||||
progress={progressDialog.progress}
|
||||
showInstructions={progressDialog.showInstructions}
|
||||
instructions={progressDialog.instructions}
|
||||
onClose={() => {}}
|
||||
onClose={handleProgressDialogClose}
|
||||
/>
|
||||
|
||||
{/* DLC Selection Dialog */}
|
||||
|
||||
@@ -37,6 +37,7 @@ export interface AppContextType {
|
||||
isLoading: boolean;
|
||||
error: string | null;
|
||||
loadGames: () => Promise<boolean>;
|
||||
handleProgressDialogClose: () => void;
|
||||
|
||||
// DLC management
|
||||
dlcDialog: DlcDialogState;
|
||||
|
||||
@@ -33,6 +33,7 @@ export const AppProvider = ({ children }: AppProviderProps) => {
|
||||
|
||||
const {
|
||||
progressDialog,
|
||||
handleCloseProgressDialog,
|
||||
handleGameAction: executeGameAction,
|
||||
handleDlcConfirm: executeDlcConfirm,
|
||||
} = useGameActions()
|
||||
@@ -55,8 +56,7 @@ export const AppProvider = ({ children }: AppProviderProps) => {
|
||||
}
|
||||
|
||||
try {
|
||||
await streamGameDlcs(gameId)
|
||||
|
||||
// Open the dialog
|
||||
setDlcDialog({
|
||||
...dlcDialog,
|
||||
visible: true,
|
||||
@@ -64,8 +64,12 @@ export const AppProvider = ({ children }: AppProviderProps) => {
|
||||
gameTitle: game.title,
|
||||
isLoading: true,
|
||||
isEditMode: true,
|
||||
dlcs: [], // start empty
|
||||
progress: 0,
|
||||
})
|
||||
|
||||
|
||||
// Now fetch DLCs in the background
|
||||
streamGameDlcs(gameId)
|
||||
} catch (error) {
|
||||
showError(`Failed to load DLCs: ${error}`)
|
||||
}
|
||||
@@ -157,6 +161,7 @@ export const AppProvider = ({ children }: AppProviderProps) => {
|
||||
progressDialog,
|
||||
handleGameAction,
|
||||
handleDlcConfirm,
|
||||
handleProgressDialogClose: handleCloseProgressDialog,
|
||||
|
||||
// Toast notifications
|
||||
showToast,
|
||||
|
||||
Reference in New Issue
Block a user