Remove reminder #92

This commit is contained in:
Novattz
2026-01-09 20:40:35 +01:00
parent 169b7d5edd
commit 5ff51d1174

View File

@@ -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} />