Implement UI improvements and download management features

- Switch to light mode with black and white color scheme
- Simplify channel subscription to use channel ID only instead of RSS URL
- Add Downloads page to track all video download jobs
- Fix Flask-Login session management bug in user loader
- Always filter YouTube Shorts from feeds (case-insensitive)
- Fix download service video URL attribute error
- Fix watch page enum comparison for download status display

UI Changes:
- Update CSS to pure black/white/grayscale theme
- Remove colored text and buttons
- Use underlines for hover states instead of color changes
- Improve visual hierarchy with grayscale shades

Channel Subscription:
- Accept channel ID directly instead of full RSS URL
- Add validation for channel ID format (UC/UU prefix)
- Update help text and examples for easier onboarding

Downloads Page:
- New route at /downloads showing all video download jobs
- Display status, progress, and metadata for each download
- Sortable by status (downloading, pending, failed, completed)
- Actions to download, retry, or watch videos
- Responsive grid layout with thumbnails

Bug Fixes:
- Fix user loader to properly use database session context manager
- Fix download service accessing wrong attribute (link → video_url)
- Fix watch page template enum value comparisons
- Fix session detachment issues when accessing channel data

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-26 15:36:26 -05:00
parent 067926e80d
commit acb2ec0654
10 changed files with 296 additions and 80 deletions

View File

@@ -6,16 +6,16 @@
}
:root {
--primary-color: #ff0000;
--secondary-color: #282828;
--background-color: #0f0f0f;
--card-background: #1f1f1f;
--text-primary: #ffffff;
--text-secondary: #aaaaaa;
--border-color: #303030;
--success-color: #00aa00;
--error-color: #cc0000;
--info-color: #0066cc;
--primary-color: #000000;
--secondary-color: #f5f5f5;
--background-color: #ffffff;
--card-background: #fafafa;
--text-primary: #000000;
--text-secondary: #666666;
--border-color: #e0e0e0;
--success-color: #000000;
--error-color: #000000;
--info-color: #000000;
}
body {
@@ -45,7 +45,7 @@ body {
}
.logo a {
color: var(--primary-color);
color: #000000;
text-decoration: none;
font-size: 1.5rem;
font-weight: bold;
@@ -98,18 +98,21 @@ body {
}
.alert-success {
background-color: rgba(0, 170, 0, 0.1);
background-color: #f5f5f5;
border-color: var(--success-color);
color: var(--text-primary);
}
.alert-error {
background-color: rgba(204, 0, 0, 0.1);
background-color: #f5f5f5;
border-color: var(--error-color);
color: var(--text-primary);
}
.alert-info {
background-color: rgba(0, 102, 204, 0.1);
background-color: #f5f5f5;
border-color: var(--info-color);
color: var(--text-primary);
}
/* Dashboard */
@@ -140,7 +143,7 @@ body {
.video-card:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.video-thumbnail {
@@ -188,7 +191,7 @@ body {
}
.video-title a:hover {
color: var(--primary-color);
text-decoration: underline;
}
.video-channel {
@@ -217,17 +220,17 @@ body {
}
.badge-success {
background-color: var(--success-color);
background-color: #000000;
color: white;
}
.badge-info {
background-color: var(--info-color);
background-color: #666666;
color: white;
}
.badge-error {
background-color: var(--error-color);
background-color: #000000;
color: white;
}
@@ -248,24 +251,25 @@ body {
}
.btn-primary {
background-color: var(--primary-color);
background-color: #000000;
color: white;
}
.btn-secondary {
background-color: var(--border-color);
color: var(--text-primary);
background-color: #f5f5f5;
color: #000000;
border: 1px solid #e0e0e0;
}
.btn-link {
background-color: transparent;
color: var(--primary-color);
border: 1px solid var(--primary-color);
color: #000000;
border: 1px solid #000000;
}
.btn-download {
background-color: transparent;
color: var(--primary-color);
color: #000000;
border: none;
cursor: pointer;
font-size: 0.85rem;
@@ -331,7 +335,7 @@ body {
}
.channel-url a:hover {
color: var(--primary-color);
text-decoration: underline;
}
.channel-meta {
@@ -346,6 +350,103 @@ body {
gap: 1rem;
}
/* Downloads Page */
.downloads-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.download-card {
background-color: var(--card-background);
border-radius: 8px;
padding: 1.5rem;
display: grid;
grid-template-columns: 200px 1fr auto auto;
gap: 1.5rem;
align-items: center;
border: 1px solid var(--border-color);
}
.download-thumbnail {
width: 200px;
aspect-ratio: 16/9;
overflow: hidden;
border-radius: 4px;
background-color: var(--secondary-color);
}
.download-thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
}
.download-info {
flex: 1;
}
.download-title {
font-size: 1rem;
margin-bottom: 0.5rem;
}
.download-title a {
color: var(--text-primary);
text-decoration: none;
}
.download-title a:hover {
text-decoration: underline;
}
.download-channel {
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
.download-meta {
display: flex;
flex-wrap: wrap;
gap: 1rem;
font-size: 0.85rem;
color: var(--text-secondary);
}
.download-status-section {
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: center;
min-width: 120px;
}
.download-size {
font-size: 0.85rem;
color: var(--text-secondary);
}
.download-error {
font-size: 0.75rem;
color: var(--text-secondary);
margin-top: 0.5rem;
max-width: 150px;
word-wrap: break-word;
}
.download-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
min-width: 120px;
}
.download-actions .btn {
width: 100%;
text-align: center;
}
/* Form */
.form-container {
max-width: 600px;
@@ -497,7 +598,7 @@ body {
}
.channel-link:hover {
color: var(--primary-color);
text-decoration: underline;
}
.video-stats {
@@ -536,7 +637,7 @@ body {
}
.back-link a:hover {
color: var(--primary-color);
text-decoration: underline;
}
/* Auth Pages */
@@ -554,7 +655,8 @@ body {
background-color: var(--card-background);
padding: 3rem;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
border: 1px solid var(--border-color);
}
.auth-container h2 {
@@ -605,8 +707,9 @@ body {
}
.auth-footer a {
color: var(--primary-color);
color: #000000;
text-decoration: none;
font-weight: 600;
}
.auth-footer a:hover {
@@ -657,4 +760,17 @@ body {
.video-stats {
align-items: flex-start;
}
.download-card {
grid-template-columns: 1fr;
gap: 1rem;
}
.download-thumbnail {
width: 100%;
}
.download-actions {
width: 100%;
}
}