diff --git a/src/App.tsx b/src/App.tsx index 32858a1..688a2ae 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,7 @@ import { useState } from 'react' import { invoke } from '@tauri-apps/api/core' import { useAppContext } from '@/contexts/useAppContext' -import { useAppLogic, useConflictDetection } from '@/hooks' +import { useAppLogic, useConflictDetection, useDisclaimer } from '@/hooks' import './styles/main.scss' // Layout components @@ -21,6 +21,7 @@ import { SettingsDialog, ConflictDialog, ReminderDialog, + DisclaimerDialog, } from '@/components/dialogs' // Game components @@ -32,6 +33,8 @@ import { GameList } from '@/components/games' function App() { const [updateComplete, setUpdateComplete] = useState(false) + const { showDisclaimer, handleDisclaimerClose } = useDisclaimer() + // Get application logic from hook const { filter, @@ -179,6 +182,9 @@ function App() { {/* Steam Launch Options Reminder */} + + {/* Disclaimer Dialog - Shows AFTER everything is loaded */} + ) diff --git a/src/components/dialogs/DisclaimerDialog.tsx b/src/components/dialogs/DisclaimerDialog.tsx new file mode 100644 index 0000000..1513e92 --- /dev/null +++ b/src/components/dialogs/DisclaimerDialog.tsx @@ -0,0 +1,69 @@ +import { + Dialog, + DialogHeader, + DialogBody, + DialogFooter, + DialogActions, +} from '@/components/dialogs' +import { Button, AnimatedCheckbox } from '@/components/buttons' +import { useState } from 'react' + +export interface DisclaimerDialogProps { + visible: boolean + onClose: (dontShowAgain: boolean) => void +} + +/** + * Disclaimer dialog that appears on app startup + * Informs users that CreamLinux manages DLC IDs, not actual DLC files + */ +const DisclaimerDialog = ({ visible, onClose }: DisclaimerDialogProps) => { + const [dontShowAgain, setDontShowAgain] = useState(false) + + const handleOkClick = () => { + onClose(dontShowAgain) + } + + return ( + onClose(false)} size="medium" preventBackdropClose> + +
+

Important Notice

+
+
+ + +
+

+ CreamLinux Installer does not install any DLC content files. +

+

+ This application manages the DLC IDs associated with DLCs you want to + use. You must obtain the actual DLC files separately. +

+

+ This tool only configures which DLC IDs are recognized by the game unlockers + (CreamLinux and SmokeAPI). +

+
+
+ + + +
+ setDontShowAgain(!dontShowAgain)} + label="Don't show this disclaimer again" + /> + +
+
+
+
+ ) +} + +export default DisclaimerDialog \ No newline at end of file diff --git a/src/styles/components/dialogs/_disclaimer_dialog.scss b/src/styles/components/dialogs/_disclaimer_dialog.scss new file mode 100644 index 0000000..5be075f --- /dev/null +++ b/src/styles/components/dialogs/_disclaimer_dialog.scss @@ -0,0 +1,38 @@ +@use '../../themes/index' as *; +@use '../../abstracts/index' as *; + +/* + Disclaimer Dialog Styles + Used for the startup disclaimer dialog +*/ + +.disclaimer-header { + h3 { + margin-bottom: 0; + } +} +.disclaimer-content { + p { + margin-bottom: 1rem; + color: var(--text-secondary); + line-height: 1.6; + font-size: 0.95rem; + + &:last-of-type { + margin-bottom: 0; + } + + strong { + color: var(--text-primary); + font-weight: var(--bold); + } + } +} + +.disclaimer-footer { + display: flex; + justify-content: space-between; + align-items: center; + gap: 1rem; + width: 100%; +} diff --git a/src/styles/components/dialogs/_index.scss b/src/styles/components/dialogs/_index.scss index b318bec..064664c 100644 --- a/src/styles/components/dialogs/_index.scss +++ b/src/styles/components/dialogs/_index.scss @@ -4,3 +4,4 @@ @forward './settings_dialog'; @forward './smokeapi_settings_dialog'; @forward './conflict_dialog'; +@forward './disclaimer_dialog';