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