diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 943db927..3427f762 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -1,5 +1,5 @@ { - "upgradeIntroWelcome": "Welcome to\nSpotiFLAC 5.0", + "upgradeIntroWelcome": "Welcome to\nSpotiFLAC-Mobile 5.0", "upgradeIntroThemeTitle": "Make it\nyour own.", "upgradeIntroThemeBody": "Choose a look. Your choice applies immediately, and you can change it later in Appearance.", "upgradeIntroThemeMaterialBody": "The familiar layout, with Material controls and your accent color.", diff --git a/lib/l10n/arb/app_id.arb b/lib/l10n/arb/app_id.arb index 2fb0185d..e2a33135 100644 --- a/lib/l10n/arb/app_id.arb +++ b/lib/l10n/arb/app_id.arb @@ -1,5 +1,5 @@ { - "upgradeIntroWelcome": "Selamat datang di\nSpotiFLAC 5.0", + "upgradeIntroWelcome": "Selamat datang di\nSpotiFLAC-Mobile 5.0", "upgradeIntroThemeTitle": "Pilih\ntampilanmu.", "upgradeIntroThemeBody": "Pilih tema yang kamu suka. Pilihan langsung diterapkan dan bisa diubah lagi lewat Tampilan.", "upgradeIntroThemeMaterialBody": "Tampilan yang sudah familiar, dengan kontrol Material dan warna aksen pilihanmu.", diff --git a/lib/screens/track_metadata_cards.dart b/lib/screens/track_metadata_cards.dart index c03afd72..71b6fd12 100644 --- a/lib/screens/track_metadata_cards.dart +++ b/lib/screens/track_metadata_cards.dart @@ -11,6 +11,19 @@ final ImageFilter _trackMetadataBackdropBlur = ImageFilter.blur( ); extension _TrackMetadataCards on _TrackMetadataScreenState { + List _headerMetadataItems(BuildContext context) => [ + if (_displayAudioQuality != null && _displayAudioQuality!.isNotEmpty) + HeaderMetaItem(_displayAudioQuality!), + if (duration != null) HeaderMetaItem(formatClock(duration!)), + if (_service == 'local') + HeaderMetaItem( + context.l10n.librarySourceLocal, + icon: context.isMornye ? CupertinoIcons.folder : Icons.folder, + ) + else if (_service.isNotEmpty) + HeaderMetaItem(_service[0].toUpperCase() + _service.substring(1)), + ]; + Widget _buildAnimatedTrackContent( BuildContext context, WidgetRef ref, @@ -265,20 +278,7 @@ extension _TrackMetadataCards on _TrackMetadataScreenState { scheme: _trackMetadataHeroScheme, child: HeaderMetaRow( items: [ - if (_displayAudioQuality != null && - _displayAudioQuality!.isNotEmpty) - HeaderMetaItem(_displayAudioQuality!), - if (duration != null) - HeaderMetaItem(formatClock(duration!)), - if (_service != 'local') - HeaderMetaItem( - _service[0].toUpperCase() + _service.substring(1), - ) - else - HeaderMetaItem( - context.l10n.librarySourceLocal, - icon: Icons.folder, - ), + ..._headerMetadataItems(context), if (_hasCheckedFile && !_fileExists) HeaderMetaItem( context.l10n.trackFileNotFound, diff --git a/lib/screens/track_metadata_mornye.dart b/lib/screens/track_metadata_mornye.dart index eeac44fe..ba24ae97 100644 --- a/lib/screens/track_metadata_mornye.dart +++ b/lib/screens/track_metadata_mornye.dart @@ -106,6 +106,8 @@ extension _TrackMetadataMornye on _TrackMetadataScreenState { color: scheme.onSurfaceVariant, ), ), + const SizedBox(height: 12), + HeaderMetaRow(items: _headerMetadataItems(context)), const SizedBox(height: 16), _buildActionButtons(context, ref, scheme, _fileExists), if (_hasCheckedFile && !_fileExists) diff --git a/test/upgrade_intro_test.dart b/test/upgrade_intro_test.dart index 6057ddfa..5de99d01 100644 --- a/test/upgrade_intro_test.dart +++ b/test/upgrade_intro_test.dart @@ -137,7 +137,7 @@ void main() { tester, ) async { await openTour(tester, brightness: brightness); - expect(find.text('Welcome to\nSpotiFLAC 5.0'), findsOneWidget); + expect(find.text('Welcome to\nSpotiFLAC-Mobile 5.0'), findsOneWidget); expect(find.byType(Image), findsNothing); await capturePage(tester, '${brightness.name}-welcome'); await tester.tap(find.text('Continue')); @@ -146,7 +146,7 @@ void main() { await capturePage(tester, '${brightness.name}-themes'); await tester.binding.handlePopRoute(); await tester.pumpAndSettle(); - expect(find.text('Welcome to\nSpotiFLAC 5.0'), findsOneWidget); + expect(find.text('Welcome to\nSpotiFLAC-Mobile 5.0'), findsOneWidget); for (var i = 0; i < 4; i++) { await tester.tap(find.text('Continue')); await tester.pumpAndSettle();