diff --git a/src/App.css b/src/App.css index 92aa612..3928a58 100644 --- a/src/App.css +++ b/src/App.css @@ -183,23 +183,20 @@ } } -/* in app.css or Footer.module.css */ .footer { - position: fixed; + position: sticky; /* sticks at bottom of parent */ bottom: 0; - left: 0; /* stretch across bottom */ - right: 0; + width: 100%; padding: 0.5rem 1rem; background: var(--card-bg, #1e1e1e); color: var(--text-h, #f0f0f0); + display: flex; + justify-content: space-between; + align-items: center; border-top-left-radius: 8px; border-top-right-radius: 8px; border: 1px solid var(--border, #333); - font-size: 0.9rem; - display: flex; - align-items: center; - justify-content: space-between; /* spread version + button */ - z-index: 1000; + z-index: 10; } .footer button { @@ -222,28 +219,33 @@ color: var(--accent-bg, #444); } +/* Modal overlay */ +.modal-backdrop { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.4); + z-index: 1000; +} + +/* Popup modal */ .import-modal { - position: fixed; /* overlay on entire viewport */ + position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); - background: var(--card-bg, #2e2e2e); - color: var(--text-h, #fff); - padding: 1rem 2rem; + background: var(--card-bg, #1e1e1e); + color: var(--text-h, #f0f0f0); + padding: 1.5rem; border-radius: 8px; - border: 1px solid var(--border, #444); - z-index: 2000; /* above footer */ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); - max-width: 80%; + z-index: 1001; + max-width: 90%; + min-width: 280px; text-align: center; } .import-modal button { margin-top: 1rem; - background: var(--accent-bg, #444); - color: var(--accent, #fff); - border: 1px solid var(--accent-border, #666); - border-radius: 4px; - padding: 4px 8px; + padding: 0.5rem 1rem; cursor: pointer; } \ No newline at end of file diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index a6004ef..d7db208 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -5,11 +5,9 @@ import { fetchDatabaseVersion, triggerFullImport } from '../../services/api'; function Footer() { const [dbVersion, setDbVersion] = useState(null); const [importing, setImporting] = useState(false); - const [error, setError] = useState(null); - const [showModal, setShowModal] = useState(false); const [modalMessage, setModalMessage] = useState(''); + const [showModal, setShowModal] = useState(false); - // Fetch DB version on mount useEffect(() => { fetchDatabaseVersion() .then(data => setDbVersion(data.database_version)) @@ -22,7 +20,6 @@ function Footer() { const handleImport = async () => { setImporting(true); - setError(null); try { const result = await triggerFullImport(); const data = await fetchDatabaseVersion(); @@ -39,18 +36,21 @@ function Footer() { return ( <> -