-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d28de5
commit d7dee1d
Showing
9 changed files
with
118 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceNameInfoDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.mullvad.mullvadvpn.compose.dialog | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import net.mullvad.mullvadvpn.R | ||
|
||
@Composable | ||
fun DeviceNameInfoDialog(onDismiss: () -> Unit) { | ||
InfoDialog( | ||
message = stringResource(id = R.string.local_network_sharing_info), | ||
additionalInfo = | ||
buildString { | ||
appendLine(stringResource(id = R.string.device_name_info_part1)) | ||
appendLine(stringResource(id = R.string.device_name_info_part2)) | ||
appendLine(stringResource(id = R.string.device_name_info_part3)) | ||
}, | ||
onDismiss = onDismiss | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/AccountUiState.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
android/app/src/main/kotlin/net/mullvad/mullvadvpn/viewmodel/AccountUiState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package net.mullvad.mullvadvpn.viewmodel | ||
|
||
import net.mullvad.mullvadvpn.model.AccountExpiry | ||
import net.mullvad.mullvadvpn.model.DeviceState | ||
import org.joda.time.DateTime | ||
|
||
data class AccountUiState( | ||
val deviceName: String?, | ||
val accountNumber: String?, | ||
val accountExpiry: DateTime?, | ||
val dialogState: AccountScreenDialogState = AccountScreenDialogState.NoDialog | ||
) { | ||
companion object { | ||
fun default() = | ||
AccountUiState( | ||
deviceName = DeviceState.Unknown.deviceName(), | ||
accountNumber = DeviceState.Unknown.token(), | ||
accountExpiry = AccountExpiry.Missing.date(), | ||
dialogState = AccountScreenDialogState.NoDialog | ||
) | ||
} | ||
} | ||
|
||
sealed class AccountScreenDialogState { | ||
data object NoDialog : AccountScreenDialogState() | ||
|
||
data object DeviceNameInfoDialog : AccountScreenDialogState() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters