feat: new design
This commit is contained in:
1 parent
3e93e5337c
commit
3f279b25eb
28 files changed
+416
-306
No files matched your search
@@ -2,7 +2,8 @@
|
|||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(./gradlew assembleDebug)",
|
"Bash(./gradlew assembleDebug)",
|
||||||
"Bash(JAVA_HOME=\"/c/Program Files/Android/Android Studio/jbr\" ./gradlew assembleDebug)"
|
"Bash(JAVA_HOME=\"/c/Program Files/Android/Android Studio/jbr\" ./gradlew assembleDebug)",
|
||||||
|
"Bash(xargs sed:*)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# VK TURN Proxy Android
|
# FREETURN Proxy Android
|
||||||
|
|
||||||
Android-приложение на основе [vk-turn-proxy](https://github.com/cacggghp/vk-turn-proxy).
|
Android-приложение на основе [vk-turn-proxy](https://github.com/cacggghp/vk-turn-proxy).
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -1,17 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
|
||||||
alias(libs.plugins.kotlin.compose)
|
alias(libs.plugins.kotlin.compose)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.vkturn.proxy"
|
namespace = "com.freeturn.app"
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.vkturn.proxy"
|
applicationId = "com.freeturn.app"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 36
|
||||||
versionCode = 3
|
versionCode = 3
|
||||||
versionName = "2.0.0"
|
versionName = "2.0.0"
|
||||||
|
|
||||||
@@ -46,14 +45,18 @@ android {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
compileSdkMinor = 1
|
||||||
jvmTarget = "11"
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
compilerOptions {
|
||||||
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.github.mwiede:jsch:0.2.17")
|
implementation("com.github.mwiede:jsch:2.27.9")
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
||||||
|
|
||||||
implementation(libs.androidx.core.ktx)
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation(libs.androidx.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package com.vkturn.proxy
|
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
import org.junit.runner.RunWith
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instrumented test, which will execute on an Android device.
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
@RunWith(AndroidJUnit4::class)
|
|
||||||
class ExampleInstrumentedTest {
|
|
||||||
@Test
|
|
||||||
fun useAppContext() {
|
|
||||||
// Context of the app under test.
|
|
||||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
|
||||||
assertEquals("com.vkturn.proxy", appContext.packageName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,10 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission
|
||||||
|
android:name="android.permission.FOREGROUND_SERVICE"
|
||||||
|
tools:ignore="ForegroundServicesPolicy"
|
||||||
|
/>
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
@@ -14,10 +17,10 @@
|
|||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
android:fullBackupContent="@xml/backup_rules"
|
android:fullBackupContent="@xml/backup_rules"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="VK TURN Proxy"
|
android:label="FreeTurn"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.VkTurnProxy"
|
android:theme="@style/Theme.FreeTurn"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
@@ -33,7 +36,8 @@
|
|||||||
<service
|
<service
|
||||||
android:name=".ProxyService"
|
android:name=".ProxyService"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:foregroundServiceType="specialUse" />
|
android:foregroundServiceType="specialUse"
|
||||||
|
/>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
+9
-5
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy
|
package com.freeturn.app
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
@@ -6,6 +6,7 @@ import android.os.Build
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
|
import androidx.activity.enableEdgeToEdge
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
@@ -13,9 +14,9 @@ import androidx.compose.material3.MaterialTheme
|
|||||||
import androidx.compose.material3.Surface
|
import androidx.compose.material3.Surface
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import com.vkturn.proxy.ui.navigation.AppNavigation
|
import com.freeturn.app.ui.navigation.AppNavigation
|
||||||
import com.vkturn.proxy.ui.theme.VkTurnProxyTheme
|
import com.freeturn.app.ui.theme.FreeTurnTheme
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
|
|
||||||
@@ -27,10 +28,13 @@ class MainActivity : ComponentActivity() {
|
|||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
// Включаем отображение от края до края (Edge-to-Edge)
|
||||||
|
enableEdgeToEdge()
|
||||||
|
|
||||||
requestNotificationPermissionIfNeeded()
|
requestNotificationPermissionIfNeeded()
|
||||||
|
|
||||||
setContent {
|
setContent {
|
||||||
VkTurnProxyTheme {
|
FreeTurnTheme {
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
color = MaterialTheme.colorScheme.background
|
color = MaterialTheme.colorScheme.background
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy
|
package com.freeturn.app
|
||||||
|
|
||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy
|
package com.freeturn.app
|
||||||
|
|
||||||
import com.jcraft.jsch.ChannelExec
|
import com.jcraft.jsch.ChannelExec
|
||||||
import com.jcraft.jsch.ChannelShell
|
import com.jcraft.jsch.ChannelShell
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy.data
|
package com.freeturn.app.data
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.datastore.core.DataStore
|
import androidx.datastore.core.DataStore
|
||||||
@@ -0,0 +1,264 @@
|
|||||||
|
package com.freeturn.app.ui.navigation
|
||||||
|
|
||||||
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
|
import androidx.compose.animation.slideInVertically
|
||||||
|
import androidx.compose.animation.slideOutVertically
|
||||||
|
import androidx.compose.foundation.clickable
|
||||||
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.Row
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBarsPadding
|
||||||
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material.icons.Icons
|
||||||
|
import androidx.compose.material.icons.filled.Home
|
||||||
|
import androidx.compose.material.icons.filled.PhoneAndroid
|
||||||
|
import androidx.compose.material.icons.filled.Storage
|
||||||
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.material3.Scaffold
|
||||||
|
import androidx.compose.material3.Surface
|
||||||
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.getValue
|
||||||
|
import androidx.compose.runtime.remember
|
||||||
|
import androidx.compose.ui.Alignment
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.draw.clip
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import androidx.compose.ui.graphics.vector.ImageVector
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
|
import androidx.navigation.compose.NavHost
|
||||||
|
import androidx.navigation.compose.composable
|
||||||
|
import androidx.navigation.compose.currentBackStackEntryAsState
|
||||||
|
import androidx.navigation.compose.rememberNavController
|
||||||
|
import com.freeturn.app.ui.screens.ClientSetupScreen
|
||||||
|
import com.freeturn.app.ui.screens.HomeScreen
|
||||||
|
import com.freeturn.app.ui.screens.OnboardingScreen
|
||||||
|
import com.freeturn.app.ui.screens.ServerManagementScreen
|
||||||
|
import com.freeturn.app.ui.screens.SshSetupScreen
|
||||||
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
|
|
||||||
|
object Routes {
|
||||||
|
const val ONBOARDING = "onboarding"
|
||||||
|
const val SSH_SETUP = "ssh_setup"
|
||||||
|
const val SERVER_MANAGEMENT = "server_management"
|
||||||
|
const val CLIENT_SETUP = "client_setup"
|
||||||
|
const val HOME = "home"
|
||||||
|
}
|
||||||
|
|
||||||
|
private val BOTTOM_NAV_ROUTES = setOf(Routes.HOME, Routes.SERVER_MANAGEMENT, Routes.CLIENT_SETUP)
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun AppNavigation(viewModel: MainViewModel) {
|
||||||
|
val isInitialized by viewModel.isInitialized.collectAsStateWithLifecycle()
|
||||||
|
val onboardingDone by viewModel.onboardingDone.collectAsStateWithLifecycle()
|
||||||
|
|
||||||
|
if (!isInitialized) {
|
||||||
|
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
||||||
|
CircularProgressIndicator()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
val startDestination = remember { if (onboardingDone) Routes.HOME else Routes.ONBOARDING }
|
||||||
|
val navController = rememberNavController()
|
||||||
|
val backStackEntry by navController.currentBackStackEntryAsState()
|
||||||
|
val currentRoute = backStackEntry?.destination?.route
|
||||||
|
val showBottomBar = currentRoute in BOTTOM_NAV_ROUTES
|
||||||
|
|
||||||
|
Scaffold(
|
||||||
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
bottomBar = {
|
||||||
|
AnimatedVisibility(
|
||||||
|
visible = showBottomBar,
|
||||||
|
enter = slideInVertically(initialOffsetY = { it }),
|
||||||
|
exit = slideOutVertically(targetOffsetY = { it })
|
||||||
|
) {
|
||||||
|
FloatingNavBar(
|
||||||
|
currentRoute = currentRoute,
|
||||||
|
onNavigate = { route ->
|
||||||
|
navController.navigate(route) {
|
||||||
|
popUpTo(Routes.HOME) { saveState = true; inclusive = false }
|
||||||
|
launchSingleTop = true
|
||||||
|
restoreState = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
contentWindowInsets = WindowInsets(0, 0, 0, 0) // Мы обрабатываем отступы вручную или через контент
|
||||||
|
) { innerPadding ->
|
||||||
|
// innerPadding содержит отступы для BottomBar.
|
||||||
|
// Если BottomBar "парящий", мы можем игнорировать или использовать часть отступа.
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.padding(bottom = if (showBottomBar) innerPadding.calculateBottomPadding() else 0.dp)
|
||||||
|
) {
|
||||||
|
NavHost(
|
||||||
|
navController = navController,
|
||||||
|
startDestination = startDestination,
|
||||||
|
modifier = Modifier.statusBarsPadding() // Добавляем отступ для статус-бара сверху
|
||||||
|
) {
|
||||||
|
|
||||||
|
composable(Routes.ONBOARDING) {
|
||||||
|
OnboardingScreen(
|
||||||
|
onSetupServer = { navController.navigate(Routes.SSH_SETUP) },
|
||||||
|
onSkip = { navController.navigate(Routes.HOME) }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composable(Routes.SSH_SETUP) {
|
||||||
|
SshSetupScreen(
|
||||||
|
viewModel = viewModel,
|
||||||
|
onConnected = {
|
||||||
|
navController.navigate(Routes.SERVER_MANAGEMENT) {
|
||||||
|
launchSingleTop = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onBack = { navController.popBackStack() }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composable(Routes.SERVER_MANAGEMENT) {
|
||||||
|
ServerManagementScreen(
|
||||||
|
viewModel = viewModel,
|
||||||
|
onContinue = {
|
||||||
|
navController.navigate(Routes.CLIENT_SETUP) {
|
||||||
|
launchSingleTop = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composable(Routes.CLIENT_SETUP + "_onboarding") {
|
||||||
|
ClientSetupScreen(
|
||||||
|
viewModel = viewModel,
|
||||||
|
showFinishButton = true,
|
||||||
|
onFinish = {
|
||||||
|
viewModel.setOnboardingDone()
|
||||||
|
navController.navigate(Routes.HOME) {
|
||||||
|
popUpTo(Routes.ONBOARDING) { inclusive = true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composable(Routes.CLIENT_SETUP) {
|
||||||
|
ClientSetupScreen(
|
||||||
|
viewModel = viewModel,
|
||||||
|
showFinishButton = false
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composable(Routes.HOME) {
|
||||||
|
HomeScreen(
|
||||||
|
viewModel = viewModel,
|
||||||
|
onNavigateToSshSetup = { navController.navigate(Routes.SSH_SETUP) }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun FloatingNavBar(
|
||||||
|
currentRoute: String?,
|
||||||
|
onNavigate: (String) -> Unit,
|
||||||
|
modifier: Modifier = Modifier
|
||||||
|
) {
|
||||||
|
Surface(
|
||||||
|
modifier = modifier,
|
||||||
|
shape = RoundedCornerShape(28.dp),
|
||||||
|
tonalElevation = 8.dp,
|
||||||
|
shadowElevation = 12.dp
|
||||||
|
) {
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = 8.dp, vertical = 8.dp),
|
||||||
|
horizontalArrangement = Arrangement.SpaceEvenly
|
||||||
|
) {
|
||||||
|
FloatingNavItem(
|
||||||
|
route = Routes.HOME,
|
||||||
|
icon = Icons.Filled.Home,
|
||||||
|
label = "Главная",
|
||||||
|
currentRoute = currentRoute,
|
||||||
|
onNavigate = onNavigate
|
||||||
|
)
|
||||||
|
FloatingNavItem(
|
||||||
|
route = Routes.SERVER_MANAGEMENT,
|
||||||
|
icon = Icons.Filled.Storage,
|
||||||
|
label = "Сервер",
|
||||||
|
currentRoute = currentRoute,
|
||||||
|
onNavigate = onNavigate
|
||||||
|
)
|
||||||
|
FloatingNavItem(
|
||||||
|
route = Routes.CLIENT_SETUP,
|
||||||
|
icon = Icons.Filled.PhoneAndroid,
|
||||||
|
label = "Клиент",
|
||||||
|
currentRoute = currentRoute,
|
||||||
|
onNavigate = onNavigate
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun FloatingNavItem(
|
||||||
|
route: String,
|
||||||
|
icon: ImageVector,
|
||||||
|
label: String,
|
||||||
|
currentRoute: String?,
|
||||||
|
onNavigate: (String) -> Unit
|
||||||
|
) {
|
||||||
|
val selected = currentRoute == route
|
||||||
|
Column(
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
|
modifier = Modifier
|
||||||
|
.clip(RoundedCornerShape(20.dp))
|
||||||
|
.clickable { onNavigate(route) }
|
||||||
|
.padding(horizontal = 20.dp, vertical = 6.dp)
|
||||||
|
) {
|
||||||
|
Surface(
|
||||||
|
shape = RoundedCornerShape(50),
|
||||||
|
color = if (selected) MaterialTheme.colorScheme.secondaryContainer
|
||||||
|
else Color.Transparent,
|
||||||
|
modifier = Modifier
|
||||||
|
.width(56.dp)
|
||||||
|
.height(28.dp)
|
||||||
|
) {
|
||||||
|
Box(contentAlignment = Alignment.Center) {
|
||||||
|
Icon(
|
||||||
|
imageVector = icon,
|
||||||
|
contentDescription = label,
|
||||||
|
modifier = Modifier.size(20.dp),
|
||||||
|
tint = if (selected) MaterialTheme.colorScheme.onSecondaryContainer
|
||||||
|
else MaterialTheme.colorScheme.onSurface.copy(alpha = 0.55f)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Spacer(Modifier.height(3.dp))
|
||||||
|
Text(
|
||||||
|
text = label,
|
||||||
|
style = MaterialTheme.typography.labelSmall,
|
||||||
|
color = if (selected) MaterialTheme.colorScheme.secondary
|
||||||
|
else MaterialTheme.colorScheme.onSurface.copy(alpha = 0.55f)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
+38
-41
@@ -1,6 +1,6 @@
|
|||||||
@file:OptIn(androidx.compose.material3.ExperimentalMaterial3Api::class)
|
@file:OptIn(androidx.compose.material3.ExperimentalMaterial3Api::class)
|
||||||
|
|
||||||
package com.vkturn.proxy.ui.screens
|
package com.freeturn.app.ui.screens
|
||||||
|
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
@@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.size
|
|||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
|
||||||
import androidx.compose.material.icons.filled.ExpandLess
|
import androidx.compose.material.icons.filled.ExpandLess
|
||||||
import androidx.compose.material.icons.filled.ExpandMore
|
import androidx.compose.material.icons.filled.ExpandMore
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
@@ -23,7 +22,6 @@ import androidx.compose.material3.Card
|
|||||||
import androidx.compose.material3.CardDefaults
|
import androidx.compose.material3.CardDefaults
|
||||||
import androidx.compose.material3.Divider
|
import androidx.compose.material3.Divider
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.OutlinedTextField
|
import androidx.compose.material3.OutlinedTextField
|
||||||
import androidx.compose.material3.Scaffold
|
import androidx.compose.material3.Scaffold
|
||||||
@@ -32,6 +30,7 @@ import androidx.compose.material3.Switch
|
|||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.material3.TopAppBar
|
import androidx.compose.material3.TopAppBar
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableFloatStateOf
|
import androidx.compose.runtime.mutableFloatStateOf
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
@@ -41,14 +40,20 @@ import androidx.compose.ui.Alignment
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import com.vkturn.proxy.data.ClientConfig
|
import com.freeturn.app.data.ClientConfig
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param showFinishButton true — онбординг-флоу, показываем кнопку «Завершить».
|
||||||
|
* false — вкладка, авто-сохранение без кнопки.
|
||||||
|
* @param onFinish вызывается после нажатия кнопки «Завершить» (только если showFinishButton=true).
|
||||||
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun ClientSetupScreen(
|
fun ClientSetupScreen(
|
||||||
viewModel: MainViewModel,
|
viewModel: MainViewModel,
|
||||||
onFinish: () -> Unit,
|
showFinishButton: Boolean = false,
|
||||||
onBack: () -> Unit
|
onFinish: (() -> Unit)? = null
|
||||||
) {
|
) {
|
||||||
val saved by viewModel.clientConfig.collectAsStateWithLifecycle()
|
val saved by viewModel.clientConfig.collectAsStateWithLifecycle()
|
||||||
|
|
||||||
@@ -60,16 +65,25 @@ fun ClientSetupScreen(
|
|||||||
var localPort by rememberSaveable(saved.localPort) { mutableStateOf(saved.localPort) }
|
var localPort by rememberSaveable(saved.localPort) { mutableStateOf(saved.localPort) }
|
||||||
var showAdvanced by rememberSaveable { mutableStateOf(false) }
|
var showAdvanced by rememberSaveable { mutableStateOf(false) }
|
||||||
|
|
||||||
|
// Авто-сохранение с дебаунсом 600 мс на каждое изменение поля.
|
||||||
|
// Работает в обоих режимах — и при онбординге, и как вкладка.
|
||||||
|
LaunchedEffect(serverAddress, vkLink, threads, useUdp, noDtls, localPort) {
|
||||||
|
delay(600)
|
||||||
|
viewModel.saveClientConfig(
|
||||||
|
ClientConfig(
|
||||||
|
serverAddress = serverAddress.trim(),
|
||||||
|
vkLink = vkLink.trim(),
|
||||||
|
threads = threads.toInt(),
|
||||||
|
useUdp = useUdp,
|
||||||
|
noDtls = noDtls,
|
||||||
|
localPort = localPort.trim()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(title = { Text("Клиент") })
|
||||||
title = { Text("Настройка клиента") },
|
|
||||||
navigationIcon = {
|
|
||||||
IconButton(onClick = onBack) {
|
|
||||||
Icon(Icons.Filled.ArrowBack, contentDescription = "Назад")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
) { padding ->
|
) { padding ->
|
||||||
Column(
|
Column(
|
||||||
@@ -82,7 +96,7 @@ fun ClientSetupScreen(
|
|||||||
) {
|
) {
|
||||||
Spacer(Modifier.height(4.dp))
|
Spacer(Modifier.height(4.dp))
|
||||||
|
|
||||||
// ── Сервер ───────────────────────────────────────────────────
|
// ── Подключение ───────────────────────────────────────────────
|
||||||
Text("Подключение", style = MaterialTheme.typography.titleMedium)
|
Text("Подключение", style = MaterialTheme.typography.titleMedium)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -92,9 +106,7 @@ fun ClientSetupScreen(
|
|||||||
placeholder = { Text("1.2.3.4:56000") },
|
placeholder = { Text("1.2.3.4:56000") },
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
supportingText = {
|
supportingText = { Text("IP и порт vk-turn-proxy на вашем VPS") }
|
||||||
Text("IP и порт, на котором запущен vk-turn-proxy на вашем VPS")
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
@@ -105,9 +117,7 @@ fun ClientSetupScreen(
|
|||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
minLines = 2,
|
minLines = 2,
|
||||||
maxLines = 4,
|
maxLines = 4,
|
||||||
supportingText = {
|
supportingText = { Text("VK: Звонки → Создать → Скопировать ссылку (не нажимайте «Завершить»)") }
|
||||||
Text("VK: Звонки → Создать → Скопировать ссылку (не нажимайте «Завершить»). Тип определяется автоматически.")
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
@@ -118,10 +128,9 @@ fun ClientSetupScreen(
|
|||||||
Column {
|
Column {
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.SpaceBetween,
|
|
||||||
modifier = Modifier.fillMaxWidth()
|
modifier = Modifier.fillMaxWidth()
|
||||||
) {
|
) {
|
||||||
Column {
|
Column(modifier = Modifier.weight(1f)) {
|
||||||
Text("Потоки: ${threads.toInt()}", style = MaterialTheme.typography.bodyMedium)
|
Text("Потоки: ${threads.toInt()}", style = MaterialTheme.typography.bodyMedium)
|
||||||
Text(
|
Text(
|
||||||
"Рекомендуется 4–8",
|
"Рекомендуется 4–8",
|
||||||
@@ -155,7 +164,7 @@ fun ClientSetupScreen(
|
|||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
// ── Дополнительно (сворачиваемый блок) ───────────────────────
|
// ── Дополнительно (сворачиваемый) ─────────────────────────────
|
||||||
Card(
|
Card(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
colors = CardDefaults.cardColors(
|
colors = CardDefaults.cardColors(
|
||||||
@@ -180,7 +189,6 @@ fun ClientSetupScreen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
AnimatedVisibility(visible = showAdvanced) {
|
AnimatedVisibility(visible = showAdvanced) {
|
||||||
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = localPort,
|
value = localPort,
|
||||||
onValueChange = { localPort = it },
|
onValueChange = { localPort = it },
|
||||||
@@ -193,24 +201,12 @@ fun ClientSetupScreen(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// Кнопка «Завершить» — только в онбординг-флоу
|
||||||
|
if (showFinishButton && onFinish != null) {
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = onFinish,
|
||||||
viewModel.saveClientConfig(
|
|
||||||
ClientConfig(
|
|
||||||
serverAddress = serverAddress.trim(),
|
|
||||||
vkLink = vkLink.trim(),
|
|
||||||
threads = threads.toInt(),
|
|
||||||
useUdp = useUdp,
|
|
||||||
noDtls = noDtls,
|
|
||||||
localPort = localPort.trim()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
onFinish()
|
|
||||||
},
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(56.dp),
|
.height(56.dp),
|
||||||
@@ -219,6 +215,7 @@ fun ClientSetupScreen(
|
|||||||
) {
|
) {
|
||||||
Text("Завершить настройку", style = MaterialTheme.typography.labelLarge)
|
Text("Завершить настройку", style = MaterialTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
Spacer(Modifier.height(24.dp))
|
||||||
}
|
}
|
||||||
+13
-42
@@ -3,7 +3,7 @@
|
|||||||
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
||||||
)
|
)
|
||||||
|
|
||||||
package com.vkturn.proxy.ui.screens
|
package com.freeturn.app.ui.screens
|
||||||
|
|
||||||
import androidx.compose.animation.animateColorAsState
|
import androidx.compose.animation.animateColorAsState
|
||||||
import androidx.compose.animation.core.Spring
|
import androidx.compose.animation.core.Spring
|
||||||
@@ -30,7 +30,6 @@ import androidx.compose.material.icons.filled.CheckCircle
|
|||||||
import androidx.compose.material.icons.filled.CloudDownload
|
import androidx.compose.material.icons.filled.CloudDownload
|
||||||
import androidx.compose.material.icons.filled.Error
|
import androidx.compose.material.icons.filled.Error
|
||||||
import androidx.compose.material.icons.filled.Info
|
import androidx.compose.material.icons.filled.Info
|
||||||
import androidx.compose.material.icons.filled.MoreVert
|
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Refresh
|
import androidx.compose.material.icons.filled.Refresh
|
||||||
import androidx.compose.material.icons.filled.Settings
|
import androidx.compose.material.icons.filled.Settings
|
||||||
@@ -41,8 +40,6 @@ import androidx.compose.material3.Card
|
|||||||
import androidx.compose.material3.CardDefaults
|
import androidx.compose.material3.CardDefaults
|
||||||
import androidx.compose.material3.CircularWavyProgressIndicator
|
import androidx.compose.material3.CircularWavyProgressIndicator
|
||||||
import androidx.compose.material3.Divider
|
import androidx.compose.material3.Divider
|
||||||
import androidx.compose.material3.DropdownMenu
|
|
||||||
import androidx.compose.material3.DropdownMenuItem
|
|
||||||
import androidx.compose.material3.FilledTonalButton
|
import androidx.compose.material3.FilledTonalButton
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
@@ -75,19 +72,18 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import com.vkturn.proxy.ui.theme.StatusGreen
|
import com.freeturn.app.ui.theme.StatusGreen
|
||||||
import com.vkturn.proxy.ui.theme.StatusGreenDark
|
import com.freeturn.app.ui.theme.StatusGreenDark
|
||||||
import com.vkturn.proxy.ui.theme.StatusRed
|
import com.freeturn.app.ui.theme.StatusRed
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
import com.vkturn.proxy.viewmodel.ProxyState
|
import com.freeturn.app.viewmodel.ProxyState
|
||||||
import com.vkturn.proxy.viewmodel.ServerState
|
import com.freeturn.app.viewmodel.ServerState
|
||||||
import com.vkturn.proxy.viewmodel.SshConnectionState
|
import com.freeturn.app.viewmodel.SshConnectionState
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun HomeScreen(
|
fun HomeScreen(
|
||||||
viewModel: MainViewModel,
|
viewModel: MainViewModel,
|
||||||
onNavigateToSshSetup: () -> Unit,
|
onNavigateToSshSetup: () -> Unit
|
||||||
onNavigateToClientSetup: () -> Unit
|
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val proxyState by viewModel.proxyState.collectAsStateWithLifecycle()
|
val proxyState by viewModel.proxyState.collectAsStateWithLifecycle()
|
||||||
@@ -97,7 +93,6 @@ fun HomeScreen(
|
|||||||
val logs by viewModel.logs.collectAsStateWithLifecycle()
|
val logs by viewModel.logs.collectAsStateWithLifecycle()
|
||||||
|
|
||||||
var showBottomSheet by rememberSaveable { mutableStateOf(false) }
|
var showBottomSheet by rememberSaveable { mutableStateOf(false) }
|
||||||
var showOverflowMenu by remember { mutableStateOf(false) }
|
|
||||||
val bottomSheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
|
val bottomSheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
|
||||||
val snackbarHostState = remember { SnackbarHostState() }
|
val snackbarHostState = remember { SnackbarHostState() }
|
||||||
|
|
||||||
@@ -106,28 +101,9 @@ fun HomeScreen(
|
|||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("VK TURN Proxy") },
|
title = { Text("VK TURN Proxy") },
|
||||||
actions = {
|
actions = {
|
||||||
IconButton(onClick = { showOverflowMenu = true }) {
|
// Кнопка «Детали и логи» через иконку — без ••• меню
|
||||||
Icon(Icons.Filled.MoreVert, contentDescription = "Меню")
|
IconButton(onClick = { showBottomSheet = true }) {
|
||||||
}
|
Icon(Icons.Filled.Info, contentDescription = "Детали")
|
||||||
DropdownMenu(
|
|
||||||
expanded = showOverflowMenu,
|
|
||||||
onDismissRequest = { showOverflowMenu = false }
|
|
||||||
) {
|
|
||||||
DropdownMenuItem(
|
|
||||||
text = { Text("Настройки сервера") },
|
|
||||||
leadingIcon = { Icon(Icons.Filled.Settings, null, Modifier.size(18.dp)) },
|
|
||||||
onClick = { showOverflowMenu = false; onNavigateToSshSetup() }
|
|
||||||
)
|
|
||||||
DropdownMenuItem(
|
|
||||||
text = { Text("Настройки клиента") },
|
|
||||||
leadingIcon = { Icon(Icons.Filled.Settings, null, Modifier.size(18.dp)) },
|
|
||||||
onClick = { showOverflowMenu = false; onNavigateToClientSetup() }
|
|
||||||
)
|
|
||||||
DropdownMenuItem(
|
|
||||||
text = { Text("Все настройки") },
|
|
||||||
leadingIcon = { Icon(Icons.Filled.Info, null, Modifier.size(18.dp)) },
|
|
||||||
onClick = { showOverflowMenu = false; showBottomSheet = true }
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -264,7 +240,6 @@ fun HomeScreen(
|
|||||||
SettingsBottomSheet(
|
SettingsBottomSheet(
|
||||||
viewModel = viewModel,
|
viewModel = viewModel,
|
||||||
onNavigateToSshSetup = { showBottomSheet = false; onNavigateToSshSetup() },
|
onNavigateToSshSetup = { showBottomSheet = false; onNavigateToSshSetup() },
|
||||||
onNavigateToClientSetup = { showBottomSheet = false; onNavigateToClientSetup() },
|
|
||||||
onDismiss = { showBottomSheet = false }
|
onDismiss = { showBottomSheet = false }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -337,7 +312,6 @@ private fun ProxyToggleButton(state: ProxyState, onClick: () -> Unit) {
|
|||||||
private fun SettingsBottomSheet(
|
private fun SettingsBottomSheet(
|
||||||
viewModel: MainViewModel,
|
viewModel: MainViewModel,
|
||||||
onNavigateToSshSetup: () -> Unit,
|
onNavigateToSshSetup: () -> Unit,
|
||||||
onNavigateToClientSetup: () -> Unit,
|
|
||||||
onDismiss: () -> Unit
|
onDismiss: () -> Unit
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
@@ -448,10 +422,7 @@ private fun SettingsBottomSheet(
|
|||||||
|
|
||||||
// ── Клиент ────────────────────────────────────────────────────────
|
// ── Клиент ────────────────────────────────────────────────────────
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text("Клиент", style = MaterialTheme.typography.titleSmall) },
|
headlineContent = { Text("Клиент", style = MaterialTheme.typography.titleSmall) }
|
||||||
trailingContent = {
|
|
||||||
TextButton(onClick = onNavigateToClientSetup) { Text("Изменить") }
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy.ui.screens
|
package com.freeturn.app.ui.screens
|
||||||
|
|
||||||
import androidx.compose.animation.core.FastOutSlowInEasing
|
import androidx.compose.animation.core.FastOutSlowInEasing
|
||||||
import androidx.compose.animation.core.RepeatMode
|
import androidx.compose.animation.core.RepeatMode
|
||||||
@@ -161,7 +161,7 @@ fun OnboardingScreen(
|
|||||||
Spacer(Modifier.height(12.dp))
|
Spacer(Modifier.height(12.dp))
|
||||||
|
|
||||||
TextButton(onClick = onSkip) {
|
TextButton(onClick = onSkip) {
|
||||||
Text("У меня уже есть настройки")
|
Text("Пропустить настройки")
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(Modifier.height(24.dp))
|
Spacer(Modifier.height(24.dp))
|
||||||
+12
-20
@@ -3,7 +3,7 @@
|
|||||||
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
||||||
)
|
)
|
||||||
|
|
||||||
package com.vkturn.proxy.ui.screens
|
package com.freeturn.app.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
@@ -21,8 +21,7 @@ import androidx.compose.foundation.rememberScrollState
|
|||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.ArrowBack
|
import androidx.compose.material.icons.automirrored.filled.ArrowForward
|
||||||
import androidx.compose.material.icons.filled.ArrowForward
|
|
||||||
import androidx.compose.material.icons.filled.CloudDownload
|
import androidx.compose.material.icons.filled.CloudDownload
|
||||||
import androidx.compose.material.icons.filled.PlayArrow
|
import androidx.compose.material.icons.filled.PlayArrow
|
||||||
import androidx.compose.material.icons.filled.Stop
|
import androidx.compose.material.icons.filled.Stop
|
||||||
@@ -54,16 +53,15 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import com.vkturn.proxy.ui.theme.StatusGreen
|
import com.freeturn.app.ui.theme.StatusGreen
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
import com.vkturn.proxy.viewmodel.ServerState
|
import com.freeturn.app.viewmodel.ServerState
|
||||||
import com.vkturn.proxy.viewmodel.SshConnectionState
|
import com.freeturn.app.viewmodel.SshConnectionState
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ServerManagementScreen(
|
fun ServerManagementScreen(
|
||||||
viewModel: MainViewModel,
|
viewModel: MainViewModel,
|
||||||
onContinue: () -> Unit,
|
onContinue: () -> Unit
|
||||||
onBack: () -> Unit
|
|
||||||
) {
|
) {
|
||||||
val sshState by viewModel.sshState.collectAsStateWithLifecycle()
|
val sshState by viewModel.sshState.collectAsStateWithLifecycle()
|
||||||
val serverState by viewModel.serverState.collectAsStateWithLifecycle()
|
val serverState by viewModel.serverState.collectAsStateWithLifecycle()
|
||||||
@@ -82,12 +80,7 @@ fun ServerManagementScreen(
|
|||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text("Управление сервером") },
|
title = { Text("Сервер") },
|
||||||
navigationIcon = {
|
|
||||||
IconButton(onClick = onBack) {
|
|
||||||
Icon(Icons.Filled.ArrowBack, contentDescription = "Назад")
|
|
||||||
}
|
|
||||||
},
|
|
||||||
actions = {
|
actions = {
|
||||||
SshStatusBadge(sshState = sshState, ip = sshConfig.ip)
|
SshStatusBadge(sshState = sshState, ip = sshConfig.ip)
|
||||||
}
|
}
|
||||||
@@ -179,7 +172,7 @@ fun ServerManagementScreen(
|
|||||||
) {
|
) {
|
||||||
Icon(Icons.Filled.CloudDownload, null)
|
Icon(Icons.Filled.CloudDownload, null)
|
||||||
Spacer(Modifier.width(8.dp))
|
Spacer(Modifier.width(8.dp))
|
||||||
Text("Установить / Обновить vk‑turn‑proxy")
|
Text("Установить / Обновить")
|
||||||
}
|
}
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
@@ -187,9 +180,8 @@ fun ServerManagementScreen(
|
|||||||
viewModel.saveProxyServerConfig(proxyListen, proxyConnect)
|
viewModel.saveProxyServerConfig(proxyListen, proxyConnect)
|
||||||
viewModel.startServer()
|
viewModel.startServer()
|
||||||
},
|
},
|
||||||
enabled = isConnected && !isWorking
|
enabled = (isConnected && !isWorking
|
||||||
&& serverKnown?.installed == true
|
&& serverKnown?.installed == true) && !serverKnown.running,
|
||||||
&& serverKnown?.running == false,
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.height(52.dp),
|
.height(52.dp),
|
||||||
@@ -227,7 +219,7 @@ fun ServerManagementScreen(
|
|||||||
) {
|
) {
|
||||||
Text("Продолжить настройку клиента")
|
Text("Продолжить настройку клиента")
|
||||||
Spacer(Modifier.width(8.dp))
|
Spacer(Modifier.width(8.dp))
|
||||||
Icon(Icons.Filled.ArrowForward, null)
|
Icon(Icons.AutoMirrored.Filled.ArrowForward, null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+4
-10
@@ -3,7 +3,7 @@
|
|||||||
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
androidx.compose.material3.ExperimentalMaterial3ExpressiveApi::class
|
||||||
)
|
)
|
||||||
|
|
||||||
package com.vkturn.proxy.ui.screens
|
package com.freeturn.app.ui.screens
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
@@ -57,9 +57,9 @@ import androidx.compose.ui.text.input.VisualTransformation
|
|||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import com.vkturn.proxy.data.SshConfig
|
import com.freeturn.app.data.SshConfig
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
import com.freeturn.app.viewmodel.MainViewModel
|
||||||
import com.vkturn.proxy.viewmodel.SshConnectionState
|
import com.freeturn.app.viewmodel.SshConnectionState
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun SshSetupScreen(
|
fun SshSetupScreen(
|
||||||
@@ -270,12 +270,6 @@ private fun FormSection(
|
|||||||
) {
|
) {
|
||||||
Text("Подключиться", style = MaterialTheme.typography.labelLarge)
|
Text("Подключиться", style = MaterialTheme.typography.labelLarge)
|
||||||
}
|
}
|
||||||
|
|
||||||
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
|
|
||||||
TextButton(onClick = { /* show help info */ }) {
|
|
||||||
Text("Как получить SSH-доступ к серверу?")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy.ui.theme
|
package com.freeturn.app.ui.theme
|
||||||
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy.ui.theme
|
package com.freeturn.app.ui.theme
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@@ -28,7 +28,7 @@ private val LightColorScheme = lightColorScheme(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun VkTurnProxyTheme(
|
fun FreeTurnTheme(
|
||||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||||
// Material You dynamic color — enabled on Android 12+
|
// Material You dynamic color — enabled on Android 12+
|
||||||
dynamicColor: Boolean = true,
|
dynamicColor: Boolean = true,
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.vkturn.proxy.ui.theme
|
package com.freeturn.app.ui.theme
|
||||||
|
|
||||||
import androidx.compose.material3.Typography
|
import androidx.compose.material3.Typography
|
||||||
import androidx.compose.ui.text.TextStyle
|
import androidx.compose.ui.text.TextStyle
|
||||||
+40
-10
@@ -1,15 +1,15 @@
|
|||||||
package com.vkturn.proxy.viewmodel
|
package com.freeturn.app.viewmodel
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.lifecycle.AndroidViewModel
|
import androidx.lifecycle.AndroidViewModel
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import com.vkturn.proxy.ProxyService
|
import com.freeturn.app.ProxyService
|
||||||
import com.vkturn.proxy.SSHManager
|
import com.freeturn.app.SSHManager
|
||||||
import com.vkturn.proxy.data.AppPreferences
|
import com.freeturn.app.data.AppPreferences
|
||||||
import com.vkturn.proxy.data.ClientConfig
|
import com.freeturn.app.data.ClientConfig
|
||||||
import com.vkturn.proxy.data.SshConfig
|
import com.freeturn.app.data.SshConfig
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.SharingStarted
|
import kotlinx.coroutines.flow.SharingStarted
|
||||||
@@ -215,11 +215,25 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
|||||||
|
|
||||||
fun startProxy(context: Context) {
|
fun startProxy(context: Context) {
|
||||||
if (ProxyService.isRunning) return
|
if (ProxyService.isRunning) return
|
||||||
|
|
||||||
|
// Сброс предыдущей ошибки перед повторной попыткой
|
||||||
|
if (_proxyState.value is ProxyState.Error) _proxyState.value = ProxyState.Idle
|
||||||
|
|
||||||
|
// Валидация конфига до запуска
|
||||||
|
val cfg = clientConfig.value
|
||||||
|
if (!cfg.isRawMode && (cfg.serverAddress.isBlank() || cfg.vkLink.isBlank())) {
|
||||||
|
setErrorWithAutoReset("Не заполнены настройки клиента")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (cfg.isRawMode && cfg.rawCommand.isBlank()) {
|
||||||
|
setErrorWithAutoReset("Не задана raw-команда")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
_proxyState.value = ProxyState.Starting
|
_proxyState.value = ProxyState.Starting
|
||||||
|
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
// Write to legacy SharedPreferences so ProxyService can read them
|
// Write to legacy SharedPreferences so ProxyService can read them
|
||||||
val cfg = clientConfig.value
|
|
||||||
context.getSharedPreferences("ProxyPrefs", Context.MODE_PRIVATE).edit().apply {
|
context.getSharedPreferences("ProxyPrefs", Context.MODE_PRIVATE).edit().apply {
|
||||||
putString("peer", cfg.serverAddress)
|
putString("peer", cfg.serverAddress)
|
||||||
putString("link", cfg.vkLink)
|
putString("link", cfg.vkLink)
|
||||||
@@ -234,9 +248,25 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
|||||||
ProxyService.logBuffer.clear()
|
ProxyService.logBuffer.clear()
|
||||||
context.startForegroundService(Intent(context, ProxyService::class.java))
|
context.startForegroundService(Intent(context, ProxyService::class.java))
|
||||||
|
|
||||||
delay(1500)
|
// Ждём запуска: проверяем логи на ошибку или успех вместо простого isRunning
|
||||||
_proxyState.value = if (ProxyService.isRunning) ProxyState.Running
|
delay(2500)
|
||||||
else ProxyState.Error("Не удалось запустить прокси")
|
val logText = ProxyService.logBuffer.joinToString("\n").lowercase()
|
||||||
|
when {
|
||||||
|
!ProxyService.isRunning ->
|
||||||
|
setErrorWithAutoReset("Прокси не запустился")
|
||||||
|
logText.contains("ошибка") || logText.contains("error") || logText.contains("fatal") ->
|
||||||
|
setErrorWithAutoReset("Ошибка запуска — проверьте настройки")
|
||||||
|
else ->
|
||||||
|
_proxyState.value = ProxyState.Running
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setErrorWithAutoReset(message: String) {
|
||||||
|
_proxyState.value = ProxyState.Error(message)
|
||||||
|
viewModelScope.launch {
|
||||||
|
delay(3500)
|
||||||
|
if (_proxyState.value is ProxyState.Error) _proxyState.value = ProxyState.Idle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
package com.vkturn.proxy.ui.navigation
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Box
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.getValue
|
|
||||||
import androidx.compose.ui.Alignment
|
|
||||||
import androidx.compose.ui.Modifier
|
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|
||||||
import androidx.navigation.compose.NavHost
|
|
||||||
import androidx.navigation.compose.composable
|
|
||||||
import androidx.navigation.compose.rememberNavController
|
|
||||||
import com.vkturn.proxy.ui.screens.ClientSetupScreen
|
|
||||||
import com.vkturn.proxy.ui.screens.HomeScreen
|
|
||||||
import com.vkturn.proxy.ui.screens.OnboardingScreen
|
|
||||||
import com.vkturn.proxy.ui.screens.ServerManagementScreen
|
|
||||||
import com.vkturn.proxy.ui.screens.SshSetupScreen
|
|
||||||
import com.vkturn.proxy.viewmodel.MainViewModel
|
|
||||||
|
|
||||||
object Routes {
|
|
||||||
const val ONBOARDING = "onboarding"
|
|
||||||
const val SSH_SETUP = "ssh_setup"
|
|
||||||
const val SERVER_MANAGEMENT = "server_management"
|
|
||||||
const val CLIENT_SETUP = "client_setup"
|
|
||||||
const val HOME = "home"
|
|
||||||
}
|
|
||||||
|
|
||||||
@Composable
|
|
||||||
fun AppNavigation(viewModel: MainViewModel) {
|
|
||||||
val isInitialized by viewModel.isInitialized.collectAsStateWithLifecycle()
|
|
||||||
val onboardingDone by viewModel.onboardingDone.collectAsStateWithLifecycle()
|
|
||||||
|
|
||||||
if (!isInitialized) {
|
|
||||||
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
|
|
||||||
CircularProgressIndicator()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val navController = rememberNavController()
|
|
||||||
val startDestination = if (onboardingDone) Routes.HOME else Routes.ONBOARDING
|
|
||||||
|
|
||||||
NavHost(navController = navController, startDestination = startDestination) {
|
|
||||||
|
|
||||||
composable(Routes.ONBOARDING) {
|
|
||||||
OnboardingScreen(
|
|
||||||
onSetupServer = { navController.navigate(Routes.SSH_SETUP) },
|
|
||||||
onSkip = {
|
|
||||||
viewModel.setOnboardingDone()
|
|
||||||
navController.navigate(Routes.HOME) {
|
|
||||||
popUpTo(Routes.ONBOARDING) { inclusive = true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable(Routes.SSH_SETUP) {
|
|
||||||
SshSetupScreen(
|
|
||||||
viewModel = viewModel,
|
|
||||||
onConnected = { navController.navigate(Routes.SERVER_MANAGEMENT) },
|
|
||||||
onBack = { navController.popBackStack() }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable(Routes.SERVER_MANAGEMENT) {
|
|
||||||
ServerManagementScreen(
|
|
||||||
viewModel = viewModel,
|
|
||||||
onContinue = { navController.navigate(Routes.CLIENT_SETUP) },
|
|
||||||
onBack = { navController.popBackStack() }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable(Routes.CLIENT_SETUP) {
|
|
||||||
ClientSetupScreen(
|
|
||||||
viewModel = viewModel,
|
|
||||||
onFinish = {
|
|
||||||
viewModel.setOnboardingDone()
|
|
||||||
navController.navigate(Routes.HOME) {
|
|
||||||
popUpTo(Routes.ONBOARDING) { inclusive = true }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onBack = { navController.popBackStack() }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
composable(Routes.HOME) {
|
|
||||||
HomeScreen(
|
|
||||||
viewModel = viewModel,
|
|
||||||
onNavigateToSshSetup = { navController.navigate(Routes.SSH_SETUP) },
|
|
||||||
onNavigateToClientSetup = { navController.navigate(Routes.CLIENT_SETUP) }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Base.Theme.VkTurnProxy" parent="Theme.AppCompat.DayNight.NoActionBar">
|
<style name="Base.Theme.FreeTurn" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<!-- Customize your dark theme here. -->
|
<!-- Customize your dark theme here. -->
|
||||||
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">VkTurnProxy</string>
|
<string name="app_name">FreeTurn</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Base.Theme.VkTurnProxy" parent="Theme.AppCompat.DayNight.NoActionBar">
|
<style name="Base.Theme.FreeTurn" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<!-- Customize your light theme here. -->
|
<!-- Customize your light theme here. -->
|
||||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.VkTurnProxy" parent="Base.Theme.VkTurnProxy" />
|
<style name="Theme.FreeTurn" parent="Base.Theme.FreeTurn" />
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.vkturn.proxy
|
|
||||||
|
|
||||||
import org.junit.Test
|
|
||||||
|
|
||||||
import org.junit.Assert.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Example local unit test, which will execute on the development machine (host).
|
|
||||||
*
|
|
||||||
* See [testing documentation](http://d.android.com/tools/testing).
|
|
||||||
*/
|
|
||||||
class ExampleUnitTest {
|
|
||||||
@Test
|
|
||||||
fun addition_isCorrect() {
|
|
||||||
assertEquals(4, 2 + 2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.kotlin.android) apply false
|
|
||||||
alias(libs.plugins.kotlin.compose) apply false
|
alias(libs.plugins.kotlin.compose) apply false
|
||||||
}
|
}
|
||||||
@@ -21,13 +21,6 @@ kotlin.code.style=official
|
|||||||
# resources declared in the library itself and none from the library's dependencies,
|
# resources declared in the library itself and none from the library's dependencies,
|
||||||
# thereby reducing the size of the R class for that library
|
# thereby reducing the size of the R class for that library
|
||||||
android.nonTransitiveRClass=true
|
android.nonTransitiveRClass=true
|
||||||
android.defaults.buildfeatures.resvalues=true
|
|
||||||
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
|
|
||||||
android.enableAppCompileTimeRClass=false
|
|
||||||
android.usesSdkInManifest.disallowed=false
|
|
||||||
android.uniquePackageNames=false
|
android.uniquePackageNames=false
|
||||||
android.dependency.useConstraints=true
|
android.dependency.useConstraints=true
|
||||||
android.r8.strictFullModeForKeepRules=false
|
android.r8.strictFullModeForKeepRules=false
|
||||||
android.r8.optimizedResourceShrinking=false
|
|
||||||
android.builtInKotlin=false
|
|
||||||
android.newDsl=false
|
|
||||||
@@ -33,6 +33,4 @@ androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lif
|
|||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
||||||
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
|
|
||||||
+1
-5
@@ -10,9 +10,6 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
plugins {
|
|
||||||
kotlin("jvm") version "2.2.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||||
@@ -25,6 +22,5 @@ dependencyResolutionManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "VkTurnProxy"
|
rootProject.name = "FreeTurn"
|
||||||
include(":app")
|
include(":app")
|
||||||
|
|
||||||
Reference in new issue
Block a user