fix: show Laya model download progress and surface errors in Settings (#12)
Track download progress in layaService (bytes/total, phase, error state) and expose it through the laya status route. Render a progress bar during model download in Settings via a layaStatusPresentation service, and display download/status errors inline instead of failing silently. Cover progress tracking and status presentation with tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -776,6 +776,60 @@ h4 {
|
||||
gap: var(--space-sm);
|
||||
}
|
||||
|
||||
.laya-progress {
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
.laya-progress-track {
|
||||
position: relative;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: var(--color-bg-secondary);
|
||||
}
|
||||
|
||||
.laya-progress-bar {
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: var(--color-accent);
|
||||
transition: width var(--transition-fast);
|
||||
}
|
||||
|
||||
.laya-progress-track.indeterminate .laya-progress-bar {
|
||||
width: 35%;
|
||||
animation: laya-progress-indeterminate 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes laya-progress-indeterminate {
|
||||
from { transform: translateX(-120%); }
|
||||
to { transform: translateX(360%); }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.laya-progress-track.indeterminate .laya-progress-bar {
|
||||
animation: none;
|
||||
width: 100%;
|
||||
opacity: .45;
|
||||
}
|
||||
}
|
||||
|
||||
.laya-details-toggle {
|
||||
margin-top: var(--space-sm);
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.laya-error-details {
|
||||
margin-top: var(--space-xs);
|
||||
padding: var(--space-sm);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--color-bg-secondary);
|
||||
color: var(--color-text-muted);
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.laya-model-actions {
|
||||
justify-content: flex-start;
|
||||
margin: var(--space-md) 0;
|
||||
|
||||
Reference in New Issue
Block a user