From a50a108f63b8492d40e181521365c22698b0af04 Mon Sep 17 00:00:00 2001 From: nk Date: Wed, 3 Jun 2026 11:15:29 +0300 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D1=87?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20=D1=82=D0=B0=D0=B1-=D0=B1=D0=B0=D1=80,=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE=D0=BA=20=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=D1=86=D0=B8=D0=B9,=20=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BD=D1=8B=D0=B5=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B5=D0=B5=D1=80=D0=B0,=20=D1=80=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=87=D0=B0=D1=8F=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D1=82=D0=B5=D0=BA=D1=81=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - таб-бар только иконки (6 разделов не помещались с подписями) - «Откройте радио» -> «Выберите радиостанцию» - кнопки плеера (лайк/prev/next/запись) единого размера 24/48, ряд SpaceBetween (кнопка записи больше не обрезается и не выбивается размером) - текст песни: Musixmatch резал соединение -> веб-поиск трека (открывается) --- .../data/repository/LyricsRepositoryImpl.kt | 7 +++++-- .../com/radiola/ui/navigation/BottomNavBar.kt | 20 +++---------------- .../radiola/ui/player/PlayerBottomSheet.kt | 15 +++++++------- .../com/radiola/ui/stations/StationsScreen.kt | 4 ++-- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/app/src/main/java/com/radiola/data/repository/LyricsRepositoryImpl.kt b/app/src/main/java/com/radiola/data/repository/LyricsRepositoryImpl.kt index 37de334..6810960 100644 --- a/app/src/main/java/com/radiola/data/repository/LyricsRepositoryImpl.kt +++ b/app/src/main/java/com/radiola/data/repository/LyricsRepositoryImpl.kt @@ -12,8 +12,11 @@ import javax.inject.Singleton class LyricsRepositoryImpl @Inject constructor() : LyricsRepository { override fun providerUrl(artist: String, song: String): String { - val query = URLEncoder.encode("$artist $song", "UTF-8") - return "https://www.musixmatch.com/search/$query" + // Musixmatch блокирует прямые переходы (connection reset). Открываем + // веб-поиск по треку — пользователь сам выбирает сервис с текстом. + // Сам текст не встраиваем и не храним (авторское право). + val query = URLEncoder.encode("$artist $song текст песни", "UTF-8") + return "https://yandex.ru/search/?text=$query" } // TODO: подключить официальный Musixmatch API (с атрибуцией) и вернуть реальный сниппет. diff --git a/app/src/main/java/com/radiola/ui/navigation/BottomNavBar.kt b/app/src/main/java/com/radiola/ui/navigation/BottomNavBar.kt index 42dcfd2..4f9db3d 100644 --- a/app/src/main/java/com/radiola/ui/navigation/BottomNavBar.kt +++ b/app/src/main/java/com/radiola/ui/navigation/BottomNavBar.kt @@ -66,7 +66,7 @@ fun BottomNavBar(navController: NavController) { label = destination.labelRes, icon = destination.icon, selected = selected, - modifier = Modifier.weight(if (selected) 1.9f else 1f), + modifier = Modifier.weight(1f), onClick = { if (currentRoute != destination.route) { navController.navigate(destination.route) { @@ -114,26 +114,12 @@ private fun PillTab( horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically ) { + // Только иконки — подписи не помещались для 6 разделов. Icon( imageVector = icon, contentDescription = label, tint = content, - modifier = Modifier.height(18.dp).width(18.dp) + modifier = Modifier.height(22.dp).width(22.dp) ) - AnimatedVisibility( - visible = selected, - enter = fadeIn(tween(Motion.Medium)) + expandHorizontally(tween(Motion.Medium)), - exit = fadeOut(tween(Motion.Fast)) + shrinkHorizontally(tween(Motion.Fast)) - ) { - Row(verticalAlignment = Alignment.CenterVertically) { - Spacer(Modifier.width(8.dp)) - Text( - text = label.uppercase(), - color = content, - style = androidx.compose.material3.MaterialTheme.typography.labelSmall, - maxLines = 1 - ) - } - } } } diff --git a/app/src/main/java/com/radiola/ui/player/PlayerBottomSheet.kt b/app/src/main/java/com/radiola/ui/player/PlayerBottomSheet.kt index a345287..959eb01 100644 --- a/app/src/main/java/com/radiola/ui/player/PlayerBottomSheet.kt +++ b/app/src/main/java/com/radiola/ui/player/PlayerBottomSheet.kt @@ -157,7 +157,8 @@ fun PlayerBottomSheet( // Управление воспроизведением Row( - horizontalArrangement = Arrangement.spacedBy(24.dp), + modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp), + horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { // Кнопка избранного @@ -166,15 +167,15 @@ fun PlayerBottomSheet( animationSpec = tween(Motion.Medium), label = "heartTint" ) - PlayerIconBtn(size = 44.dp) { + PlayerIconBtn(size = 48.dp) { IconButton( onClick = { haptics.performHapticFeedback(HapticFeedbackType.LongPress) onToggleFavorite() }, - modifier = Modifier.size(44.dp) + modifier = Modifier.size(48.dp) ) { - Icon(Lucide.Heart, "Избранное", tint = heartTint, modifier = Modifier.size(22.dp)) + Icon(Lucide.Heart, "Избранное", tint = heartTint, modifier = Modifier.size(24.dp)) } } @@ -226,8 +227,8 @@ fun PlayerBottomSheet( animationSpec = tween(Motion.Medium), label = "recordTint" ) - PlayerIconBtn(size = 44.dp) { - IconButton(onClick = onToggleRecording, modifier = Modifier.size(44.dp)) { + PlayerIconBtn(size = 48.dp) { + IconButton(onClick = onToggleRecording, modifier = Modifier.size(48.dp)) { Crossfade( targetState = isRecording, animationSpec = tween(Motion.Fast), @@ -237,7 +238,7 @@ fun PlayerBottomSheet( imageVector = if (recording) Lucide.MicOff else Lucide.Mic, contentDescription = if (recording) "Остановить запись" else "Запись", tint = recordTint, - modifier = Modifier.size(20.dp) + modifier = Modifier.size(24.dp) ) } } diff --git a/app/src/main/java/com/radiola/ui/stations/StationsScreen.kt b/app/src/main/java/com/radiola/ui/stations/StationsScreen.kt index b20dee4..0810670 100644 --- a/app/src/main/java/com/radiola/ui/stations/StationsScreen.kt +++ b/app/src/main/java/com/radiola/ui/stations/StationsScreen.kt @@ -40,8 +40,8 @@ fun StationsScreen( // Двухцветный заголовок экрана Text( text = buildAnnotatedString { - withStyle(SpanStyle(color = colors.textPrimary)) { append("Откройте ") } - withStyle(SpanStyle(color = colors.accent)) { append("радио") } + withStyle(SpanStyle(color = colors.textPrimary)) { append("Выберите ") } + withStyle(SpanStyle(color = colors.accent)) { append("радиостанцию") } }, style = MaterialTheme.typography.headlineLarge, modifier = Modifier.padding(start = 20.dp, end = 20.dp, top = 20.dp, bottom = 16.dp)