Files
comfyui-serverless/frontend/public/css/style.css
Debian 8f050b41a0
All checks were successful
Build and Push Frontend Docker Image / build (push) Successful in 57s
Build and Push Docker Image / build (push) Successful in 30m18s
Fix stuck processing jobs and increase timeouts
Background Job Processor:
- Add src/services/jobProcessor.ts that polls RunPod every 30s for stuck jobs
- Automatically completes or fails jobs that were abandoned (user navigated away)
- Times out jobs after 25 minutes

Client-Side Resume:
- Add GET /api/generate/pending endpoint to fetch user's processing jobs
- Add checkPendingJobs() that runs on login/page load
- Show notification banner when user has jobs generating in background
- Add "View Progress" button to resume polling for a job

Timeout Increases (10min → 25min):
- src/utils/validators.ts: request validation max/default
- src/config.ts: RUNPOD_MAX_TIMEOUT_MS default
- public/js/app.js: client-side polling maxTime
- src/services/jobProcessor.ts: background processor timeout

CI/CD Optimization:
- Add paths-ignore to backend build.yaml to skip rebuilds on frontend-only changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 05:36:53 +00:00

669 lines
12 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-image {
max-width: 100%;
max-height: 300px;
border-radius: var(--radius);
object-fit: contain;
}
/* 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;
}
}