mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-30 15:22:50 -05:00
Remove reminder #92
This commit is contained in:
41
src/App.tsx
41
src/App.tsx
@@ -20,7 +20,6 @@ import {
|
|||||||
DlcSelectionDialog,
|
DlcSelectionDialog,
|
||||||
SettingsDialog,
|
SettingsDialog,
|
||||||
ConflictDialog,
|
ConflictDialog,
|
||||||
ReminderDialog,
|
|
||||||
DisclaimerDialog,
|
DisclaimerDialog,
|
||||||
} from '@/components/dialogs'
|
} from '@/components/dialogs'
|
||||||
|
|
||||||
@@ -68,23 +67,28 @@ function App() {
|
|||||||
} = useAppContext()
|
} = useAppContext()
|
||||||
|
|
||||||
// Conflict detection
|
// Conflict detection
|
||||||
const { currentConflict, showReminder, resolveConflict, closeReminder } =
|
const { conflicts, showDialog, resolveConflict, closeDialog } =
|
||||||
useConflictDetection(games)
|
useConflictDetection(games)
|
||||||
|
|
||||||
// Handle conflict resolution
|
// Handle conflict resolution
|
||||||
const handleConflictResolve = async () => {
|
const handleConflictResolve = async (
|
||||||
const resolution = resolveConflict()
|
gameId: string,
|
||||||
if (!resolution) return
|
conflictType: 'cream-to-proton' | 'smoke-to-native'
|
||||||
|
) => {
|
||||||
// Always remove files - use the special conflict resolution command
|
|
||||||
try {
|
try {
|
||||||
|
// Invoke backend to resolve the conflict
|
||||||
await invoke('resolve_platform_conflict', {
|
await invoke('resolve_platform_conflict', {
|
||||||
gameId: resolution.gameId,
|
gameId,
|
||||||
conflictType: resolution.conflictType,
|
conflictType,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Remove from UI
|
||||||
|
resolveConflict(gameId, conflictType)
|
||||||
|
|
||||||
|
showToast('Conflict resolved successfully', 'success')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error resolving conflict:', error)
|
console.error('Error resolving conflict:', error)
|
||||||
showToast(`Failed to resolve conflict: ${error}`, 'error')
|
showToast('Failed to resolve conflict', 'error')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,17 +175,12 @@ function App() {
|
|||||||
<SettingsDialog visible={settingsDialog.visible} onClose={handleSettingsClose} />
|
<SettingsDialog visible={settingsDialog.visible} onClose={handleSettingsClose} />
|
||||||
|
|
||||||
{/* Conflict Detection Dialog */}
|
{/* Conflict Detection Dialog */}
|
||||||
{currentConflict && (
|
<ConflictDialog
|
||||||
<ConflictDialog
|
visible={showDialog}
|
||||||
visible={true}
|
conflicts={conflicts}
|
||||||
gameTitle={currentConflict.gameTitle}
|
onResolve={handleConflictResolve}
|
||||||
conflictType={currentConflict.type}
|
onClose={closeDialog}
|
||||||
onConfirm={handleConflictResolve}
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Steam Launch Options Reminder */}
|
|
||||||
<ReminderDialog visible={showReminder} onClose={closeReminder} />
|
|
||||||
|
|
||||||
{/* Disclaimer Dialog - Shows AFTER everything is loaded */}
|
{/* Disclaimer Dialog - Shows AFTER everything is loaded */}
|
||||||
<DisclaimerDialog visible={showDisclaimer} onClose={handleDisclaimerClose} />
|
<DisclaimerDialog visible={showDisclaimer} onClose={handleDisclaimerClose} />
|
||||||
|
|||||||
Reference in New Issue
Block a user