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; position: sticky;
bottom: 0; bottom: 0;
width: fit-content; width: fit-content;
align-self: flex-end;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background: var(--card-bg, #1e1e1e); background: #2a2a2a;
color: var(--text-h, #f0f0f0); color: var(--text-h, #f0f0f0);
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 1rem; gap: 1rem;
border-radius: 8px 0 0 0; border-radius: 8px 8px 0 0;
border: 1px solid var(--border, #333); border: 1px solid #666;
border-right: none;
border-bottom: none; border-bottom: none;
z-index: 10; z-index: 10;
} }
@@ -226,8 +223,15 @@
.modal-backdrop { .modal-backdrop {
position: fixed; position: fixed;
inset: 0; inset: 0;
background: rgba(0, 0, 0, 0.4); background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(2px);
z-index: 1000; z-index: 1000;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
} }
/* Popup modal */ /* Popup modal */
@@ -238,17 +242,35 @@
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
background: var(--card-bg, #1e1e1e); background: var(--card-bg, #1e1e1e);
color: var(--text-h, #f0f0f0); color: var(--text-h, #f0f0f0);
padding: 1.5rem; padding: 2rem 2.5rem;
border-radius: 8px; border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); border: 1px solid var(--border, #555);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
z-index: 1001; z-index: 1001;
max-width: 90%; max-width: 90%;
min-width: 280px; min-width: 300px;
text-align: center; 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 { .import-modal button {
margin-top: 1rem; margin-top: 1.25rem;
padding: 0.5rem 1rem; padding: 0.5rem 1.5rem;
cursor: pointer; 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 // src/components/Footer/Footer.jsx
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { createPortal } from 'react-dom';
import { fetchDatabaseVersion, triggerFullImport } from '../../services/api'; import { fetchDatabaseVersion, triggerFullImport } from '../../services/api';
import './Footer.css';
function Footer() { function Footer() {
const [dbVersion, setDbVersion] = useState(null); const [dbVersion, setDbVersion] = useState(null);
@@ -43,14 +45,15 @@ function Footer() {
</button> </button>
</footer> </footer>
{showModal && ( {showModal && createPortal(
<> <>
<div className="modal-backdrop" onClick={() => setShowModal(false)} /> <div className="modal-backdrop" onClick={() => setShowModal(false)} />
<div className="import-modal"> <div className="import-modal">
<div>{modalMessage}</div> <div>{modalMessage}</div>
<button onClick={() => setShowModal(false)}>Close</button> <button onClick={() => setShowModal(false)}>Close</button>
</div> </div>
</> </>,
document.body
)} )}
</> </>
); );