fix(buscar): rebuild the offline banner with offlineAccent

Audit 13.1 (t4 line 641): the banner rendered wifi_off in
colorScheme.error (red) inside a generic glass card. Rebuilt using
offlineAccent (#E8879A) — a token that existed since Tier 1 with no
consumer — for the tint, border and icon, plus the prototype's title/
detail layout and a restyled Retry chip. New offlineBannerTitle key
translated to all 13 locales.
This commit is contained in:
2026-07-29 23:40:38 +02:00
parent e1505d7aaa
commit 684e8e8ff9
29 changed files with 329 additions and 175 deletions
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "اكتشاف",
"liveRadar": "رادار مباشر",
"genresTitle": "الأنواع",
"offlineBannerTitle": "لا يوجد اتصال",
"retryAction": "إعادة المحاولة",
"noStationsAvailable": "لا توجد محطات متاحة",
"noStationsAvailableSubtitle": "جرّب التحديث أو اختيار نوع آخر لالتقاط الإشارة من جديد.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "সনাক্ত করুন",
"liveRadar": "লাইভ রাডার",
"genresTitle": "ধরন",
"offlineBannerTitle": "সংযোগ নেই",
"retryAction": "আবার চেষ্টা করুন",
"noStationsAvailable": "কোনো স্টেশন উপলব্ধ নেই",
"noStationsAvailableSubtitle": "সিগন্যাল আবার ধরতে রিফ্রেশ করুন বা অন্য ধরন বেছে নিন।",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Erkennen",
"liveRadar": "Live-Radar",
"genresTitle": "Genres",
"offlineBannerTitle": "Keine Verbindung",
"retryAction": "Erneut versuchen",
"noStationsAvailable": "Keine Sender verfügbar",
"noStationsAvailableSubtitle": "Versuche zu aktualisieren oder ein anderes Genre auszuwählen, um wieder ein Signal zu empfangen.",
+1
View File
@@ -369,6 +369,7 @@
"detectAction": "Detect",
"liveRadar": "Live radar",
"genresTitle": "Genres",
"offlineBannerTitle": "No connection",
"retryAction": "Retry",
"noStationsAvailable": "No stations available",
"noStationsAvailableSubtitle": "Try refreshing or choosing another genre to capture a signal again.",
+1
View File
@@ -369,6 +369,7 @@
"detectAction": "Detectar",
"liveRadar": "Radar en directo",
"genresTitle": "Géneros",
"offlineBannerTitle": "Sin conexión",
"retryAction": "Reintentar",
"noStationsAvailable": "No hay emisoras disponibles",
"noStationsAvailableSubtitle": "Probá refrescar o elegir otro género para volver a capturar señal.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Détecter",
"liveRadar": "Radar en direct",
"genresTitle": "Genres",
"offlineBannerTitle": "Aucune connexion",
"retryAction": "Réessayer",
"noStationsAvailable": "Aucune station disponible",
"noStationsAvailableSubtitle": "Essayez dactualiser ou de choisir un autre genre pour capter à nouveau un signal.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "पहचानें",
"liveRadar": "लाइव रडार",
"genresTitle": "शैलियाँ",
"offlineBannerTitle": "कोई कनेक्शन नहीं",
"retryAction": "फिर कोशिश करें",
"noStationsAvailable": "कोई स्टेशन उपलब्ध नहीं",
"noStationsAvailableSubtitle": "सिग्नल फिर पकड़ने के लिए रीफ़्रेश करें या दूसरी शैली चुनें।",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Deteksi",
"liveRadar": "Radar langsung",
"genresTitle": "Genre",
"offlineBannerTitle": "Tidak ada koneksi",
"retryAction": "Coba lagi",
"noStationsAvailable": "Tidak ada stasiun tersedia",
"noStationsAvailableSubtitle": "Coba segarkan atau pilih genre lain untuk menangkap sinyal kembali.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Rileva",
"liveRadar": "Radar live",
"genresTitle": "Generi",
"offlineBannerTitle": "Nessuna connessione",
"retryAction": "Riprova",
"noStationsAvailable": "Nessuna emittente disponibile",
"noStationsAvailableSubtitle": "Prova ad aggiornare o a scegliere un altro genere per captare di nuovo un segnale.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "検出",
"liveRadar": "ライブレーダー",
"genresTitle": "ジャンル",
"offlineBannerTitle": "接続なし",
"retryAction": "再試行",
"noStationsAvailable": "利用できる局がありません",
"noStationsAvailableSubtitle": "再読み込みするか別のジャンルを選んで、もう一度電波をつかまえてください。",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Detectar",
"liveRadar": "Radar ao vivo",
"genresTitle": "Gêneros",
"offlineBannerTitle": "Sem conexão",
"retryAction": "Tentar novamente",
"noStationsAvailable": "Não há estações disponíveis",
"noStationsAvailableSubtitle": "Tente atualizar ou escolher outro gênero para captar sinal novamente.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "Определить",
"liveRadar": "Радар в эфире",
"genresTitle": "Жанры",
"offlineBannerTitle": "Нет подключения",
"retryAction": "Повторить",
"noStationsAvailable": "Нет доступных станций",
"noStationsAvailableSubtitle": "Попробуйте обновить или выбрать другой жанр, чтобы снова поймать сигнал.",
+1
View File
@@ -306,6 +306,7 @@
"detectAction": "检测",
"liveRadar": "直播雷达",
"genresTitle": "类型",
"offlineBannerTitle": "无连接",
"retryAction": "重试",
"noStationsAvailable": "没有可用电台",
"noStationsAvailableSubtitle": "尝试刷新或选择其他类型,重新捕捉信号。",
+6
View File
@@ -1438,6 +1438,12 @@ abstract class AppLocalizations {
/// **'Géneros'**
String get genresTitle;
/// No description provided for @offlineBannerTitle.
///
/// In es, this message translates to:
/// **'Sin conexión'**
String get offlineBannerTitle;
/// No description provided for @retryAction.
///
/// In es, this message translates to:
+3
View File
@@ -766,6 +766,9 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get genresTitle => 'الأنواع';
@override
String get offlineBannerTitle => 'لا يوجد اتصال';
@override
String get retryAction => 'إعادة المحاولة';
+3
View File
@@ -769,6 +769,9 @@ class AppLocalizationsBn extends AppLocalizations {
@override
String get genresTitle => 'ধরন';
@override
String get offlineBannerTitle => 'সংযোগ নেই';
@override
String get retryAction => 'আবার চেষ্টা করুন';
+3
View File
@@ -772,6 +772,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get genresTitle => 'Genres';
@override
String get offlineBannerTitle => 'Keine Verbindung';
@override
String get retryAction => 'Erneut versuchen';
+3
View File
@@ -765,6 +765,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get genresTitle => 'Genres';
@override
String get offlineBannerTitle => 'No connection';
@override
String get retryAction => 'Retry';
+3
View File
@@ -770,6 +770,9 @@ class AppLocalizationsEs extends AppLocalizations {
@override
String get genresTitle => 'Géneros';
@override
String get offlineBannerTitle => 'Sin conexión';
@override
String get retryAction => 'Reintentar';
+3
View File
@@ -774,6 +774,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get genresTitle => 'Genres';
@override
String get offlineBannerTitle => 'Aucune connexion';
@override
String get retryAction => 'Réessayer';
+3
View File
@@ -766,6 +766,9 @@ class AppLocalizationsHi extends AppLocalizations {
@override
String get genresTitle => 'शैलियाँ';
@override
String get offlineBannerTitle => 'कोई कनेक्शन नहीं';
@override
String get retryAction => 'फिर कोशिश करें';
+3
View File
@@ -766,6 +766,9 @@ class AppLocalizationsId extends AppLocalizations {
@override
String get genresTitle => 'Genre';
@override
String get offlineBannerTitle => 'Tidak ada koneksi';
@override
String get retryAction => 'Coba lagi';
+3
View File
@@ -772,6 +772,9 @@ class AppLocalizationsIt extends AppLocalizations {
@override
String get genresTitle => 'Generi';
@override
String get offlineBannerTitle => 'Nessuna connessione';
@override
String get retryAction => 'Riprova';
+3
View File
@@ -740,6 +740,9 @@ class AppLocalizationsJa extends AppLocalizations {
@override
String get genresTitle => 'ジャンル';
@override
String get offlineBannerTitle => '接続なし';
@override
String get retryAction => '再試行';
+3
View File
@@ -769,6 +769,9 @@ class AppLocalizationsPt extends AppLocalizations {
@override
String get genresTitle => 'Gêneros';
@override
String get offlineBannerTitle => 'Sem conexão';
@override
String get retryAction => 'Tentar novamente';
+3
View File
@@ -770,6 +770,9 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get genresTitle => 'Жанры';
@override
String get offlineBannerTitle => 'Нет подключения';
@override
String get retryAction => 'Повторить';
+3
View File
@@ -737,6 +737,9 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get genresTitle => '类型';
@override
String get offlineBannerTitle => '无连接';
@override
String get retryAction => '重试';
+69 -13
View File
@@ -7,6 +7,7 @@ import '../estado/estado_radio.dart';
import '../l10n/gen/app_localizations.dart';
import '../modelos/emisora.dart';
import '../tema/pluri_animate.dart';
import '../tema/pluriwave_theme.dart';
import '../widgets/pluri_glass_surface.dart';
import '../widgets/pluri_icon.dart';
import '../widgets/pluri_layout.dart';
@@ -847,26 +848,81 @@ class _PantallaBuscarState extends State<PantallaBuscar> {
);
}
// Audit 13.1 (t4 line 641): the prototype's offline banner is a
// rgba(207,102,121,X) tinted card — this consolidates on the ONE
// `offlineAccent` token (`#E8879A`) the proposal named for this exact
// banner (`pluriwave_tokens.dart:77`), which existed unused until now,
// rather than introducing a second near-identical raw hex for the tint.
Widget _errorBanner(
BuildContext context,
String error,
ThemeData theme,
AppLocalizations l10n,
) {
final tokens = context.pluriTokens;
return Padding(
padding: const EdgeInsets.all(16),
child: PluriGlassSurface(
padding: const EdgeInsets.all(12),
child: Row(
children: [
Icon(Icons.wifi_off, color: theme.colorScheme.error),
const SizedBox(width: 8),
Expanded(child: Text(error)),
TextButton(
onPressed: () => context.read<EstadoRadio>().cargarPopulares(),
child: Text(l10n.retryAction),
),
],
padding: const EdgeInsets.symmetric(horizontal: 16),
child: DecoratedBox(
key: const ValueKey('offline-banner'),
decoration: BoxDecoration(
color: tokens.offlineAccent.withValues(alpha: 0.14),
borderRadius: BorderRadius.circular(16),
border: Border.all(
color: tokens.offlineAccent.withValues(alpha: 0.4),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 13),
child: Row(
children: [
Icon(Icons.wifi_off, size: 22, color: tokens.offlineAccent),
const SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
l10n.offlineBannerTitle,
style: const TextStyle(
fontSize: 13.5,
fontWeight: FontWeight.w800,
),
),
Text(
error,
style: TextStyle(
fontSize: 11.5,
color: theme.colorScheme.onSurface.withValues(
alpha: 0.65,
),
),
),
],
),
),
const SizedBox(width: 8),
TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.white.withValues(alpha: 0.1),
foregroundColor: theme.colorScheme.onSurface,
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 7,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
textStyle: const TextStyle(
fontSize: 12,
fontWeight: FontWeight.w800,
),
),
onPressed: () => context.read<EstadoRadio>().cargarPopulares(),
child: Text(l10n.retryAction),
),
],
),
),
),
);