-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor consent prompt and move it to identity-appsupport.
- Add support for `intentToRetain` and add new sample requests to identity-doctypes library. - Make `TrustPoint` available in multiplatform. This includes switching to using X509Cert instead of X509Certificate (which is Java-only). - Update to match design and UX in the functional specification document. - Rename to `ConsentModalBottomSheet` and for easier embedding take a `SheetState`. - Introduce `ConsentDocument` and `ConsentRelyingParty` to capture information to display in the sheet. - Fix height so it's not constant-height but dynamically adjusts according to how much content there is - Instead of disabling the "Share" button and displaying "Scroll down", turn the "Share" button into a "More" button which will scroll down. This matches the behavior in other wallets - Add support in samples/testapp for this for all the use-cases. - Use Material You in samples/testapp - Rework navigation in samples/testapp - Update some dependencies. Test: Manually tested in samples/testapp on Android and iOS. Signed-off-by: David Zeuthen <[email protected]>
- Loading branch information
Showing
51 changed files
with
1,384 additions
and
729 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
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
34 changes: 34 additions & 0 deletions
34
...tity-appsupport/src/androidMain/kotlin/com/android/identity/appsupport/ui/Util.android.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,34 @@ | ||
package com.android.identity.appsupport.ui | ||
|
||
import android.os.Build | ||
import androidx.compose.foundation.isSystemInDarkTheme | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.darkColorScheme | ||
import androidx.compose.material3.dynamicDarkColorScheme | ||
import androidx.compose.material3.dynamicLightColorScheme | ||
import androidx.compose.material3.lightColorScheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.platform.LocalContext | ||
|
||
@Composable | ||
actual fun AppTheme(content: @Composable () -> Unit) { | ||
val darkScheme = isSystemInDarkTheme() | ||
val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
val context = LocalContext.current | ||
if (darkScheme) { | ||
dynamicDarkColorScheme(context) | ||
} else { | ||
dynamicLightColorScheme(context) | ||
} | ||
} else { | ||
if (darkScheme) { | ||
darkColorScheme() | ||
} else { | ||
lightColorScheme() | ||
} | ||
} | ||
MaterialTheme( | ||
colorScheme = colorScheme, | ||
content = content | ||
) | ||
} |
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
18 changes: 18 additions & 0 deletions
18
identity-appsupport/src/commonMain/kotlin/com/android/identity/appsupport/ui/Util.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,18 @@ | ||
package com.android.identity.appsupport.ui | ||
|
||
import androidx.compose.foundation.isSystemInDarkTheme | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.darkColorScheme | ||
import androidx.compose.material3.lightColorScheme | ||
import androidx.compose.runtime.Composable | ||
|
||
@Composable | ||
expect fun AppTheme(content: @Composable () -> Unit) | ||
|
||
@Composable | ||
fun AppThemeDefault(content: @Composable () -> Unit) { | ||
MaterialTheme( | ||
colorScheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme(), | ||
content = content | ||
) | ||
} |
Oops, something went wrong.