520be53901
- Add proper Alembic initial migration (0001_initial_schema.py) - Migrate refresh tokens from JSON file to SQLite (RefreshTokenTable) - Remove Neko-Sama provider entirely (redirects to Gupy, not a host) - Fix provider health check always showing UNKNOWN - Run check_all_health() on startup - Fix POST /providers/health/check background task bug - Add HTMX refresh after manual health check trigger - Fix anime search relevance scoring with MIN_RELEVANCE_THRESHOLD=0.5 - Replace bare 'except:' with 'except Exception:' across codebase - Add Playwright E2E test suite (12 tests, auth setup, helpers) - Fix toast container blocking clicks via pointer-events: none - Remove obsolete Jest/Vite test files and config - Clean up obsolete test_watchlist scripts - Update sonarr model comment for active providers
59 lines
1.9 KiB
HTML
59 lines
1.9 KiB
HTML
<div id="toast-container"
|
|
class="toast-container"
|
|
x-data="{ toasts: [] }"
|
|
@show-toast.window="toasts.push({ id: Date.now(), message: $event.detail.message, type: $event.detail.type || 'info' }); setTimeout(() => { toasts = toasts.filter(t => t.id !== toasts[0].id) }, 5000)">
|
|
|
|
<template x-for="toast in toasts" :key="toast.id">
|
|
<div class="toast"
|
|
:class="'toast-' + toast.type"
|
|
x-show="true"
|
|
x-transition:enter="toast-enter"
|
|
x-transition:leave="toast-leave">
|
|
<div class="toast-content">
|
|
<i class="fas" :class="{
|
|
'fa-check-circle': toast.type === 'success',
|
|
'fa-exclamation-circle': toast.type === 'error',
|
|
'fa-info-circle': toast.type === 'info'
|
|
}"></i>
|
|
<span x-text="toast.message"></span>
|
|
</div>
|
|
<button class="toast-close" @click="toasts = toasts.filter(t => t.id !== toast.id)">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<style>
|
|
.toast-container {
|
|
position: fixed;
|
|
top: 20px;
|
|
right: 20px;
|
|
z-index: 9999;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
pointer-events: none;
|
|
}
|
|
.toast {
|
|
pointer-events: auto;
|
|
}
|
|
.toast {
|
|
min-width: 250px;
|
|
padding: 12px 16px;
|
|
border-radius: 8px;
|
|
background: #2d2d2d;
|
|
color: white;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-left: 4px solid #ccc;
|
|
}
|
|
.toast-success { border-left-color: #4caf50; }
|
|
.toast-error { border-left-color: #f44336; }
|
|
.toast-info { border-left-color: #2196f3; }
|
|
.toast-content { display: flex; align-items: center; gap: 10px; }
|
|
.toast-close { background: none; border: none; color: #aaa; cursor: pointer; }
|
|
</style>
|