Skip to content

Commit 235fe9a

Browse files
committed
Group UI
1 parent 7cec703 commit 235fe9a

19 files changed

Lines changed: 31 additions & 22 deletions

app-android/app/src/main/kotlin/com/algoritmico/passepartout/PassepartoutVpnService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.algoritmico.passepartout.injection.lastTunnelPreferences
2020
import com.algoritmico.passepartout.injection.lastTunnelProfile
2121
import com.algoritmico.passepartout.injection.JSON
2222
import com.algoritmico.passepartout.injection.Tags
23-
import com.algoritmico.passepartout.ui.NotificationTransferFormatter
23+
import com.algoritmico.passepartout.ui.theme.NotificationTransferFormatter
2424
import io.partout.PartoutVpnServiceRuntime
2525
import io.partout.abi.PartoutException
2626
import io.partout.models.TaggedProfile

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/PassepartoutApp.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ import com.algoritmico.passepartout.observables.ProfileObservable
3131
import com.algoritmico.passepartout.observables.TunnelObservable
3232
import com.algoritmico.passepartout.observables.UserPreferencesObservable
3333
import com.algoritmico.passepartout.observables.VersionObservable
34+
import com.algoritmico.passepartout.ui.alerts.FailureAlert
35+
import com.algoritmico.passepartout.ui.app.AppCoordinator
3436

3537
@Composable
3638
fun PassepartoutApp(

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/FailureAlert.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/alerts/FailureAlert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.alerts
66

77
import androidx.compose.material3.AlertDialog
88
import androidx.compose.material3.Text

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/InteractiveView+OpenVPN.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/alerts/InteractiveView+OpenVPN.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.alerts
66

77
import androidx.compose.foundation.layout.Arrangement
88
import androidx.compose.foundation.layout.Column

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/VpnPermissionDeniedAlert.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/alerts/VpnPermissionDeniedAlert.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.alerts
66

77
import androidx.compose.material3.AlertDialog
88
import androidx.compose.material3.Text

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/AppCoordinator.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/app/AppCoordinator.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.app
66

77
import android.util.Log
88
import androidx.activity.compose.BackHandler
@@ -16,6 +16,7 @@ import androidx.compose.material3.FloatingActionButton
1616
import androidx.compose.material3.Icon
1717
import androidx.compose.material3.IconButton
1818
import androidx.compose.material3.ListItem
19+
import androidx.compose.material3.MaterialTheme
1920
import androidx.compose.material3.ModalBottomSheet
2021
import androidx.compose.material3.Scaffold
2122
import androidx.compose.material3.Text
@@ -39,6 +40,7 @@ import com.algoritmico.passepartout.observables.LocalErrorHandler
3940
import com.algoritmico.passepartout.observables.ProfileObservable
4041
import com.algoritmico.passepartout.observables.TunnelObservable
4142
import com.algoritmico.passepartout.observables.UserPreferencesObservable
43+
import com.algoritmico.passepartout.ui.settings.SettingsCoordinator
4244
import kotlinx.coroutines.launch
4345

4446
@OptIn(ExperimentalMaterial3Api::class)
@@ -238,7 +240,7 @@ private fun AppCoordinatorScaffold(
238240
@Preview(showBackground = true, widthDp = 393, heightDp = 852)
239241
@Composable
240242
private fun AppCoordinatorPreview() {
241-
androidx.compose.material3.MaterialTheme {
243+
MaterialTheme {
242244
AppCoordinatorScaffold(
243245
title = "Passepartout",
244246
contextualProfileCount = 0,
@@ -260,7 +262,7 @@ private fun AppCoordinatorPreview() {
260262
@Preview(showBackground = true, widthDp = 393, heightDp = 852)
261263
@Composable
262264
private fun AppCoordinatorContextualPreview() {
263-
androidx.compose.material3.MaterialTheme {
265+
MaterialTheme {
264266
AppCoordinatorScaffold(
265267
title = "Passepartout",
266268
contextualProfileCount = 2,

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/ProfileContainerView.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/app/ProfileContainerView.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.app
66

77
import android.content.Context
88
import android.content.Intent
@@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.size
2525
import androidx.compose.foundation.layout.width
2626
import androidx.compose.foundation.lazy.LazyColumn
2727
import androidx.compose.foundation.lazy.items
28-
import androidx.compose.material3.AlertDialog
2928
import androidx.compose.material3.CardDefaults
3029
import androidx.compose.material3.CircularProgressIndicator
3130
import androidx.compose.material3.MaterialTheme
@@ -59,6 +58,8 @@ import com.algoritmico.passepartout.observables.ErrorHandler
5958
import com.algoritmico.passepartout.observables.LocalErrorHandler
6059
import com.algoritmico.passepartout.observables.ProfileObservable
6160
import com.algoritmico.passepartout.observables.TunnelObservable
61+
import com.algoritmico.passepartout.ui.alerts.InteractiveOpenVPNView
62+
import com.algoritmico.passepartout.ui.alerts.VpnPermissionDeniedAlert
6263
import io.partout.models.TaggedProfile
6364
import kotlinx.coroutines.launch
6465

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/ChangelogView.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/settings/ChangelogView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.settings
66

77
import android.util.Log
88
import androidx.compose.foundation.clickable

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/CreditsView.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/settings/CreditsView.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.settings
66

77
import android.util.Log
88
import androidx.activity.compose.BackHandler
99
import androidx.compose.foundation.clickable
10+
import androidx.compose.foundation.layout.Arrangement
1011
import androidx.compose.foundation.layout.Column
1112
import androidx.compose.foundation.layout.PaddingValues
1213
import androidx.compose.foundation.layout.Row
@@ -37,6 +38,7 @@ import com.algoritmico.passepartout.injection.credits
3738
import com.algoritmico.passepartout.models.Credits
3839
import com.algoritmico.passepartout.models.CreditsLicensesInner
3940
import com.algoritmico.passepartout.models.CreditsNoticesInner
41+
import com.algoritmico.passepartout.ui.theme.ListItemTrailingText
4042
import kotlinx.coroutines.Dispatchers
4143
import kotlinx.coroutines.withContext
4244
import java.net.URL
@@ -267,7 +269,7 @@ private fun LicenseView(
267269
modifier = Modifier
268270
.fillMaxWidth()
269271
.padding(top = 24.dp),
270-
horizontalArrangement = androidx.compose.foundation.layout.Arrangement.Center
272+
horizontalArrangement = Arrangement.Center
271273
) {
272274
CircularProgressIndicator()
273275
}

app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/LinksView.kt renamed to app-android/app/src/main/kotlin/com/algoritmico/passepartout/ui/settings/LinksView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: GPL-3.0
44

5-
package com.algoritmico.passepartout.ui
5+
package com.algoritmico.passepartout.ui.settings
66

77
import androidx.compose.foundation.clickable
88
import androidx.compose.foundation.layout.Column

0 commit comments

Comments
 (0)