-
Notifications
You must be signed in to change notification settings - Fork 339
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
02f0718
commit 28f97a9
Showing
34 changed files
with
327 additions
and
113 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
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
35 changes: 35 additions & 0 deletions
35
android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DaitaInfoDialog.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,35 @@ | ||
package net.mullvad.mullvadvpn.compose.dialog | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.tooling.preview.Preview | ||
import androidx.lifecycle.compose.dropUnlessResumed | ||
import com.ramcosta.composedestinations.annotation.Destination | ||
import com.ramcosta.composedestinations.annotation.RootGraph | ||
import com.ramcosta.composedestinations.navigation.DestinationsNavigator | ||
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator | ||
import com.ramcosta.composedestinations.spec.DestinationStyle | ||
import net.mullvad.mullvadvpn.R | ||
import net.mullvad.mullvadvpn.lib.theme.AppTheme | ||
|
||
@Preview | ||
@Composable | ||
private fun PreviewDaitaInfoDialog() { | ||
AppTheme { DaitaInfo(EmptyDestinationsNavigator) } | ||
} | ||
|
||
@Destination<RootGraph>(style = DestinationStyle.Dialog::class) | ||
@Composable | ||
fun DaitaInfo(navigator: DestinationsNavigator) { | ||
InfoDialog( | ||
message = | ||
stringResource( | ||
id = R.string.daita_info, | ||
stringResource(id = R.string.daita), | ||
stringResource(id = R.string.daita_full), | ||
), | ||
additionalInfo = | ||
stringResource(id = R.string.daita_warning, stringResource(id = R.string.daita)), | ||
onDismiss = dropUnlessResumed { navigator.navigateUp() }, | ||
) | ||
} |
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
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
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
Oops, something went wrong.