diff --git a/.claude/settings.local.json b/.claude/settings.local.json
new file mode 100644
index 0000000..6c55924
--- /dev/null
+++ b/.claude/settings.local.json
@@ -0,0 +1,10 @@
+{
+ "permissions": {
+ "allow": [
+ "Bash(git add:*)",
+ "Bash(git commit:*)",
+ "Bash(xargs grep:*)",
+ "Bash(ls:*)"
+ ]
+ }
+}
diff --git a/app/src/main/java/com/freeturn/app/ui/screens/HomeScreen.kt b/app/src/main/java/com/freeturn/app/ui/screens/HomeScreen.kt
index 8b4356e..b1c1270 100644
--- a/app/src/main/java/com/freeturn/app/ui/screens/HomeScreen.kt
+++ b/app/src/main/java/com/freeturn/app/ui/screens/HomeScreen.kt
@@ -40,7 +40,7 @@ import androidx.compose.material3.CircularWavyProgressIndicator
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
-import androidx.compose.material3.LinearProgressIndicator
+import androidx.compose.material3.LinearWavyProgressIndicator
import androidx.compose.material3.ListItem
import androidx.compose.material3.ListItemColors
import androidx.compose.material3.ListItemDefaults
@@ -78,7 +78,6 @@ import androidx.compose.ui.draw.scale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.text.style.TextAlign
-import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -358,7 +357,7 @@ private fun UpdateDialogs(viewModel: MainViewModel) {
Column {
Text(stringResource(R.string.update_downloading, state.progress))
Spacer(Modifier.height(12.dp))
- LinearProgressIndicator(
+ LinearWavyProgressIndicator(
progress = { state.progress / 100f },
modifier = Modifier.fillMaxWidth()
)
@@ -672,97 +671,54 @@ private fun UpdateListItem(
onDownload: () -> Unit,
onInstall: () -> Unit
) {
- when (state) {
- is UpdateState.Idle -> {
- ListItem(
- headlineContent = { Text(stringResource(R.string.update_check)) },
- colors = colors,
- modifier = Modifier.clickable(onClick = onCheck)
- )
- }
+ val supportingText = when (state) {
+ is UpdateState.Idle -> stringResource(R.string.update_tap_to_check)
+ is UpdateState.Checking -> stringResource(R.string.update_checking)
+ is UpdateState.Available -> stringResource(R.string.update_available, state.version)
+ is UpdateState.Downloading -> stringResource(R.string.update_downloading, state.progress)
+ is UpdateState.ReadyToInstall -> stringResource(R.string.update_ready_desc_short)
+ is UpdateState.NoUpdate -> stringResource(R.string.update_no_update)
+ is UpdateState.Error -> stringResource(R.string.update_error, state.message)
+ }
- is UpdateState.Checking -> {
- ListItem(
- headlineContent = { Text(stringResource(R.string.update_checking)) },
- colors = colors
- )
- }
-
- is UpdateState.Available -> {
- ListItem(
- headlineContent = {
- Text(stringResource(R.string.update_available, state.version))
- },
- supportingContent = if (state.changelog.isNotEmpty()) {
- {
- Text(
- state.changelog,
- style = MaterialTheme.typography.bodySmall,
- color = MaterialTheme.colorScheme.onSurfaceVariant,
- maxLines = 3,
- overflow = TextOverflow.Ellipsis
- )
- }
- } else null,
- colors = colors,
- trailingContent = {
- TextButton(onClick = onDownload) {
- Text(stringResource(R.string.update_download))
- }
- }
- )
- }
-
- is UpdateState.Downloading -> {
- ListItem(
- headlineContent = {
- Text(stringResource(R.string.update_downloading, state.progress))
- },
- supportingContent = {
- LinearProgressIndicator(
+ ListItem(
+ headlineContent = {
+ Text(stringResource(R.string.update_title), style = MaterialTheme.typography.titleSmall)
+ },
+ supportingContent = {
+ Column {
+ Text(
+ supportingText,
+ color = if (state is UpdateState.Error) MaterialTheme.colorScheme.error
+ else MaterialTheme.colorScheme.onSurfaceVariant
+ )
+ if (state is UpdateState.Downloading) {
+ LinearWavyProgressIndicator(
progress = { state.progress / 100f },
modifier = Modifier
.fillMaxWidth()
.padding(top = 8.dp)
)
- },
- colors = colors
- )
- }
-
- is UpdateState.ReadyToInstall -> {
- ListItem(
- headlineContent = { Text(stringResource(R.string.update_ready_title)) },
- colors = colors,
- trailingContent = {
- TextButton(onClick = onInstall) {
- Text(stringResource(R.string.update_install))
- }
}
- )
- }
-
- is UpdateState.NoUpdate -> {
- ListItem(
- headlineContent = { Text(stringResource(R.string.update_no_update)) },
- colors = colors,
- modifier = Modifier.clickable(onClick = onCheck)
- )
- }
-
- is UpdateState.Error -> {
- ListItem(
- headlineContent = {
- Text(
- stringResource(R.string.update_error, state.message),
- color = MaterialTheme.colorScheme.error
- )
- },
- colors = colors,
- modifier = Modifier.clickable(onClick = onCheck)
- )
- }
- }
+ }
+ },
+ trailingContent = {
+ when (state) {
+ is UpdateState.Available -> TextButton(onClick = onDownload) {
+ Text(stringResource(R.string.update_download))
+ }
+ is UpdateState.ReadyToInstall -> TextButton(onClick = onInstall) {
+ Text(stringResource(R.string.update_install))
+ }
+ is UpdateState.Idle, is UpdateState.NoUpdate, is UpdateState.Error ->
+ TextButton(onClick = onCheck) {
+ Text(stringResource(R.string.update_check))
+ }
+ else -> {}
+ }
+ },
+ colors = colors
+ )
}
// ── Общие компоненты ──────────────────────────────────────────────────────
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4e497d4..4ea494d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -122,7 +122,9 @@
Пропустить настройки
- Проверить обновления
+ Обновление
+ Проверить
+ Нажмите для проверки
Проверка…
Доступно обновление
Доступна версия %1$s
@@ -131,6 +133,7 @@
Загрузка: %1$d%%
Обновление загружено
APK готов к установке. Установить сейчас?
+ Готово к установке
Установить
Установлена последняя версия
Ошибка: %1$s
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
new file mode 100644
index 0000000..cf4ff3c
--- /dev/null
+++ b/docs/CHANGELOG.md
@@ -0,0 +1,33 @@
+# Changelog
+
+## v1.3.0
+
+### Что нового
+
+**Приватный режим**
+При включении скрывает IP-адрес сервера, VK-ссылку и порты на экране настроек — поля заменяются звёздочками. Удобно для скриншотов и демонстрации экрана без раскрытия конфигурации.
+
+**Кастомное ядро — улучшенный интерфейс**
+Карточка загрузки собственного ядра полностью переработана: теперь файл проверяется на корректность ELF-формата перед использованием. Если файл не подходит — сразу видна понятная ошибка прямо в карточке, без скрытых сбоев.
+
+**Обновлённое ядро**
+Встроенное ядро обновлено (сборка от cacggghp). Размер уменьшился с 9.5 МБ до 8.8 МБ.
+
+### Улучшения интерфейса
+
+- Переключатель TCP/UDP заменён на `SegmentedButton` — стало нагляднее и удобнее
+- На главном экране в карточке настроек теперь отображается текущий транспорт (TCP/UDP)
+- Поле VK-ссылки стало однострочным — без лишнего пространства
+- Поле порта принимает только цифры
+- Терминология SSH: «подключено» → «сопряжено» — точнее отражает состояние соединения
+
+### Исправления
+
+- Слайдер потоков больше не обрезает значения из-за ошибки округления (`roundToInt` вместо `toInt`)
+- Исправлено условие показа онбординг-экрана при первом запуске
+- Устранена лишняя вибрация на splash-экране
+- Устранена утечка coroutine scope в ProxyService
+
+### Безопасность
+
+- Закрыта возможность shell-инъекции через параметры `listen`/`connect` при управлении сервером