fix: соответствие m3

This commit is contained in:
samosvalishe committed 2026-04-22 03:15:46 +03:00
1 parent fd3cb4fb07
commit 341de55e10
6 files changed
+29 -5

No files matched your search

@@ -28,9 +28,11 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.viewinterop.AndroidView import androidx.compose.ui.viewinterop.AndroidView
import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties import androidx.compose.ui.window.DialogProperties
import com.freeturn.app.R
@SuppressLint("SetJavaScriptEnabled") @SuppressLint("SetJavaScriptEnabled")
@Composable @Composable
@@ -54,11 +56,11 @@ fun CaptchaWebViewDialog(
title = { title = {
Column { Column {
Text( Text(
"Проверка VK", stringResource(R.string.captcha_title),
style = MaterialTheme.typography.titleMedium style = MaterialTheme.typography.titleMedium
) )
Text( Text(
"Пройдите проверку для продолжения", stringResource(R.string.captcha_subtitle),
style = MaterialTheme.typography.bodySmall, style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant color = MaterialTheme.colorScheme.onSurfaceVariant
) )
@@ -66,7 +68,7 @@ fun CaptchaWebViewDialog(
}, },
actions = { actions = {
TextButton(onClick = onDismiss) { TextButton(onClick = onDismiss) {
Text("Закрыть") Text(stringResource(R.string.captcha_close))
} }
} }
) )
@@ -75,6 +75,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.scale import androidx.compose.ui.draw.scale
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
@@ -419,6 +421,12 @@ private fun UpdateDialogs(viewModel: MainViewModel) {
@Composable @Composable
private fun ProxyToggleButton(state: ProxyState, onClick: () -> Unit) { private fun ProxyToggleButton(state: ProxyState, onClick: () -> Unit) {
val extended = MaterialTheme.extendedColorScheme val extended = MaterialTheme.extendedColorScheme
val buttonLabel = when (state) {
is ProxyState.Starting, is ProxyState.Connecting -> stringResource(R.string.proxy_connecting)
is ProxyState.Running -> stringResource(R.string.proxy_active_stop)
is ProxyState.Error -> stringResource(R.string.proxy_error_restart)
else -> stringResource(R.string.start_proxy)
}
val containerColor by animateColorAsState( val containerColor by animateColorAsState(
targetValue = when (state) { targetValue = when (state) {
is ProxyState.Running -> extended.successContainer is ProxyState.Running -> extended.successContainer
@@ -452,7 +460,8 @@ private fun ProxyToggleButton(state: ProxyState, onClick: () -> Unit) {
modifier = Modifier modifier = Modifier
.size(148.dp) .size(148.dp)
.scale(scale) .scale(scale)
.clip(CircleShape), .clip(CircleShape)
.semantics { contentDescription = buttonLabel },
shape = CircleShape, shape = CircleShape,
color = containerColor, color = containerColor,
tonalElevation = if (state is ProxyState.Running) 6.dp else 1.dp tonalElevation = if (state is ProxyState.Running) 6.dp else 1.dp
@@ -243,7 +243,7 @@ private fun FormSection(
}) { }) {
Icon( Icon(
painterResource(if (showPassword) R.drawable.visibility_off_24px else R.drawable.visibility_24px), painterResource(if (showPassword) R.drawable.visibility_off_24px else R.drawable.visibility_24px),
contentDescription = null contentDescription = if (showPassword) stringResource(R.string.hide_password) else stringResource(R.string.show_password)
) )
} }
}, },
@@ -0,0 +1,5 @@
package com.freeturn.app.ui.theme
import androidx.compose.material3.Shapes
val AppShapes = Shapes()
@@ -122,6 +122,7 @@ fun FreeTurnTheme(
MaterialTheme( MaterialTheme(
colorScheme = colorScheme, colorScheme = colorScheme,
typography = Typography, typography = Typography,
shapes = AppShapes,
content = content content = content
) )
} }
+7
View File
@@ -102,6 +102,8 @@
<string name="paired">Сопряжено</string> <string name="paired">Сопряжено</string>
<!-- SshSetupScreen --> <!-- SshSetupScreen -->
<string name="show_password">Показать пароль</string>
<string name="hide_password">Скрыть пароль</string>
<string name="connect_to_server">Сопряжение с сервером</string> <string name="connect_to_server">Сопряжение с сервером</string>
<string name="back">Назад</string> <string name="back">Назад</string>
<string name="server_data">Данные сервера</string> <string name="server_data">Данные сервера</string>
@@ -151,6 +153,11 @@
<string name="privacy_mode_title">Приватный режим</string> <string name="privacy_mode_title">Приватный режим</string>
<string name="privacy_mode_desc">Скрывает IP и порты</string> <string name="privacy_mode_desc">Скрывает IP и порты</string>
<!-- CaptchaWebViewDialog -->
<string name="captcha_title">Проверка VK</string>
<string name="captcha_subtitle">Пройдите проверку для продолжения</string>
<string name="captcha_close">Закрыть</string>
<!-- Telegram --> <!-- Telegram -->
<string name="tg_channel">Telegram-канал</string> <string name="tg_channel">Telegram-канал</string>
<string name="tg_channel_subtitle">@vkturnproxy</string> <string name="tg_channel_subtitle">@vkturnproxy</string>