diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/ConfigScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/ConfigScreen.kt index cedbdae1..c23baaac 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/ConfigScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/ConfigScreen.kt @@ -1,5 +1,6 @@ package com.zaneschepke.wireguardautotunnel.ui.screens.config +import android.annotation.SuppressLint import androidx.compose.foundation.clickable import androidx.compose.foundation.focusGroup import androidx.compose.foundation.layout.Arrangement @@ -60,7 +61,6 @@ import com.zaneschepke.wireguardautotunnel.ui.Route import com.zaneschepke.wireguardautotunnel.ui.common.config.ConfigurationTextBox import com.zaneschepke.wireguardautotunnel.ui.common.config.ConfigurationToggle import com.zaneschepke.wireguardautotunnel.ui.common.navigation.LocalNavController -import com.zaneschepke.wireguardautotunnel.ui.common.navigation.TopNavBar import com.zaneschepke.wireguardautotunnel.ui.common.prompt.AuthorizationPrompt import com.zaneschepke.wireguardautotunnel.ui.common.snackbar.SnackbarController import com.zaneschepke.wireguardautotunnel.ui.common.text.SectionTitle @@ -70,6 +70,7 @@ import com.zaneschepke.wireguardautotunnel.util.Constants import com.zaneschepke.wireguardautotunnel.util.extensions.isRunningOnTv import kotlinx.coroutines.delay +@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @Composable fun ConfigScreen(tunnelId: Int, focusRequester: FocusRequester) { val viewModel = hiltViewModel { factory -> @@ -173,9 +174,6 @@ fun ConfigScreen(tunnelId: Int, focusRequester: FocusRequester) { } Scaffold( - topBar = { - TopNavBar(stringResource(R.string.edit_tunnel)) - }, floatingActionButtonPosition = FabPosition.End, floatingActionButton = { FloatingActionButton( @@ -193,7 +191,7 @@ fun ConfigScreen(tunnelId: Int, focusRequester: FocusRequester) { } }, ) { - Column(Modifier.padding(it)) { + Column { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Top, @@ -247,8 +245,7 @@ fun ConfigScreen(tunnelId: Int, focusRequester: FocusRequester) { hint = stringResource(R.string.tunnel_name).lowercase(), modifier = Modifier - .fillMaxWidth() - .focusRequester(focusRequester), + .fillMaxWidth(), ) OutlinedTextField( modifier = diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/options/OptionsScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/options/OptionsScreen.kt index 81a179ea..21d37847 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/options/OptionsScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/options/OptionsScreen.kt @@ -1,5 +1,6 @@ package com.zaneschepke.wireguardautotunnel.ui.screens.options +import android.annotation.SuppressLint import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement @@ -18,6 +19,7 @@ import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Close +import androidx.compose.material.icons.filled.Edit import androidx.compose.material.icons.outlined.Add import androidx.compose.material.icons.outlined.Edit import androidx.compose.material3.Icon @@ -53,8 +55,8 @@ import com.zaneschepke.wireguardautotunnel.ui.common.ClickableIconButton import com.zaneschepke.wireguardautotunnel.ui.common.config.ConfigurationToggle import com.zaneschepke.wireguardautotunnel.ui.common.config.SubmitConfigurationTextBox import com.zaneschepke.wireguardautotunnel.ui.common.navigation.LocalNavController -import com.zaneschepke.wireguardautotunnel.ui.common.navigation.TopNavBar import com.zaneschepke.wireguardautotunnel.ui.common.text.SectionTitle +import com.zaneschepke.wireguardautotunnel.ui.screens.main.components.ScrollDismissFab import com.zaneschepke.wireguardautotunnel.ui.screens.settings.components.WildcardSupportingLabel import com.zaneschepke.wireguardautotunnel.util.Constants import com.zaneschepke.wireguardautotunnel.util.extensions.isRunningOnTv @@ -62,6 +64,7 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.isValidIpv4orIpv6Addr import com.zaneschepke.wireguardautotunnel.util.extensions.openWebUrl import kotlinx.coroutines.delay +@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @OptIn(ExperimentalLayoutApi::class) @Composable fun OptionsScreen(optionsViewModel: OptionsViewModel = hiltViewModel(), focusRequester: FocusRequester, appUiState: AppUiState, tunnelId: Int) { @@ -97,19 +100,18 @@ fun OptionsScreen(optionsViewModel: OptionsViewModel = hiltViewModel(), focusReq } Scaffold( - topBar = { - TopNavBar(config.name, trailing = { - IconButton(onClick = { - navController.navigate( - Route.Config(config.id), - ) - }) { - val icon = Icons.Outlined.Edit - Icon( - imageVector = icon, - contentDescription = icon.name, - ) - } + floatingActionButton = { + ScrollDismissFab(icon = { + val icon = Icons.Filled.Edit + Icon( + imageVector = icon, + contentDescription = icon.name, + tint = MaterialTheme.colorScheme.onPrimary, + ) + }, focusRequester, isVisible = true, onClick = { + navController.navigate( + Route.Config(config.id), + ) }) }, ) { @@ -118,7 +120,7 @@ fun OptionsScreen(optionsViewModel: OptionsViewModel = hiltViewModel(), focusReq verticalArrangement = Arrangement.Top, modifier = Modifier - .fillMaxSize().padding(it) + .fillMaxSize() .verticalScroll(scrollState) .clickable( indication = null, diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/logs/LogsScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/logs/LogsScreen.kt index 918826ab..e2a62bf6 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/logs/LogsScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/support/logs/LogsScreen.kt @@ -1,5 +1,6 @@ package com.zaneschepke.wireguardautotunnel.ui.screens.support.logs +import android.annotation.SuppressLint import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement @@ -31,17 +32,15 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.ClipboardManager import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.hilt.navigation.compose.hiltViewModel import com.zaneschepke.logcatter.model.LogMessage -import com.zaneschepke.wireguardautotunnel.R -import com.zaneschepke.wireguardautotunnel.ui.common.navigation.TopNavBar import com.zaneschepke.wireguardautotunnel.ui.common.text.LogTypeLabel +@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @Composable fun LogsScreen(viewModel: LogsViewModel = hiltViewModel()) { val logs = viewModel.logs @@ -84,9 +83,6 @@ fun LogsScreen(viewModel: LogsViewModel = hiltViewModel()) { } Scaffold( - topBar = { - TopNavBar(stringResource(R.string.logs)) - }, floatingActionButton = { FloatingActionButton( onClick = { @@ -111,7 +107,7 @@ fun LogsScreen(viewModel: LogsViewModel = hiltViewModel()) { modifier = Modifier .fillMaxSize() - .padding(horizontal = 24.dp).padding(it), + .padding(horizontal = 24.dp), ) { itemsIndexed( logs, diff --git a/buildSrc/src/main/kotlin/Constants.kt b/buildSrc/src/main/kotlin/Constants.kt index 43e4b7c9..fa72984d 100644 --- a/buildSrc/src/main/kotlin/Constants.kt +++ b/buildSrc/src/main/kotlin/Constants.kt @@ -1,7 +1,7 @@ object Constants { - const val VERSION_NAME = "3.5.3" + const val VERSION_NAME = "3.5.4" const val JVM_TARGET = "17" - const val VERSION_CODE = 35300 + const val VERSION_CODE = 35400 const val TARGET_SDK = 34 const val MIN_SDK = 26 const val APP_ID = "com.zaneschepke.wireguardautotunnel" diff --git a/fastlane/metadata/android/en-US/changelogs/35400.txt b/fastlane/metadata/android/en-US/changelogs/35400.txt new file mode 100644 index 00000000..44aa8ec8 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/35400.txt @@ -0,0 +1,5 @@ +What's new: +- Fix Android 12 crashing issue +- Fix copy tunnel bug +- Auto toggle Amnezia props +- Hide preshared key without auth