From a2311c150b9eaf647373a1fe8e8227c039c7604d Mon Sep 17 00:00:00 2001 From: Feichtmeier Date: Thu, 9 May 2024 22:00:33 +0200 Subject: [PATCH] Release 1.3.8 --- lib/src/app/view/master_detail_page.dart | 3 +- lib/src/common/icons.dart | 2 + lib/src/local_audio/view/album_page.dart | 2 +- lib/src/local_audio/view/artist_page.dart | 4 +- lib/src/patch_notes/patch_notes.dart | 21 ++++-- .../blurred_full_height_player_image.dart | 1 + lib/src/podcasts/view/podcast_page.dart | 72 ++++++++++++------- .../radio/view/radio_page_star_button.dart | 5 +- pubspec.lock | 4 +- pubspec.yaml | 4 +- 10 files changed, 76 insertions(+), 42 deletions(-) diff --git a/lib/src/app/view/master_detail_page.dart b/lib/src/app/view/master_detail_page.dart index 373567f04..b5de6c6b1 100644 --- a/lib/src/app/view/master_detail_page.dart +++ b/lib/src/app/view/master_detail_page.dart @@ -153,8 +153,7 @@ class MasterDetailPage extends StatelessWidget with WatchItMixin { imageUrl: podcast.value.firstOrNull?.albumArtUrl ?? podcast.value.firstOrNull?.imageUrl, ), - iconBuilder: (context, selected) => PodcastPage.createIcon( - context: context, + iconBuilder: (context, selected) => PodcastPageSideBarIcon( imageUrl: podcast.value.firstOrNull?.albumArtUrl ?? podcast.value.firstOrNull?.imageUrl, ), diff --git a/lib/src/common/icons.dart b/lib/src/common/icons.dart index d841c71f9..2eaf0dd13 100644 --- a/lib/src/common/icons.dart +++ b/lib/src/common/icons.dart @@ -402,10 +402,12 @@ class Iconz { ? Icon( Iconz().starFilled, size: iconSize, + color: isStarred ? color : null, ) : Icon( Iconz().star, size: iconSize, + color: isStarred ? color : null, ); } } diff --git a/lib/src/local_audio/view/album_page.dart b/lib/src/local_audio/view/album_page.dart index 8aef1f410..3f835ef00 100644 --- a/lib/src/local_audio/view/album_page.dart +++ b/lib/src/local_audio/view/album_page.dart @@ -155,7 +155,7 @@ class AlbumPageControlButton extends StatelessWidget { isSelected: libraryModel.isPinnedAlbum(id), icon: Icon( pinnedAlbum ? Iconz().pinFilled : Iconz().pin, - color: pinnedAlbum ? context.t.primaryColor : null, + color: pinnedAlbum ? context.t.colorScheme.primary : null, ), onPressed: () { if (libraryModel.isPinnedAlbum(id)) { diff --git a/lib/src/local_audio/view/artist_page.dart b/lib/src/local_audio/view/artist_page.dart index c6792156d..2ed788d8a 100644 --- a/lib/src/local_audio/view/artist_page.dart +++ b/lib/src/local_audio/view/artist_page.dart @@ -138,7 +138,7 @@ class _ArtistPageControlPanel extends StatelessWidget with WatchItMixin { IconButton( icon: Icon( Iconz().list, - color: !useGridView ? context.t.primaryColor : null, + color: !useGridView ? context.t.colorScheme.primary : null, ), isSelected: !useGridView, onPressed: () => setUseGridView(false), @@ -146,7 +146,7 @@ class _ArtistPageControlPanel extends StatelessWidget with WatchItMixin { IconButton( icon: Icon( Iconz().grid, - color: useGridView ? context.t.primaryColor : null, + color: useGridView ? context.t.colorScheme.primary : null, ), isSelected: useGridView, onPressed: () => setUseGridView(true), diff --git a/lib/src/patch_notes/patch_notes.dart b/lib/src/patch_notes/patch_notes.dart index 15599a383..0f5ef82bb 100644 --- a/lib/src/patch_notes/patch_notes.dart +++ b/lib/src/patch_notes/patch_notes.dart @@ -196,7 +196,7 @@ const kPatchNotes20240424 = 'Hello MusicPod Users, this update includes\n' '\n\nIf you like MusicPod please consider sponsoring me:' '\n'; -// 2024 05 205 +// 2024 05 05 const kPatchNotes20240505disposed = 'patchNotes20240505disposed'; const kPatchNotesTitle20240505 = 'Patch notes: 2024-05-05'; const kPatchNotes20240505 = 'Hello MusicPod Users, this update includes\n' @@ -207,8 +207,21 @@ const kPatchNotes20240505 = 'Hello MusicPod Users, this update includes\n' '\n\nIf you like MusicPod please consider sponsoring me:' '\n'; -const kRecentPatchNotesDisposed = kPatchNotes20240505disposed; -const kRecentPatchNotesTitle = kPatchNotesTitle20240505; -const kRecentPatchNotes = kPatchNotes20240505; +// 2024 05 09 +const kPatchNotes20240509disposed = 'patchNotes20240509disposed'; +const kPatchNotesTitle20240509 = 'Patch notes: 2024-05-09'; +const kPatchNotes20240509 = 'Hello MusicPod Users, this update includes\n' + '\n* All pages are now fully reworked, so that headers will now scroll away to give you more space' + '\n* MacOs and Windows has a new theme (Phoenix Theme), which is a moderate version of Material, without surface tint, without ripple effect, with better contrast and with improved menus and dialogs' + '\n* you can now search podcast category and authors from a podcast page label and subtitle' + '\n* more controls for full height player videos on hover' + '\n* full window and full screen have now better icons' + '\n* bug fixes' + '\n\nIf you like MusicPod please consider sponsoring me:' + '\n'; + +const kRecentPatchNotesDisposed = kPatchNotes20240509disposed; +const kRecentPatchNotesTitle = kPatchNotesTitle20240509; +const kRecentPatchNotes = kPatchNotes20240509; const kPatchNotesDisposed = 'kPatchNotesDisposed'; diff --git a/lib/src/player/view/blurred_full_height_player_image.dart b/lib/src/player/view/blurred_full_height_player_image.dart index a9f74ce26..6bbd2c09a 100644 --- a/lib/src/player/view/blurred_full_height_player_image.dart +++ b/lib/src/player/view/blurred_full_height_player_image.dart @@ -19,6 +19,7 @@ class BlurredFullHeightPlayerImage extends StatelessWidget { Widget build(BuildContext context) { final theme = context.t; return Opacity( + key: ValueKey(audio?.url), opacity: theme.isLight ? 0.8 : 0.9, child: SizedBox( width: size.width, diff --git a/lib/src/podcasts/view/podcast_page.dart b/lib/src/podcasts/view/podcast_page.dart index 3b75a6ba9..4426d7ee4 100644 --- a/lib/src/podcasts/view/podcast_page.dart +++ b/lib/src/podcasts/view/podcast_page.dart @@ -6,6 +6,7 @@ import '../../../build_context_x.dart'; import '../../../common.dart'; import '../../../data.dart'; import '../../../get.dart'; +import '../../../podcasts.dart'; import '../../common/explore_online_popup.dart'; import '../../common/sliver_audio_page_control_panel.dart'; import '../../l10n/l10n.dart'; @@ -22,32 +23,6 @@ class PodcastPage extends StatelessWidget with WatchItMixin { required this.title, }); - static Widget createIcon({ - required BuildContext context, - String? imageUrl, - }) { - return ClipRRect( - borderRadius: BorderRadius.circular(5), - child: SizedBox( - width: sideBarImageSize, - height: sideBarImageSize, - child: SafeNetworkImage( - url: imageUrl, - fit: BoxFit.fitHeight, - filterQuality: FilterQuality.medium, - fallBackIcon: Icon( - Iconz().podcast, - size: sideBarImageSize, - ), - errorIcon: Icon( - Iconz().podcast, - size: sideBarImageSize, - ), - ), - ), - ); - } - final String? imageUrl; final String pageId; final String title; @@ -60,6 +35,13 @@ class PodcastPage extends StatelessWidget with WatchItMixin { watchPropertyValue((LibraryModel m) => m.lastPositions?.length); watchPropertyValue((LibraryModel m) => m.downloadsLength); + void onTap(text) { + final podcastModel = getIt(); + Navigator.of(context).maybePop(); + podcastModel.setSearchQuery(text); + podcastModel.search(searchQuery: text); + } + return YaruDetailPage( appBar: HeaderBar( adaptive: true, @@ -93,6 +75,8 @@ class PodcastPage extends StatelessWidget with WatchItMixin { subTitle: audios?.firstOrNull?.artist, description: audios?.firstOrNull?.albumArtist, title: title, + onLabelTab: onTap, + onSubTitleTab: onTap, ), ), SliverAudioPageControlPanel( @@ -197,3 +181,39 @@ class PodcastPageTitle extends StatelessWidget with WatchItMixin { ); } } + +class PodcastPageSideBarIcon extends StatelessWidget { + const PodcastPageSideBarIcon({super.key, this.imageUrl}); + + final String? imageUrl; + + @override + Widget build(BuildContext context) { + if (imageUrl == null) { + return SideBarFallBackImage( + child: Icon(Iconz().podcast), + ); + } + + return ClipRRect( + borderRadius: BorderRadius.circular(5), + child: SizedBox( + width: sideBarImageSize, + height: sideBarImageSize, + child: SafeNetworkImage( + url: imageUrl, + fit: BoxFit.fitHeight, + filterQuality: FilterQuality.medium, + fallBackIcon: Icon( + Iconz().podcast, + size: sideBarImageSize, + ), + errorIcon: Icon( + Iconz().podcast, + size: sideBarImageSize, + ), + ), + ), + ); + } +} diff --git a/lib/src/radio/view/radio_page_star_button.dart b/lib/src/radio/view/radio_page_star_button.dart index ccb802d0c..018a4820f 100644 --- a/lib/src/radio/view/radio_page_star_button.dart +++ b/lib/src/radio/view/radio_page_star_button.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import '../../../build_context_x.dart'; import '../../../get.dart'; import '../../../l10n.dart'; import '../../../library.dart'; @@ -27,9 +28,7 @@ class RadioPageStarButton extends StatelessWidget with WatchItMixin { : isStarred ? () => libraryModel.unStarStation(station.url!) : () => libraryModel.addStarredStation(station.url!, {station}), - icon: Iconz().getAnimatedStar( - isStarred, - ), + icon: Iconz().getAnimatedStar(isStarred, context.t.colorScheme.primary), ); } } diff --git a/pubspec.lock b/pubspec.lock index 89d9d9d1f..d4cf6d019 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1042,8 +1042,8 @@ packages: dependency: "direct main" description: path: "." - ref: "7ce9dadf3f021aa3e2cfa721c68675fe29d3e378" - resolved-ref: "7ce9dadf3f021aa3e2cfa721c68675fe29d3e378" + ref: "4486490240ba42cc668079064ad41f3ae8869d01" + resolved-ref: "4486490240ba42cc668079064ad41f3ae8869d01" url: "https://github.com/Feichtmeier/phoenix_theme" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index dcc026e04..cd5158d0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: musicpod description: Ubuntu music, radio and podcast player. -version: 1.3.7 +version: 1.3.8 publish_to: "none" @@ -54,7 +54,7 @@ dependencies: phoenix_theme: git: url: https://github.com/Feichtmeier/phoenix_theme - ref: 7ce9dadf3f021aa3e2cfa721c68675fe29d3e378 + ref: 4486490240ba42cc668079064ad41f3ae8869d01 pls: ^1.1.0 podcast_search: ^0.6.9 radio_browser_api: ^2.0.0+1