refactor: SSH "подключено" → "сопряжено", вынос строк из ViewModel в strings.xml
- SSH не держит постоянного соединения — каждая команда открывает сессию, выполняет echo/скрипт и закрывает её. Слово «подключено» вводило пользователя в заблуждение, намекая на живой сокет.
This commit is contained in:
1 parent
cddf728c9f
commit
c6ec690582
4 files changed
+10
-10
No files matched your search
@@ -391,7 +391,7 @@ private fun InfoBottomSheet(
|
||||
is SshConnectionState.Connected ->
|
||||
stringResource(R.string.connected_format, (sshState as SshConnectionState.Connected).ip)
|
||||
is SshConnectionState.Connecting ->
|
||||
(sshState as SshConnectionState.Connecting).step
|
||||
stringResource(R.string.ssh_connecting)
|
||||
is SshConnectionState.Error ->
|
||||
stringResource(R.string.error_format_short, (sshState as SshConnectionState.Error).message)
|
||||
else -> stringResource(R.string.not_connected)
|
||||
|
||||
@@ -142,7 +142,7 @@ fun SshSetupScreen(
|
||||
)
|
||||
} else {
|
||||
Spacer(Modifier.height(32.dp))
|
||||
ConnectionProgressCard(step = (sshState as SshConnectionState.Connecting).step)
|
||||
ConnectionProgressCard(step = stringResource(R.string.ssh_connecting))
|
||||
}
|
||||
|
||||
Spacer(Modifier.height(24.dp))
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.freeturn.app.viewmodel
|
||||
// ── SSH connection states ──────────────────────────────────────────────────
|
||||
sealed class SshConnectionState {
|
||||
object Disconnected : SshConnectionState()
|
||||
data class Connecting(val step: String = "Подключение к серверу...") : SshConnectionState()
|
||||
object Connecting : SshConnectionState()
|
||||
data class Connected(val ip: String) : SshConnectionState()
|
||||
data class Error(val message: String) : SshConnectionState()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user