mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-23 23:18:06 +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
@@ -446,7 +446,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
'Unknown')
|
||||
.toString()
|
||||
: widget.title,
|
||||
style: GoogleFonts.outfit(
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -455,7 +455,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
),
|
||||
Text(
|
||||
'Live TV',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.primary,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -512,7 +512,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
_buildInlineEpg(),
|
||||
const SizedBox(height: 12),
|
||||
const Divider(
|
||||
color: Colors.white10,
|
||||
color: AppColors.onSurface06,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
// Control Buttons
|
||||
@@ -612,10 +612,10 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.title,
|
||||
style: GoogleFonts.outfit(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -639,7 +639,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
right: 40,
|
||||
child: GlassContainer.glass(
|
||||
borderRadius: 24,
|
||||
borderColor: Colors.white.withOpacity(0.1),
|
||||
borderColor: AppColors.onSurface.withOpacity(0.1),
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -653,8 +653,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
seconds: _currentPosition.toInt(),
|
||||
),
|
||||
),
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white70,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
@@ -664,8 +664,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
trackHeight: 4,
|
||||
activeTrackColor: AppColors.primary,
|
||||
inactiveTrackColor:
|
||||
Colors.white.withOpacity(0.2),
|
||||
thumbColor: Colors.white,
|
||||
AppColors.onSurface.withOpacity(0.2),
|
||||
thumbColor: AppColors.onSurface,
|
||||
thumbShape: const RoundSliderThumbShape(
|
||||
enabledThumbRadius: 8,
|
||||
),
|
||||
@@ -705,8 +705,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
seconds: _totalDuration.toInt(),
|
||||
),
|
||||
),
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white70,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -784,7 +784,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
}) {
|
||||
// Button with direct Material/InkWell - PointerInterceptor is on outer container
|
||||
return Material(
|
||||
color: transparent ? Colors.transparent : Colors.white.withOpacity(0.1),
|
||||
color: transparent ? Colors.transparent : AppColors.onSurface.withOpacity(0.1),
|
||||
shape: const CircleBorder(),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@@ -800,9 +800,9 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
shape: BoxShape.circle,
|
||||
border: transparent
|
||||
? null
|
||||
: Border.all(color: Colors.white.withOpacity(0.1)),
|
||||
: Border.all(color: AppColors.onSurface.withOpacity(0.1)),
|
||||
),
|
||||
child: Icon(icon, color: Colors.white, size: iconSize),
|
||||
child: Icon(icon, color: AppColors.onSurface, size: iconSize),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -867,7 +867,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
return Material(
|
||||
color: highlighted
|
||||
? AppColors.primary.withOpacity(0.2)
|
||||
: Colors.white.withOpacity(0.1),
|
||||
: AppColors.onSurface.withOpacity(0.1),
|
||||
shape: const CircleBorder(),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@@ -886,13 +886,13 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
border: Border.all(
|
||||
color: highlighted
|
||||
? AppColors.primary.withOpacity(0.5)
|
||||
: Colors.white.withOpacity(0.2),
|
||||
: AppColors.onSurface.withOpacity(0.2),
|
||||
width: highlighted ? 2 : 1,
|
||||
),
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
color: highlighted ? AppColors.primary : Colors.white,
|
||||
color: highlighted ? AppColors.primary : AppColors.onSurface,
|
||||
size: iconSize,
|
||||
),
|
||||
),
|
||||
@@ -930,7 +930,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
child: const Text(
|
||||
'LIVE',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -942,8 +942,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
widget.channels != null
|
||||
? widget.channels![_currentIndex].name
|
||||
: widget.title,
|
||||
style: GoogleFonts.outfit(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@@ -978,7 +978,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
child: const Text(
|
||||
'LIVE',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -992,8 +992,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
children: [
|
||||
Text(
|
||||
currentProgram.title,
|
||||
style: GoogleFonts.outfit(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@@ -1003,8 +1003,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
if (currentProgram.description.isNotEmpty)
|
||||
Text(
|
||||
currentProgram.description,
|
||||
style: GoogleFonts.inter(
|
||||
color: Colors.white60,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface54,
|
||||
fontSize: 12,
|
||||
),
|
||||
maxLines: 1,
|
||||
@@ -1027,7 +1027,7 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
child: const Text(
|
||||
'LIVE',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -1038,8 +1038,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
widget.channels != null
|
||||
? widget.channels![_currentIndex].name
|
||||
: widget.title,
|
||||
style: GoogleFonts.outfit(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
@@ -1050,8 +1050,8 @@ class _PlayerScreenState extends ConsumerState<PlayerScreen> {
|
||||
widget.channels != null
|
||||
? widget.channels![_currentIndex].name
|
||||
: widget.title,
|
||||
style: GoogleFonts.outfit(
|
||||
color: Colors.white,
|
||||
style: GoogleFonts.karla(
|
||||
color: AppColors.onSurface,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
|
||||
@@ -27,7 +27,7 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Select Playlist',
|
||||
style: GoogleFonts.roboto(
|
||||
style: GoogleFonts.karla(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textPrimary,
|
||||
),
|
||||
@@ -97,7 +97,7 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Error loading playlists',
|
||||
style: GoogleFonts.outfit(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 18,
|
||||
color: AppColors.textSecondary,
|
||||
),
|
||||
@@ -109,7 +109,7 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: AppColors.textPrimary,
|
||||
),
|
||||
child: Text('Retry', style: GoogleFonts.inter()),
|
||||
child: Text('Retry', style: GoogleFonts.karla()),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -123,14 +123,14 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
const Icon(
|
||||
Icons.playlist_remove,
|
||||
size: 64,
|
||||
color: Colors.white24,
|
||||
color: AppColors.onSurface24,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'No playlists available',
|
||||
style: GoogleFonts.outfit(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 18,
|
||||
color: Colors.white60,
|
||||
color: AppColors.onSurface54,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -138,9 +138,9 @@ class PlaylistSelectionScreen extends ConsumerWidget {
|
||||
currentUser?.isAdmin ?? false
|
||||
? 'Add playlists in Admin Panel'
|
||||
: 'Contact administrator',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
color: Colors.white38,
|
||||
color: AppColors.onSurface38,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -209,13 +209,13 @@ class _PlaylistCardState extends State<_PlaylistCard> {
|
||||
duration: const Duration(milliseconds: 200),
|
||||
decoration: BoxDecoration(
|
||||
color: _isHovered
|
||||
? Colors.white.withOpacity(0.1)
|
||||
: Colors.white.withOpacity(0.03),
|
||||
? AppColors.onSurface.withOpacity(0.1)
|
||||
: AppColors.onSurface.withOpacity(0.03),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
border: Border.all(
|
||||
color: _isHovered
|
||||
? AppColors.primary.withOpacity(0.5)
|
||||
: Colors.white.withOpacity(0.08),
|
||||
: AppColors.onSurface.withOpacity(0.08),
|
||||
width: 1.5,
|
||||
),
|
||||
boxShadow: _isHovered
|
||||
@@ -245,8 +245,8 @@ class _PlaylistCardState extends State<_PlaylistCard> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.1),
|
||||
Colors.white.withOpacity(0.05),
|
||||
AppColors.onSurface.withOpacity(0.1),
|
||||
AppColors.onSurface.withOpacity(0.05),
|
||||
],
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
@@ -263,16 +263,16 @@ class _PlaylistCardState extends State<_PlaylistCard> {
|
||||
child: Icon(
|
||||
Icons.playlist_play_rounded,
|
||||
size: 32,
|
||||
color: _isHovered ? Colors.white : Colors.white70,
|
||||
color: _isHovered ? AppColors.onSurface : AppColors.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
widget.playlist.name,
|
||||
style: GoogleFonts.outfit(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
color: AppColors.onSurface,
|
||||
height: 1.2,
|
||||
),
|
||||
maxLines: 2,
|
||||
@@ -281,9 +281,9 @@ class _PlaylistCardState extends State<_PlaylistCard> {
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
Uri.tryParse(widget.playlist.dns)?.host ?? widget.playlist.dns,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 13,
|
||||
color: Colors.white38,
|
||||
color: AppColors.onSurface38,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
maxLines: 1,
|
||||
|
||||
@@ -130,6 +130,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
width: 248,
|
||||
height: 350,
|
||||
fit: BoxFit.cover,
|
||||
memCacheWidth: 500,
|
||||
errorWidget: (_, __, ___) => Container(
|
||||
width: 248,
|
||||
height: 350,
|
||||
@@ -143,7 +144,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
// Title
|
||||
Text(
|
||||
_seriesInfo!.name,
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.onSurface,
|
||||
@@ -159,7 +160,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_formatRating(_seriesInfo!.rating!)!,
|
||||
style: GoogleFonts.roboto(fontSize: 13, color: AppColors.onSurfaceVariant),
|
||||
style: GoogleFonts.karla(fontSize: 13, color: AppColors.onSurfaceVariant),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -169,7 +170,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
if (_seriesInfo!.plot != null && _seriesInfo!.plot!.isNotEmpty)
|
||||
Text(
|
||||
_seriesInfo!.plot!,
|
||||
style: GoogleFonts.roboto(fontSize: 12, color: AppColors.onSurfaceVariant),
|
||||
style: GoogleFonts.karla(fontSize: 12, color: AppColors.onSurfaceVariant),
|
||||
maxLines: 5,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -178,7 +179,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
// Season selector
|
||||
Text(
|
||||
'Seasons',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.onSurface,
|
||||
@@ -200,7 +201,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
},
|
||||
selectedColor: AppColors.primaryContainer,
|
||||
backgroundColor: AppColors.surfaceContainer,
|
||||
labelStyle: GoogleFonts.inter(
|
||||
labelStyle: GoogleFonts.karla(
|
||||
color: isSelected ? AppColors.onPrimary : AppColors.onSurfaceVariant,
|
||||
fontSize: 12,
|
||||
),
|
||||
@@ -224,7 +225,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
'Season $_selectedSeason - ${currentEpisodes.length} Episodes',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.onSurface,
|
||||
@@ -236,7 +237,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
? Center(
|
||||
child: Text(
|
||||
'No episodes found',
|
||||
style: GoogleFonts.roboto(color: AppColors.onSurfaceVariant),
|
||||
style: GoogleFonts.karla(color: AppColors.onSurfaceVariant),
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
@@ -323,7 +324,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
? const Icon(Icons.check, color: AppColors.onSurface, size: 20)
|
||||
: Text(
|
||||
'${episode.episodeNum}',
|
||||
style: GoogleFonts.inter(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColors.onSurface,
|
||||
@@ -340,7 +341,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
episode.title,
|
||||
style: GoogleFonts.roboto(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: isWatched ? AppColors.onSurfaceVariant : AppColors.onSurface,
|
||||
@@ -351,7 +352,7 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
||||
if (episode.durationSecs != null && episode.durationSecs! > 0)
|
||||
Text(
|
||||
_formatDuration(episode.durationSecs!),
|
||||
style: GoogleFonts.roboto(
|
||||
style: GoogleFonts.karla(
|
||||
fontSize: 12,
|
||||
color: AppColors.onSurfaceVariant,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user