mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-22 06:28:04 +02:00
feat(design): Warm Cinema redesign + fast-start players
Full visual overhaul from Cyber-Cinematic Glass to "Warm Cinema": warm charcoal (#0B0908), cream (#F3E9DF), ember (#D9541F). Fraunces (editorial serif) for display, Karla for body/UI. Design - app_colors: new palette, all existing token names preserved, plus posterScrim/heroScrim gradients and lift()/emberFocus() shadows - app_theme: new type scale, tighter radii, 20+ component themes - mobile_theme aligned on the same tokens - glass_container: opaque layered surfaces replace glassmorphism; adds GlassCard (hover + remote-focus states) and CinemaBackdrop - players and boot splash restyled (film-leader motif, no web fonts) Performance - remove every BackdropFilter (33 call sites): backdrop blur forced a full framebuffer read per frame per card, the main scroll jank source - bundle Fraunces/Karla as assets: google_fonts no longer fetches from fonts.gstatic.com at startup - drop the blocking hls.js CDN script from index.html; no Dart code ever used it, only the player iframes need it - self-host hls.js/mpegts.js and load them on demand, so ~213 KB of mpegts is never downloaded for HLS streams - bound image decode size on 10 sites: a 40-poster grid drops from ~240 MB to a few tens of MB of GPU memory Players (new shared engine: web/xf-player-core.js) - event-driven start instead of a 200 ms buffer poll plus a 1.5 s wait - initialLiveManifestSize 3 -> 1, liveSyncDurationCount 10 -> 2, startFragPrefetch on, testBandwidth off - MPEG-TS initial stash 512 KB -> 64 KB - adaptive escalation fast -> balanced -> safe on repeated stalls (60 s rolling window), applied live for HLS so there is no visible cut Pre-existing build breakage fixed along the way - undefined AppColors.shimmer, AppTheme.durationXs and spacing8/12/16/32 - broken relative imports in channel_card and quality_selector_widget - missing GlassCard widget and hasBorder/showShadow parameters Also resolves a leftover unmerged .claude/settings.local.json by keeping the remote version. Still broken (pre-existing, dead code, not reachable from main.dart): recommendations_provider.dart and continue_watching_widget.dart import a models/playlist.dart that no longer exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cb5eca7547
commit
6f0f51384a
54 files changed
+2425
-1775
No files matched your search
@@ -50,7 +50,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
const SizedBox(height: 16),
|
||||
const Text(
|
||||
'Loading channels...',
|
||||
style: TextStyle(color: Colors.white70),
|
||||
style: TextStyle(color: AppColors.onSurfaceVariant),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
FutureBuilder(
|
||||
@@ -80,8 +80,8 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Failed to load channels',
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -89,7 +89,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'$e',
|
||||
style: const TextStyle(color: Colors.white54),
|
||||
style: const TextStyle(color: AppColors.onSurface54),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
@@ -153,15 +153,15 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: GoogleFonts.inter(color: Colors.white),
|
||||
style: GoogleFonts.karla(color: AppColors.onSurface),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search channels...',
|
||||
hintStyle:
|
||||
GoogleFonts.inter(color: Colors.white54),
|
||||
GoogleFonts.karla(color: AppColors.onSurface54),
|
||||
border: InputBorder.none,
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
color: Colors.white54,
|
||||
color: AppColors.onSurface54,
|
||||
),
|
||||
isDense: true,
|
||||
),
|
||||
@@ -171,7 +171,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
GestureDetector(
|
||||
onTap: () => _searchController.clear(),
|
||||
child:
|
||||
const Icon(Icons.close, color: Colors.white54),
|
||||
const Icon(Icons.close, color: AppColors.onSurface54),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -201,15 +201,15 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? Colors.white
|
||||
? AppColors.onSurface
|
||||
: Colors.black.withOpacity(0.4),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(
|
||||
category,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
color:
|
||||
isSelected ? Colors.black : Colors.white70,
|
||||
isSelected ? Colors.black : AppColors.onSurfaceVariant,
|
||||
fontWeight: isSelected
|
||||
? FontWeight.w600
|
||||
: FontWeight.w500,
|
||||
@@ -233,8 +233,8 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
: _showFavoritesOnly
|
||||
? 'Favorites'
|
||||
: _selectedCategory ?? 'Channels',
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
),
|
||||
@@ -249,7 +249,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
decoration: BoxDecoration(
|
||||
color: _showFavoritesOnly
|
||||
? AppColors.live.withOpacity(0.2)
|
||||
: Colors.white.withOpacity(0.1),
|
||||
: AppColors.onSurface.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: _showFavoritesOnly
|
||||
? Border.all(color: AppColors.live)
|
||||
@@ -261,7 +261,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
: Icons.favorite_border,
|
||||
color: _showFavoritesOnly
|
||||
? AppColors.live
|
||||
: Colors.white,
|
||||
: AppColors.onSurface,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
@@ -279,13 +279,13 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.tv_off,
|
||||
color: Colors.white24,
|
||||
color: AppColors.onSurface24,
|
||||
size: 48,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'No channels found',
|
||||
style: GoogleFonts.inter(color: Colors.white38),
|
||||
style: GoogleFonts.karla(color: AppColors.onSurface38),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -365,7 +365,7 @@ class _MobileChannelTile extends StatelessWidget {
|
||||
width: 48,
|
||||
height: 48,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
color: AppColors.onSurface.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.all(4),
|
||||
@@ -373,17 +373,19 @@ class _MobileChannelTile extends StatelessWidget {
|
||||
? Image.network(
|
||||
iconUrl,
|
||||
fit: BoxFit.contain,
|
||||
cacheWidth: 120,
|
||||
filterQuality: FilterQuality.low,
|
||||
errorBuilder: (_, __, ___) =>
|
||||
const Icon(Icons.tv, color: Colors.white24),
|
||||
const Icon(Icons.tv, color: AppColors.onSurface24),
|
||||
)
|
||||
: const Icon(Icons.tv, color: Colors.white24),
|
||||
: const Icon(Icons.tv, color: AppColors.onSurface24),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(
|
||||
channel.name,
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
),
|
||||
@@ -394,12 +396,12 @@ class _MobileChannelTile extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
color: AppColors.onSurface.withOpacity(0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.play_arrow_rounded,
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
size: 16,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -206,13 +206,13 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
color: AppColors.onSurface,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search Movies...',
|
||||
hintStyle: GoogleFonts.inter(color: AppColors.onSurfaceVariant),
|
||||
hintStyle: GoogleFonts.karla(color: AppColors.onSurfaceVariant),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
contentPadding: const EdgeInsets.only(bottom: 11),
|
||||
@@ -300,6 +300,8 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
? Image.network(
|
||||
_getProxiedImageUrl(movie.streamIcon, ref),
|
||||
fit: BoxFit.cover,
|
||||
cacheWidth: 360,
|
||||
filterQuality: FilterQuality.low,
|
||||
errorBuilder: (_, __, ___) =>
|
||||
Container(color: AppColors.surfaceContainerLow),
|
||||
)
|
||||
@@ -346,7 +348,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
children: [
|
||||
Text(
|
||||
movie.name,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -357,7 +359,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
if (isWatched)
|
||||
Text(
|
||||
'WATCHED',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.primary,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -389,7 +391,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_formatRating(movie.rating)!,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.onSurface,
|
||||
|
||||
@@ -197,13 +197,13 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
color: AppColors.onSurface,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search Series...',
|
||||
hintStyle: GoogleFonts.inter(color: AppColors.onSurfaceVariant),
|
||||
hintStyle: GoogleFonts.karla(color: AppColors.onSurfaceVariant),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
contentPadding: const EdgeInsets.only(bottom: 11),
|
||||
@@ -290,6 +290,8 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
? Image.network(
|
||||
_getProxiedImageUrl(series.cover, ref),
|
||||
fit: BoxFit.cover,
|
||||
cacheWidth: 360,
|
||||
filterQuality: FilterQuality.low,
|
||||
errorBuilder: (_, __, ___) =>
|
||||
Container(color: AppColors.surfaceContainerLow),
|
||||
)
|
||||
@@ -332,7 +334,7 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
right: 12,
|
||||
child: Text(
|
||||
series.name,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -364,7 +366,7 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_formatRating(series.rating)!,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.onSurface,
|
||||
|
||||
@@ -399,7 +399,7 @@ class _SectionHeader extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 8, bottom: 8),
|
||||
child: Text(
|
||||
title,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.onSurfaceVariant,
|
||||
|
||||
Reference in new issue
Block a user