- Add JobLogger class to handler.py for structured timestamped logging - Increase MAX_TIMEOUT from 600s to 1200s (20 minutes) - Add logs column to generated_content table via migration - Store and display job execution logs in gallery UI - Add Logs button to gallery items with modal display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
831 lines
15 KiB
CSS
831 lines
15 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--primary: #667eea;
|
|
--primary-dark: #5a6fd6;
|
|
--secondary: #764ba2;
|
|
--success: #28a745;
|
|
--danger: #dc3545;
|
|
--warning: #ffc107;
|
|
--gray-100: #f8f9fa;
|
|
--gray-200: #e9ecef;
|
|
--gray-300: #dee2e6;
|
|
--gray-400: #ced4da;
|
|
--gray-500: #adb5bd;
|
|
--gray-600: #6c757d;
|
|
--gray-700: #495057;
|
|
--gray-800: #343a40;
|
|
--gray-900: #212529;
|
|
--radius: 8px;
|
|
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
--shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
background: var(--gray-100);
|
|
color: var(--gray-800);
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.hidden { display: none !important; }
|
|
|
|
/* Auth Pages */
|
|
.auth-container {
|
|
max-width: 400px;
|
|
margin: 100px auto;
|
|
padding: 40px;
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.auth-header {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.auth-header h1 {
|
|
font-size: 24px;
|
|
color: var(--gray-800);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.auth-header p {
|
|
color: var(--gray-600);
|
|
}
|
|
|
|
.auth-form .form-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
font-weight: 500;
|
|
color: var(--gray-700);
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group textarea,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: var(--radius);
|
|
font-size: 14px;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group textarea:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 15px;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 12px 20px;
|
|
border: none;
|
|
border-radius: var(--radius);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: var(--gray-600);
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: var(--gray-700);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--danger);
|
|
color: white;
|
|
}
|
|
|
|
.btn-link {
|
|
background: none;
|
|
color: var(--primary);
|
|
padding: 8px;
|
|
}
|
|
|
|
.btn-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.btn-block {
|
|
width: 100%;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 6px 12px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Error/Status Messages */
|
|
.error-message {
|
|
color: var(--danger);
|
|
padding: 10px;
|
|
text-align: center;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.status-message {
|
|
padding: 15px;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.status-message.info {
|
|
background: #d1ecf1;
|
|
color: #0c5460;
|
|
}
|
|
|
|
.status-message.success {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.status-message.error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
/* MFA */
|
|
.mfa-section {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.mfa-section + .mfa-section {
|
|
padding-top: 20px;
|
|
border-top: 1px solid var(--gray-200);
|
|
}
|
|
|
|
/* Navbar */
|
|
.navbar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 15px 30px;
|
|
background: white;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.navbar-brand {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.navbar-menu {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
}
|
|
|
|
.nav-link {
|
|
color: var(--gray-600);
|
|
text-decoration: none;
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius);
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-link:hover,
|
|
.nav-link.active {
|
|
color: var(--primary);
|
|
background: var(--gray-100);
|
|
}
|
|
|
|
.navbar-user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding-left: 20px;
|
|
border-left: 1px solid var(--gray-200);
|
|
}
|
|
|
|
#current-user {
|
|
font-weight: 500;
|
|
color: var(--gray-700);
|
|
}
|
|
|
|
/* Main Content */
|
|
.main-content {
|
|
padding: 30px;
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.content-section {
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.section-header h2 {
|
|
font-size: 24px;
|
|
color: var(--gray-800);
|
|
}
|
|
|
|
/* Cards */
|
|
.card {
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
padding: 24px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.card h2 {
|
|
font-size: 16px;
|
|
color: var(--gray-700);
|
|
margin-bottom: 20px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 2px solid var(--primary);
|
|
}
|
|
|
|
.section-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 24px;
|
|
}
|
|
|
|
.section-grid .full-width {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
/* File Upload */
|
|
.file-upload {
|
|
position: relative;
|
|
}
|
|
|
|
.file-upload input[type="file"] {
|
|
display: none;
|
|
}
|
|
|
|
.file-upload-label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 40px;
|
|
border: 2px dashed var(--gray-300);
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.file-upload-label:hover {
|
|
border-color: var(--primary);
|
|
background: var(--gray-100);
|
|
}
|
|
|
|
.file-upload.has-file .file-upload-label {
|
|
display: none;
|
|
}
|
|
|
|
.upload-icon {
|
|
font-size: 48px;
|
|
color: var(--gray-400);
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.upload-text {
|
|
color: var(--gray-600);
|
|
}
|
|
|
|
.preview-container {
|
|
position: relative;
|
|
display: inline-block;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.preview-image {
|
|
max-width: 100%;
|
|
max-height: 300px;
|
|
border-radius: var(--radius);
|
|
object-fit: contain;
|
|
}
|
|
|
|
.clear-image-btn {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
width: 28px;
|
|
height: 28px;
|
|
border: none;
|
|
border-radius: 50%;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
color: white;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.clear-image-btn:hover {
|
|
background: var(--danger);
|
|
}
|
|
|
|
/* Output */
|
|
.output-video {
|
|
width: 100%;
|
|
max-height: 500px;
|
|
border-radius: var(--radius);
|
|
background: var(--gray-900);
|
|
}
|
|
|
|
/* Gallery */
|
|
.gallery-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.gallery-item {
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow);
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.gallery-item:hover {
|
|
transform: translateY(-4px);
|
|
}
|
|
|
|
.gallery-item-media {
|
|
position: relative;
|
|
aspect-ratio: 16/9;
|
|
background: var(--gray-900);
|
|
}
|
|
|
|
.gallery-item-media video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.gallery-item-status {
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.gallery-item-status.completed { background: var(--success); color: white; }
|
|
.gallery-item-status.processing { background: var(--warning); color: var(--gray-900); }
|
|
.gallery-item-status.pending { background: var(--gray-500); color: white; }
|
|
.gallery-item-status.failed { background: var(--danger); color: white; }
|
|
|
|
.gallery-item-info {
|
|
padding: 15px;
|
|
}
|
|
|
|
.gallery-item-prompt {
|
|
font-size: 13px;
|
|
color: var(--gray-700);
|
|
margin-bottom: 10px;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.gallery-item-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 12px;
|
|
color: var(--gray-500);
|
|
}
|
|
|
|
.gallery-item-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Admin */
|
|
.admin-tabs {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.tab-btn {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
background: var(--gray-200);
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.tab-btn.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.admin-tab {
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.users-list {
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.user-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 15px 20px;
|
|
border-bottom: 1px solid var(--gray-200);
|
|
}
|
|
|
|
.user-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.user-info h4 {
|
|
font-size: 14px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.user-info p {
|
|
font-size: 12px;
|
|
color: var(--gray-500);
|
|
}
|
|
|
|
.user-badges {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.badge {
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.badge-admin { background: var(--primary); color: white; }
|
|
.badge-inactive { background: var(--danger); color: white; }
|
|
|
|
/* Modal */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal-content {
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
padding: 30px;
|
|
max-width: 500px;
|
|
width: 90%;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.modal-header h3 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
color: var(--gray-500);
|
|
}
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid var(--gray-200);
|
|
}
|
|
|
|
/* Pagination */
|
|
.pagination {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.pagination button {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--gray-300);
|
|
background: white;
|
|
border-radius: var(--radius);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.pagination button.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
border-color: var(--primary);
|
|
}
|
|
|
|
.pagination button:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Filter */
|
|
.filter-group select {
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
/* Loading Spinner */
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid var(--gray-200);
|
|
border-top-color: var(--primary);
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
margin: 20px auto;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Pending Jobs Banner */
|
|
.pending-jobs-banner {
|
|
background: linear-gradient(135deg, var(--primary), var(--secondary));
|
|
color: white;
|
|
padding: 12px 20px;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 15px;
|
|
animation: fadeIn 0.3s ease;
|
|
}
|
|
|
|
.pending-jobs-banner span {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.pending-jobs-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.pending-jobs-banner .btn {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
color: white;
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.pending-jobs-banner .btn:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.section-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.navbar {
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
}
|
|
|
|
.navbar-menu {
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.pending-jobs-banner {
|
|
flex-direction: column;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
/* Video Viewer */
|
|
.video-viewer {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.9);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.video-viewer-close {
|
|
position: absolute;
|
|
top: 20px;
|
|
right: 20px;
|
|
width: 40px;
|
|
height: 40px;
|
|
border: none;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: white;
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.video-viewer-close:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.video-viewer-player {
|
|
max-width: 90vw;
|
|
max-height: 90vh;
|
|
border-radius: var(--radius);
|
|
}
|
|
|
|
.gallery-item-media video {
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Privacy Mode */
|
|
.privacy-toggle.active {
|
|
background: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.privacy-mode .preview-container .preview-image,
|
|
.privacy-mode .output-video,
|
|
.privacy-mode .gallery-item-media video,
|
|
.privacy-mode .gallery-item-media img {
|
|
filter: blur(20px);
|
|
transition: filter 0.3s ease;
|
|
}
|
|
|
|
.privacy-mode .gallery-item-media::after {
|
|
content: 'Hidden';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
color: white;
|
|
font-weight: 500;
|
|
text-shadow: 0 1px 3px rgba(0,0,0,0.5);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Logs Modal */
|
|
.logs-container {
|
|
background: var(--gray-100);
|
|
border-radius: var(--radius);
|
|
padding: 15px;
|
|
}
|
|
|
|
.logs-status {
|
|
margin-bottom: 12px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.logs-status .badge {
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.badge-completed { background: var(--success); color: white; }
|
|
.badge-processing { background: var(--warning); color: var(--gray-900); }
|
|
.badge-pending { background: var(--gray-500); color: white; }
|
|
.badge-failed { background: var(--danger); color: white; }
|
|
|
|
.logs-error {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
padding: 12px;
|
|
border-radius: var(--radius);
|
|
margin-bottom: 12px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.logs-content {
|
|
font-family: 'SF Mono', Monaco, 'Andale Mono', monospace;
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
background: var(--gray-900);
|
|
color: #e0e0e0;
|
|
padding: 15px;
|
|
border-radius: var(--radius);
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.logs-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.logs-content::-webkit-scrollbar-track {
|
|
background: var(--gray-800);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.logs-content::-webkit-scrollbar-thumb {
|
|
background: var(--gray-600);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.logs-content::-webkit-scrollbar-thumb:hover {
|
|
background: var(--gray-500);
|
|
}
|