This commit is contained in:
2026-03-29 20:48:16 +02:00
parent be58034440
commit 2ee30baa25
3 changed files with 95 additions and 15 deletions
+35 -13
View File
@@ -187,17 +187,14 @@
position: sticky;
bottom: 0;
width: fit-content;
align-self: flex-end;
padding: 0.5rem 1rem;
background: var(--card-bg, #1e1e1e);
background: #2a2a2a;
color: var(--text-h, #f0f0f0);
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
border-radius: 8px 0 0 0;
border: 1px solid var(--border, #333);
border-right: none;
border-radius: 8px 8px 0 0;
border: 1px solid #666;
border-bottom: none;
z-index: 10;
}
@@ -226,8 +223,15 @@
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.4);
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(2px);
z-index: 1000;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Popup modal */
@@ -238,17 +242,35 @@
transform: translate(-50%, -50%);
background: var(--card-bg, #1e1e1e);
color: var(--text-h, #f0f0f0);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
padding: 2rem 2.5rem;
border-radius: 12px;
border: 1px solid var(--border, #555);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
z-index: 1001;
max-width: 90%;
min-width: 280px;
min-width: 300px;
text-align: center;
animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
from { opacity: 0; transform: translate(-50%, -48%) scale(0.92); }
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.import-modal button {
margin-top: 1rem;
padding: 0.5rem 1rem;
margin-top: 1.25rem;
padding: 0.5rem 1.5rem;
cursor: pointer;
background: var(--accent-bg, #444);
color: var(--accent, #fff);
border: 1px solid var(--accent-border, #666);
border-radius: 6px;
font-size: 0.95rem;
transition: background 0.2s;
}
.import-modal button:hover {
background: var(--accent, #fff);
color: var(--accent-bg, #444);
}
+55
View File
@@ -0,0 +1,55 @@
/* Modal overlay */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(2px);
z-index: 1000;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Popup modal */
.import-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--card-bg, #1e1e1e);
color: var(--text-h, #f0f0f0);
padding: 2rem 2.5rem;
border-radius: 12px;
border: 1px solid var(--border, #555);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
z-index: 1001;
max-width: 90%;
min-width: 300px;
text-align: center;
animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
from { opacity: 0; transform: translate(-50%, -48%) scale(0.92); }
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.import-modal button {
margin-top: 1.25rem;
padding: 0.5rem 1.5rem;
cursor: pointer;
background: var(--accent-bg, #444);
color: var(--accent, #fff);
border: 1px solid var(--accent-border, #666);
border-radius: 6px;
font-size: 0.95rem;
transition: background 0.2s;
}
.import-modal button:hover {
background: var(--accent, #fff);
color: var(--accent-bg, #444);
}
+5 -2
View File
@@ -1,6 +1,8 @@
// src/components/Footer/Footer.jsx
import React, { useEffect, useState } from 'react';
import { createPortal } from 'react-dom';
import { fetchDatabaseVersion, triggerFullImport } from '../../services/api';
import './Footer.css';
function Footer() {
const [dbVersion, setDbVersion] = useState(null);
@@ -43,14 +45,15 @@ function Footer() {
</button>
</footer>
{showModal && (
{showModal && createPortal(
<>
<div className="modal-backdrop" onClick={() => setShowModal(false)} />
<div className="import-modal">
<div>{modalMessage}</div>
<button onClick={() => setShowModal(false)}>Close</button>
</div>
</>
</>,
document.body
)}
</>
);