feat: add loading page with real-time initialization progress
- Create loading.html template with WebSocket-based progress updates - Update initialization_service to emit progress events via ProgressService - Modify setup endpoint to run initialization in background and redirect to loading page - Add /loading route in page_controller - Show real-time progress for series sync, NFO scan, and media scan steps - Display completion message with button to continue to app - Handle errors with visual feedback
This commit is contained in:
@@ -703,10 +703,18 @@
|
||||
const data = await response.json();
|
||||
|
||||
if (response.ok && data.status === 'ok') {
|
||||
showMessage('Setup completed successfully! Redirecting to login...', 'success');
|
||||
setTimeout(() => {
|
||||
window.location.href = '/login';
|
||||
}, 2000);
|
||||
// Redirect to loading page if provided, otherwise go to login
|
||||
if (data.redirect) {
|
||||
showMessage('Setup saved! Initializing your anime library...', 'success');
|
||||
setTimeout(() => {
|
||||
window.location.href = data.redirect;
|
||||
}, 500);
|
||||
} else {
|
||||
showMessage('Setup completed successfully! Redirecting to login...', 'success');
|
||||
setTimeout(() => {
|
||||
window.location.href = '/login';
|
||||
}, 2000);
|
||||
}
|
||||
} else {
|
||||
const errorMessage = data.detail || data.message || 'Setup failed';
|
||||
showMessage(errorMessage, 'error');
|
||||
|
||||
Reference in New Issue
Block a user