-
Notifications
You must be signed in to change notification settings - Fork 11
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
92a81db
commit b6f2cbd
Showing
14 changed files
with
405 additions
and
238 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
22 changes: 22 additions & 0 deletions
22
...e-ui/src/commonMain/kotlin/com/softartdev/notedelight/ui/dialog/security/fieldLabelRes.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,22 @@ | ||
package com.softartdev.notedelight.ui.dialog.security | ||
|
||
import androidx.compose.runtime.Composable | ||
import com.softartdev.notedelight.shared.presentation.settings.security.FieldLabel | ||
import notedelight.shared_compose_ui.generated.resources.Res | ||
import notedelight.shared_compose_ui.generated.resources.empty_password | ||
import notedelight.shared_compose_ui.generated.resources.enter_password | ||
import notedelight.shared_compose_ui.generated.resources.incorrect_password | ||
import notedelight.shared_compose_ui.generated.resources.passwords_do_not_match | ||
import org.jetbrains.compose.resources.StringResource | ||
import org.jetbrains.compose.resources.stringResource | ||
|
||
val FieldLabel.resString: String | ||
@Composable get() = stringResource(this.res) | ||
|
||
private val FieldLabel.res: StringResource | ||
get() = when (this) { | ||
FieldLabel.ENTER -> Res.string.enter_password | ||
FieldLabel.EMPTY -> Res.string.empty_password | ||
FieldLabel.INCORRECT -> Res.string.incorrect_password | ||
FieldLabel.NO_MATCH -> Res.string.passwords_do_not_match | ||
} |
Oops, something went wrong.