mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-31 14:25:28 +00:00
app: integrate diceware UI
This commit is contained in:
@@ -42,6 +42,7 @@ import dev.msfjarvis.aps.R
|
|||||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||||
import dev.msfjarvis.aps.data.repo.PasswordRepository
|
import dev.msfjarvis.aps.data.repo.PasswordRepository
|
||||||
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
||||||
|
import dev.msfjarvis.aps.ui.dialogs.DicewarePasswordGeneratorDialogFragment
|
||||||
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
||||||
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
||||||
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
||||||
@@ -360,6 +361,8 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
|
|||||||
when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_CLASSIC) {
|
when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_CLASSIC) {
|
||||||
KEY_PWGEN_TYPE_CLASSIC ->
|
KEY_PWGEN_TYPE_CLASSIC ->
|
||||||
PasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
PasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
||||||
|
KEY_PWGEN_TYPE_DICEWARE ->
|
||||||
|
DicewarePasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,6 +594,7 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
|
|||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val KEY_PWGEN_TYPE_CLASSIC = "classic"
|
private const val KEY_PWGEN_TYPE_CLASSIC = "classic"
|
||||||
|
private const val KEY_PWGEN_TYPE_DICEWARE = "diceware"
|
||||||
const val PASSWORD_RESULT_REQUEST_KEY = "PASSWORD_GENERATOR"
|
const val PASSWORD_RESULT_REQUEST_KEY = "PASSWORD_GENERATOR"
|
||||||
const val OTP_RESULT_REQUEST_KEY = "OTP_IMPORT"
|
const val OTP_RESULT_REQUEST_KEY = "OTP_IMPORT"
|
||||||
const val RESULT = "RESULT"
|
const val RESULT = "RESULT"
|
||||||
|
@@ -39,6 +39,7 @@ import dev.msfjarvis.aps.R
|
|||||||
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
import dev.msfjarvis.aps.data.passfile.PasswordEntry
|
||||||
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
|
||||||
import dev.msfjarvis.aps.injection.crypto.CryptoSet
|
import dev.msfjarvis.aps.injection.crypto.CryptoSet
|
||||||
|
import dev.msfjarvis.aps.ui.dialogs.DicewarePasswordGeneratorDialogFragment
|
||||||
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
import dev.msfjarvis.aps.ui.dialogs.OtpImportDialogFragment
|
||||||
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
|
||||||
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
|
||||||
@@ -290,6 +291,8 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
|||||||
when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_CLASSIC) {
|
when (settings.getString(PreferenceKeys.PREF_KEY_PWGEN_TYPE) ?: KEY_PWGEN_TYPE_CLASSIC) {
|
||||||
KEY_PWGEN_TYPE_CLASSIC ->
|
KEY_PWGEN_TYPE_CLASSIC ->
|
||||||
PasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
PasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
||||||
|
KEY_PWGEN_TYPE_DICEWARE ->
|
||||||
|
DicewarePasswordGeneratorDialogFragment().show(supportFragmentManager, "generator")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,6 +469,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
|||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val KEY_PWGEN_TYPE_CLASSIC = "classic"
|
private const val KEY_PWGEN_TYPE_CLASSIC = "classic"
|
||||||
|
private const val KEY_PWGEN_TYPE_DICEWARE = "diceware"
|
||||||
const val PASSWORD_RESULT_REQUEST_KEY = "PASSWORD_GENERATOR"
|
const val PASSWORD_RESULT_REQUEST_KEY = "PASSWORD_GENERATOR"
|
||||||
const val OTP_RESULT_REQUEST_KEY = "OTP_IMPORT"
|
const val OTP_RESULT_REQUEST_KEY = "OTP_IMPORT"
|
||||||
const val RESULT = "RESULT"
|
const val RESULT = "RESULT"
|
||||||
|
@@ -24,9 +24,11 @@
|
|||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="pwgen_provider_labels">
|
<string-array name="pwgen_provider_labels">
|
||||||
<item>Classic</item>
|
<item>Classic</item>
|
||||||
|
<item>Diceware</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="pwgen_provider_values">
|
<string-array name="pwgen_provider_values">
|
||||||
<item>classic</item>
|
<item>classic</item>
|
||||||
|
<item>diceware</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<string-array name="oreo_autofill_directory_structure_entries">
|
<string-array name="oreo_autofill_directory_structure_entries">
|
||||||
<item>work/example.org(.gpg)</item>
|
<item>work/example.org(.gpg)</item>
|
||||||
|
Reference in New Issue
Block a user