-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
47b8841
commit 22c3e6d
Showing
30 changed files
with
786 additions
and
384 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
9 changes: 9 additions & 0 deletions
9
...edu/stanford/spezi/module/account/account/compositionLocal/AccountServiceConfiguration.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,9 @@ | ||
package edu.stanford.spezi.module.account.account.compositionLocal | ||
|
||
import androidx.compose.runtime.compositionLocalOf | ||
import edu.stanford.spezi.module.account.account.service.configuration.AccountServiceConfiguration | ||
import edu.stanford.spezi.module.account.account.service.configuration.SupportedAccountKeys | ||
|
||
val LocalAccountServiceConfiguration = compositionLocalOf { | ||
AccountServiceConfiguration(SupportedAccountKeys.Arbitrary) | ||
} |
14 changes: 14 additions & 0 deletions
14
...main/kotlin/edu/stanford/spezi/module/account/account/compositionLocal/AccountViewType.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,14 @@ | ||
package edu.stanford.spezi.module.account.account.compositionLocal | ||
|
||
import androidx.compose.runtime.compositionLocalOf | ||
|
||
sealed interface AccountViewType { | ||
data object Signup : AccountViewType | ||
data class Overview(val mode: OverviewEntryMode) : AccountViewType | ||
|
||
enum class OverviewEntryMode { | ||
NEW, EXISTING, DISPLAY | ||
} | ||
} | ||
|
||
val LocalAccountViewType = compositionLocalOf<AccountViewType?> { null } |
24 changes: 24 additions & 0 deletions
24
...in/kotlin/edu/stanford/spezi/module/account/account/compositionLocal/PasswordFieldType.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,24 @@ | ||
package edu.stanford.spezi.module.account.account.compositionLocal | ||
|
||
import androidx.compose.runtime.compositionLocalOf | ||
import edu.stanford.spezi.core.design.component.StringResource | ||
import edu.stanford.spezi.module.account.account.value.AccountKeys | ||
import edu.stanford.spezi.module.account.account.value.keys.password | ||
|
||
enum class PasswordFieldType { | ||
PASSWORD, NEW, REPEAT; | ||
|
||
val text: StringResource get() = when (this) { | ||
PASSWORD -> AccountKeys.password.name | ||
NEW -> StringResource("NEW_PASSWORD") | ||
REPEAT -> StringResource("REPEAT_PASSWORD") | ||
} | ||
|
||
val prompt: StringResource get() = when (this) { | ||
PASSWORD -> AccountKeys.password.name | ||
NEW -> StringResource("NEW_PASSWORD_PROMPT") | ||
REPEAT -> StringResource("REPEAT_PASSWORD_PROMPT") | ||
} | ||
} | ||
|
||
val LocalPasswordFieldType = compositionLocalOf { PasswordFieldType.PASSWORD } |
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.