Add circular progress indicator with percentage for capture tests
Some checks failed
Validate / validate (push) Failing after 9s
Some checks failed
Validate / validate (push) Failing after 9s
- Replace simple spinner with SVG circular progress ring - Show progress percentage (0-100%) in center of ring - Animate progress based on capture duration - Update every 100ms for smooth animation - Clean up timer on completion or cancellation UI improvements: - Full-page overlay with blur backdrop - Large percentage display (28px) - Progress ring uses primary color - Clean, minimal design Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
--card-bg: #2d2d2d;
|
||||
--text-color: #e0e0e0;
|
||||
--border-color: #404040;
|
||||
--display-badge-bg: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Light theme */
|
||||
@@ -25,6 +26,7 @@
|
||||
--card-bg: #ffffff;
|
||||
--text-color: #333333;
|
||||
--border-color: #e0e0e0;
|
||||
--display-badge-bg: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
/* Default to dark theme */
|
||||
@@ -548,7 +550,7 @@ section {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
background: var(--display-badge-bg);
|
||||
padding: 1px 6px;
|
||||
border-radius: 4px;
|
||||
letter-spacing: 0.5px;
|
||||
@@ -690,6 +692,11 @@ select {
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
input[type="range"] {
|
||||
width: 100%;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
/* Better password field appearance */
|
||||
input[type="password"] {
|
||||
letter-spacing: 0.15em;
|
||||
@@ -717,21 +724,98 @@ input:-webkit-autofill:focus {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* Full-page overlay spinner */
|
||||
.overlay-spinner {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-container {
|
||||
position: relative;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-ring {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-ring-circle {
|
||||
transition: stroke-dashoffset 0.1s linear;
|
||||
stroke: var(--primary-color);
|
||||
stroke-width: 4;
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-ring-bg {
|
||||
stroke: rgba(255, 255, 255, 0.1);
|
||||
stroke-width: 4;
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.overlay-spinner .progress-percentage {
|
||||
color: white;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.overlay-spinner .spinner-text {
|
||||
margin-top: 24px;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
padding: 15px 20px;
|
||||
border-radius: 4px;
|
||||
bottom: 40px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) translateY(100px);
|
||||
padding: 16px 24px;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
z-index: 1000;
|
||||
transition: opacity 0.3s, transform 0.3s;
|
||||
z-index: 2001;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
|
||||
min-width: 300px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.toast.show {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0);
|
||||
animation: toastShake 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes toastShake {
|
||||
0%, 100% { transform: translateX(-50%) translateY(0); }
|
||||
10%, 30%, 50%, 70%, 90% { transform: translateX(-50%) translateY(-5px); }
|
||||
20%, 40%, 60%, 80% { transform: translateX(-50%) translateY(5px); }
|
||||
}
|
||||
|
||||
.toast.success {
|
||||
@@ -802,6 +886,15 @@ input:-webkit-autofill:focus {
|
||||
animation: slideUp 0.3s ease-out;
|
||||
}
|
||||
|
||||
#template-modal .modal-content {
|
||||
max-width: 500px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#test-template-modal .modal-content {
|
||||
max-width: 420px;
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
transform: translateY(20px);
|
||||
@@ -1608,3 +1701,257 @@ input:-webkit-autofill:focus {
|
||||
/* target z-index for fixed overlay is set inline via JS (target is outside overlay DOM) */
|
||||
|
||||
|
||||
/* ===========================
|
||||
Capture Templates Styles
|
||||
=========================== */
|
||||
|
||||
.templates-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.template-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
transition: box-shadow 0.2s;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.template-card:hover {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.add-template-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 180px;
|
||||
cursor: pointer;
|
||||
border: 2px dashed var(--border-color);
|
||||
background: transparent;
|
||||
transition: border-color 0.2s, background 0.2s;
|
||||
}
|
||||
|
||||
.add-template-card:hover {
|
||||
border-color: var(--primary-color);
|
||||
background: rgba(33, 150, 243, 0.05);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.add-template-icon {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 300;
|
||||
color: var(--text-secondary);
|
||||
line-height: 1;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.add-template-card:hover .add-template-icon {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.add-template-label {
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 8px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.template-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.template-name {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.badge {
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.badge-default {
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.template-description {
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.template-config {
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.template-config-details {
|
||||
margin: 12px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.template-config-details summary {
|
||||
cursor: pointer;
|
||||
color: var(--primary-color);
|
||||
font-weight: 500;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.template-config-details summary:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.template-no-config {
|
||||
margin: 12px 0;
|
||||
font-size: 13px;
|
||||
color: var(--primary-color);
|
||||
font-weight: 500;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.template-config-details pre {
|
||||
background: var(--bg-secondary);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
padding: 12px;
|
||||
margin-top: 8px;
|
||||
overflow-x: auto;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.template-card-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: auto;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.template-card-actions .btn:not(.btn-icon) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.template-card-actions .btn-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: var(--text-secondary);
|
||||
font-style: italic;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* Template Test Section */
|
||||
.template-test-section {
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.template-test-section h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.test-results-container {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.test-preview-section,
|
||||
.test-performance-section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.test-preview-section:last-child,
|
||||
.test-performance-section:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.test-preview-section h4,
|
||||
.test-performance-section h4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.test-preview-image {
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.test-preview-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.test-performance-stats {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.stat-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.stat-item span {
|
||||
color: var(--text-secondary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.stat-item strong {
|
||||
color: var(--text-color);
|
||||
font-weight: 600;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Empty state */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: var(--text-secondary);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.templates-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user