feat(frontend): add SyncModal component

Blocking overlay polling /api/sync/status, rendering by progress.Phase
(indeterminate spinner while discovering, a real progress bar for the
activities/workouts phases), then the final sync result (success count,
or the error message that was already fetched but never rendered
before) plus the existing pending-details/pending-workouts nudge. Never
auto-closes -- not yet wired into GarminConnection.tsx (next commit).
This commit is contained in:
2026-07-27 08:31:01 +02:00
parent 39aa121420
commit 1fb9271aaa
2 changed files with 148 additions and 0 deletions

View File

@@ -485,6 +485,51 @@ button:disabled {
word-break: break-word;
}
.sync-modal-content {
width: min(420px, 90vw);
}
.sync-modal-body {
padding: 1.5rem 1rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
text-align: center;
}
.sync-modal-progress {
width: 100%;
height: 0.6rem;
}
.sync-modal-label {
margin: 0;
color: #9aa0ab;
font-size: 0.9rem;
}
.sync-modal-spinner {
width: 2rem;
height: 2rem;
border: 3px solid #2a2d35;
border-top-color: #3b82f6;
border-radius: 50%;
animation: sync-modal-spin 0.8s linear infinite;
}
@keyframes sync-modal-spin {
to {
transform: rotate(360deg);
}
}
.sync-modal-actions {
justify-content: flex-end;
padding: 0.75rem 1rem;
border-top: 1px solid #2a2d35;
}
.json-toggle {
display: inline-block;
width: 1rem;