Improve UX around settings items (#744)

Fixes #461
This commit is contained in:
Harsh Shandilya 2020-04-25 16:53:40 +05:30 committed by GitHub
parent f7dbac4649
commit f89d5c282f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 241 additions and 254 deletions

View file

@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
### Changed
- SSH Keygen UI was improved
- Default key length for SSH Keygen is now 4096 bits
- Settings items were rearranged and cleaned up
### Fixed
- Failure to detect if repository was not cloned which broke Git operations
- Search results were inaccurate if root directory's name started with a dot (.)
- Saving git username and email did not provide user-facing confirmation
## [1.7.1] - 2020-04-23
### Fixed

View file

@ -91,7 +91,10 @@
android:windowSoftInputMode="adjustResize"
android:configChanges="orientation|screenSize" />
<activity android:name=".SelectFolderActivity" />
<activity android:name=".sshkeygen.SshKeyGenActivity" android:windowSoftInputMode="adjustResize" />
<activity
android:label="@string/pref_ssh_keygen_title"
android:name=".sshkeygen.SshKeyGenActivity"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".autofill.oreo.ui.AutofillDecryptActivity" />
<activity
android:name=".autofill.oreo.ui.AutofillFilterView"

View file

@ -101,7 +101,6 @@ class UserPreference : AppCompatActivity() {
// General preferences
val showTimePreference = findPreference<Preference>("general_show_time")
val clearAfterCopyPreference = findPreference<CheckBoxPreference>("clear_after_copy")
val clearClipboard20xPreference = findPreference<CheckBoxPreference>("clear_clipboard_20x")
// Autofill preferences
@ -129,7 +128,6 @@ class UserPreference : AppCompatActivity() {
viewSshKeyPreference?.isVisible = sharedPreferences.getBoolean("use_generated_key", false)
deleteRepoPreference?.isVisible = !sharedPreferences.getBoolean("git_external", false)
clearHotpIncrementPreference?.isVisible = sharedPreferences.getBoolean("hotp_remember_check", false)
clearAfterCopyPreference?.isVisible = sharedPreferences.getString("general_show_time", "45")?.toInt() != 0
clearClipboard20xPreference?.isVisible = sharedPreferences.getString("general_show_time", "45")?.toInt() != 0
val selectedKeys = (sharedPreferences.getStringSet("openpgp_key_ids_set", null)
?: HashSet()).toTypedArray()
@ -273,7 +271,6 @@ class UserPreference : AppCompatActivity() {
showTimePreference?.onPreferenceChangeListener = ChangeListener { _, newValue: Any? ->
try {
val isEnabled = newValue.toString().toInt() != 0
clearAfterCopyPreference?.isVisible = isEnabled
clearClipboard20xPreference?.isVisible = isEnabled
true
} catch (e: NumberFormatException) {
@ -282,10 +279,10 @@ class UserPreference : AppCompatActivity() {
}
showTimePreference?.summaryProvider = Preference.SummaryProvider<Preference> {
getString(R.string.pref_show_time_summary, sharedPreferences.getString("general_show_time", "45"))
getString(R.string.pref_clipboard_timeout_summary, sharedPreferences.getString("general_show_time", "45"))
}
findPreference<SwitchPreferenceCompat>("biometric_auth")?.apply {
findPreference<CheckBoxPreference>("biometric_auth")?.apply {
val isFingerprintSupported = BiometricManager.from(requireContext()).canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS
if (!isFingerprintSupported) {
isEnabled = false
@ -337,10 +334,10 @@ class UserPreference : AppCompatActivity() {
val prefIsCustomDict = findPreference<CheckBoxPreference>("pref_key_is_custom_dict")
val prefCustomDictPicker = findPreference<Preference>("pref_key_custom_dict")
val prefPwgenType = findPreference<ListPreference>("pref_key_pwgen_type")
showHideDependentPrefs(prefPwgenType?.value, prefIsCustomDict, prefCustomDictPicker)
updateXkPasswdPrefsVisibility(prefPwgenType?.value, prefIsCustomDict, prefCustomDictPicker)
prefPwgenType?.onPreferenceChangeListener = ChangeListener { _, newValue ->
showHideDependentPrefs(newValue, prefIsCustomDict, prefCustomDictPicker)
updateXkPasswdPrefsVisibility(newValue, prefIsCustomDict, prefCustomDictPicker)
true
}
@ -356,7 +353,7 @@ class UserPreference : AppCompatActivity() {
}
}
private fun showHideDependentPrefs(newValue: Any?, prefIsCustomDict: CheckBoxPreference?, prefCustomDictPicker: Preference?) {
private fun updateXkPasswdPrefsVisibility(newValue: Any?, prefIsCustomDict: CheckBoxPreference?, prefCustomDictPicker: Preference?) {
when (newValue as String) {
PgpActivity.KEY_PWGEN_TYPE_CLASSIC -> {
prefIsCustomDict?.isVisible = false

View file

@ -831,7 +831,7 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
// ignore and keep default
}
if (settings.getBoolean("clear_after_copy", true) && clearAfter != 0) {
if (clearAfter != 0) {
setTimer()
showSnackbar(this.resources.getString(R.string.clipboard_password_toast_text, clearAfter))
} else {

View file

@ -5,9 +5,12 @@
package com.zeapo.pwdstore.git
import android.os.Bundle
import android.os.Handler
import android.util.Patterns
import androidx.core.content.edit
import androidx.core.os.postDelayed
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.ActivityGitConfigBinding
import com.zeapo.pwdstore.utils.PasswordRepository
@ -23,7 +26,10 @@ class GitConfigActivity : BaseGitActivity() {
setContentView(binding.root)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
binding.gitUserName.setText(username)
if (username.isEmpty())
binding.gitUserName.requestFocus()
else
binding.gitUserName.setText(username)
binding.gitUserEmail.setText(email)
val repo = PasswordRepository.getRepository(PasswordRepository.getRepositoryDirectory(this))
if (repo != null) {
@ -55,8 +61,10 @@ class GitConfigActivity : BaseGitActivity() {
putString("git_config_user_email", email)
putString("git_config_user_name", name)
}
PasswordRepository.setUserName(name)
PasswordRepository.setUserEmail(email)
PasswordRepository.setUserName(name)
PasswordRepository.setUserEmail(email)
Snackbar.make(binding.root, getString(R.string.git_server_config_save_success), Snackbar.LENGTH_SHORT).show()
Handler().postDelayed(500) { finish() }
}
}
}

View file

@ -13,7 +13,6 @@ class SshKeyGenActivity : AppCompatActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
title = "Generate SSH Key"
if (savedInstanceState == null) {
supportFragmentManager
.beginTransaction()

View file

@ -10,81 +10,124 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager
import android.widget.ArrayAdapter
import android.widget.Button
import android.widget.CheckBox
import android.widget.EditText
import android.widget.Spinner
import androidx.core.content.edit
import androidx.core.content.getSystemService
import androidx.fragment.app.Fragment
import com.google.android.material.textfield.TextInputEditText
import androidx.lifecycle.lifecycleScope
import androidx.preference.PreferenceManager
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.jcraft.jsch.JSch
import com.jcraft.jsch.KeyPair
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.FragmentSshKeygenBinding
import java.io.File
import java.io.FileOutputStream
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
class SshKeyGenFragment : Fragment() {
private lateinit var checkBox: CheckBox
private lateinit var comment: EditText
private lateinit var generate: Button
private lateinit var passphrase: TextInputEditText
private lateinit var spinner: Spinner
private lateinit var activity: SshKeyGenActivity
private var keyLength = 4096
private var _binding: FragmentSshKeygenBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
return inflater.inflate(R.layout.fragment_ssh_keygen, container, false)
_binding = FragmentSshKeygenBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
activity = requireActivity() as SshKeyGenActivity
findViews(view)
val lengths = arrayOf(2048, 4096)
val adapter = ArrayAdapter(requireContext(), android.R.layout.simple_spinner_dropdown_item, lengths)
spinner.adapter = adapter
generate.setOnClickListener { generate() }
checkBox.setOnCheckedChangeListener { _, isChecked: Boolean ->
val selection = passphrase.selectionEnd
if (isChecked) {
passphrase.inputType = (
InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD)
} else {
passphrase.inputType = (
InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_VARIATION_PASSWORD)
with(binding) {
generate.setOnClickListener {
lifecycleScope.launch { generate(passphrase.text.toString(), comment.text.toString()) }
}
showPassphrase.setOnCheckedChangeListener { _, isChecked: Boolean ->
val selection = passphrase.selectionEnd
if (isChecked) {
passphrase.inputType = (
InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD)
} else {
passphrase.inputType = (
InputType.TYPE_CLASS_TEXT
or InputType.TYPE_TEXT_VARIATION_PASSWORD)
}
passphrase.setSelection(selection)
}
keyLengthGroup.check(R.id.key_length_4096)
keyLengthGroup.addOnButtonCheckedListener { _, checkedId, isChecked ->
if (isChecked) {
when (checkedId) {
R.id.key_length_2048 -> keyLength = 2048
R.id.key_length_4096 -> keyLength = 4096
}
}
}
passphrase.setSelection(selection)
}
}
private fun findViews(view: View) {
checkBox = view.findViewById(R.id.show_passphrase)
comment = view.findViewById(R.id.comment)
generate = view.findViewById(R.id.generate)
passphrase = view.findViewById(R.id.passphrase)
spinner = view.findViewById(R.id.length)
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
// Invoked when 'Generate' button of SshKeyGenFragment clicked. Generates a
// private and public key, then replaces the SshKeyGenFragment with a
// ShowSshKeyFragment which displays the public key.
fun generate() {
val length = (spinner.selectedItem as Int).toString()
val passphrase = passphrase.text.toString()
val comment = comment.text.toString()
KeyGenerateTask(activity).execute(length, passphrase, comment)
private suspend fun generate(passphrase: String, comment: String) {
binding.generate.text = getString(R.string.ssh_key_gen_generating_progress)
val jsch = JSch()
val e = try {
withContext(Dispatchers.IO) {
val kp = KeyPair.genKeyPair(jsch, KeyPair.RSA, keyLength)
var file = File(requireActivity().filesDir, ".ssh_key")
var out = FileOutputStream(file, false)
if (passphrase.isNotEmpty()) {
kp?.writePrivateKey(out, passphrase.toByteArray())
} else {
kp?.writePrivateKey(out)
}
file = File(requireActivity().filesDir, ".ssh_key.pub")
out = FileOutputStream(file, false)
kp?.writePublicKey(out, comment)
}
null
} catch (e: Exception) {
e.printStackTrace()
e
}
val activity = requireActivity()
binding.generate.text = getString(R.string.ssh_keygen_generating_done)
if (e == null) {
val df = ShowSshKeyFragment()
df.show(requireActivity().supportFragmentManager, "public_key")
val prefs = PreferenceManager.getDefaultSharedPreferences(activity)
prefs.edit { putBoolean("use_generated_key", true) }
} else {
MaterialAlertDialogBuilder(activity)
.setTitle(activity.getString(R.string.error_generate_ssh_key))
.setMessage(activity.getString(R.string.ssh_key_error_dialog_text) + e.message)
.setPositiveButton(activity.getString(R.string.dialog_ok)) { _, _ ->
requireActivity().finish()
}
.show()
}
hideKeyboard()
}
private fun hideKeyboard() {
val imm = activity.getSystemService<InputMethodManager>()
val activity = activity ?: return
val imm = activity.getSystemService<InputMethodManager>() ?: return
var view = activity.currentFocus
if (view == null) {
view = View(activity)
}
imm?.hideSoftInputFromWindow(view.windowToken, 0)
imm.hideSoftInputFromWindow(view.windowToken, 0)
}
}

View file

@ -1,76 +0,0 @@
/*
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.sshkeygen
import android.app.ProgressDialog
import android.os.AsyncTask
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
import androidx.fragment.app.DialogFragment
import androidx.preference.PreferenceManager
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.jcraft.jsch.JSch
import com.jcraft.jsch.KeyPair
import com.zeapo.pwdstore.R
import java.io.File
import java.io.FileOutputStream
import java.lang.ref.WeakReference
class KeyGenerateTask(activity: AppCompatActivity) : AsyncTask<String?, Void?, Exception?>() {
private var pd: ProgressDialog? = null
private val weakReference = WeakReference(activity)
override fun onPreExecute() {
super.onPreExecute()
pd = ProgressDialog.show(weakReference.get(), "", "Generating keys")
}
override fun doInBackground(vararg strings: String?): Exception? {
val length = strings[0]?.toInt()
val passphrase = strings[1]
val comment = strings[2]
val jsch = JSch()
try {
val kp = length?.let { KeyPair.genKeyPair(jsch, KeyPair.RSA, it) }
var file = File(weakReference.get()!!.filesDir.toString() + "/.ssh_key")
var out = FileOutputStream(file, false)
if (passphrase?.isNotEmpty()!!) {
kp?.writePrivateKey(out, passphrase.toByteArray())
} else {
kp?.writePrivateKey(out)
}
file = File(weakReference.get()!!.filesDir.toString() + "/.ssh_key.pub")
out = FileOutputStream(file, false)
kp?.writePublicKey(out, comment)
return null
} catch (e: Exception) {
e.printStackTrace()
return e
}
}
override fun onPostExecute(e: Exception?) {
super.onPostExecute(e)
val activity = weakReference.get()
if (activity is AppCompatActivity) {
pd!!.dismiss()
if (e == null) {
Toast.makeText(activity, "SSH-key generated", Toast.LENGTH_LONG).show()
val df: DialogFragment = ShowSshKeyFragment()
df.show(activity.supportFragmentManager, "public_key")
val prefs = PreferenceManager.getDefaultSharedPreferences(weakReference.get())
prefs.edit { putBoolean("use_generated_key", true) }
} else {
MaterialAlertDialogBuilder(activity)
.setTitle(activity.getString(R.string.error_generate_ssh_key))
.setMessage(activity.getString(R.string.ssh_key_error_dialog_text) + e.message)
.setPositiveButton(activity.getString(R.string.dialog_ok), null)
.show()
}
} else {
// TODO: When activity is destroyed
}
}
}

View file

@ -23,7 +23,7 @@
android:id="@+id/git_user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions|textVisiblePassword" />
android:inputType="textPersonName" />
</com.google.android.material.textfield.TextInputLayout>

View file

@ -17,11 +17,34 @@
android:gravity="center_vertical"
android:text="@string/ssh_keygen_length" />
<Spinner
android:id="@+id/length"
android:layout_width="fill_parent"
<com.google.android.material.button.MaterialButtonToggleGroup
style="@style/TextAppearance.MaterialComponents.Headline1"
android:id="@+id/key_length_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dropdown" />
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/key_length_2048"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/key_length_2048"
android:textColor="?android:attr/textColorPrimary"
app:rippleColor="@color/ripple_color"
app:strokeColor="?attr/colorSecondary"
app:backgroundTint="@color/toggle_button_selector" />
<com.google.android.material.button.MaterialButton
style="?attr/materialButtonOutlinedStyle"
android:id="@+id/key_length_4096"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/key_length_4096"
android:textColor="?android:attr/textColorPrimary"
app:rippleColor="@color/ripple_color"
app:strokeColor="?attr/colorSecondary"
app:backgroundTint="@color/toggle_button_selector" />
</com.google.android.material.button.MaterialButtonToggleGroup>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
@ -38,7 +61,7 @@
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<CheckBox
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/show_passphrase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View file

@ -72,8 +72,7 @@
<string name="pref_dialog_delete_title">تنحية المستودع</string>
<string name="pref_crypto_title">التشفير</string>
<string name="pref_provider_title">إختيار مزود الأوبن بي جي بي OpenPGP</string>
<string name="pref_general_title">الإعدادات العامة</string>
<string name="pref_show_time_title">مدة الإبقاء على كلمة السر ظاهرة</string>
<string name="pref_category_general_title">الإعدادات العامة</string>
<string name="pref_copy_title">نسخ كلمة السر تلقائيًا</string>
<string name="ssh_key_success_dialog_title">تم استيراد مفتاح الـ SSH</string>
<string name="ssh_key_error_dialog_text">نص الرسالة : \n</string>
@ -88,7 +87,6 @@
<string name="pref_external_repository_summary">إستخدم كلمة مرور المستودع الخارجي</string>
<string name="pref_select_external_repository">إختيار مستودع التخزين الخارجي</string>
<string name="prefs_use_default_file_picker">إستخدم أداة إختيار الملفات الإفتراضي</string>
<string name="prefs_clear_after_copy_title">تنظيف الحافظة مباشرةً بعد النسخ</string>
<string name="prefs_export_passwords_title">تصدير كلمات السر</string>
<string name="prefs_version">النسخة</string>

View file

@ -112,8 +112,7 @@
<string name="pref_crypto_title">Šifrování</string>
<string name="pref_provider_title">Vybrat poskytovatele OpenPGP</string>
<string name="pref_key_title">Vybrat ID OpenPGP klíče</string>
<string name="pref_general_title">Všeobecné</string>
<string name="pref_show_time_title">Čas zobrazení hesla</string>
<string name="pref_category_general_title">Všeobecné</string>
<string name="pref_copy_title">Automaticky kopírovat heslo</string>
<string name="pref_copy_dialog_title">Automatické kopírování hesla do schránky po úspěšném dešifrování.</string>
<string name="ssh_key_success_dialog_title">SSH-key importován</string>

View file

@ -87,8 +87,7 @@
<string name="pref_crypto_title">Kryptografie</string>
<string name="pref_provider_title">Wähle OpenPGP-Provider</string>
<string name="pref_key_title">Wähle OpenPGP-Key ID</string>
<string name="pref_general_title">Allgemein</string>
<string name="pref_show_time_title">Ablaufzeit des Passworts</string>
<string name="pref_category_general_title">Allgemein</string>
<string name="pref_copy_title">Kopiere Passwort automatisch</string>
<string name="pref_copy_dialog_title">Kopiert das Passwort in die Zwischenablage, wenn der Eintrag entschlüsselt wurde.</string>
<string name="ssh_key_success_dialog_title">SSH-Key importiert</string>
@ -112,8 +111,6 @@
<string name="pref_external_repository_summary">Nutze ein externes Repository</string>
<string name="pref_select_external_repository">Wähle ein externes Repository</string>
<string name="prefs_use_default_file_picker">Benutze Standardauswahl für Dateien</string>
<string name="prefs_clear_after_copy_title">Zwischenablage automatisch leeren</string>
<string name="prefs_clear_after_copy_summary">Nach automatischen oder manuellen Kopieren des Passwords wird die Zwischenablage automatisch geleert</string>
<string name="prefs_export_passwords_title">Passwörter exportieren</string>
<string name="prefs_export_passwords_summary">Exportiert die verschlüsselten Passwörter in ein externes Verzeichnis</string>
<string name="prefs_version">Version</string>

View file

@ -113,8 +113,7 @@
<string name="pref_provider_title">Selecciona un proveedor OpenPGP</string>
<string name="pref_key_title">Selecciona la llave OpenPGP</string>
<string name="pref_no_key_selected">Ninguna llave seleccionada</string>
<string name="pref_general_title">General</string>
<string name="pref_show_time_title">Tiempo para mostrar contraseña</string>
<string name="pref_category_general_title">General</string>
<string name="pref_copy_title">Copiar contraseña automáticamente</string>
<string name="pref_copy_dialog_title">Automáticamente copia la contraseña al portapapeles si el descifrado fue exitoso.</string>
<string name="ssh_key_success_dialog_title">Llave SSH importada</string>
@ -142,8 +141,6 @@
<string name="pref_external_repository_summary">Usar un repositorio externo para contraseñas</string>
<string name="pref_select_external_repository">Seleccionar repositorio externo</string>
<string name="prefs_use_default_file_picker">Usar seleccionador de archivos por defecto</string>
<string name="prefs_clear_after_copy_title">Limpiar automáticamente el portapapeles después de copiar</string>
<string name="prefs_clear_after_copy_summary">Después de copiar manual o automáticamente la contraseña, el portapapeles será automáticamente limpiado.</string>
<string name="prefs_export_passwords_title">Exportar contraseñas</string>
<string name="prefs_export_passwords_summary">Exporta las contraseñas cifradas a un directorio externo.</string>
<string name="prefs_version">Versión</string>

View file

@ -121,8 +121,7 @@
<string name="pref_provider_title">Sélection du prestataire OpenPGP</string>
<string name="pref_key_title">Sélection de votre identifiant OpenPGP</string>
<string name="pref_no_key_selected">Aucune clé sélectionnée</string>
<string name="pref_general_title">Général</string>
<string name="pref_show_time_title">Durée de disponibilité du mot de passe</string>
<string name="pref_category_general_title">Général</string>
<string name="pref_copy_title">Copie automatique du mot de passe</string>
<string name="pref_copy_dialog_title">Copie automatiquement le mot de passe vers le presse-papier si le déchiffrement a réussi.</string>
<string name="ssh_key_success_dialog_title">Clef SSH importée</string>
@ -147,8 +146,6 @@
<string name="pref_external_repository_summary">Utilise un dépôt externe pour les mots de passe</string>
<string name="pref_select_external_repository">Choisissez un dépôt externe</string>
<string name="prefs_use_default_file_picker">Utiliser le selecteur de fichier par défaut</string>
<string name="prefs_clear_after_copy_title">Vider le presse-papier automatiquement après la copie</string>
<string name="prefs_clear_after_copy_summary">"Après une copie du mot de passe, le presse papier sera automatiquement vidé "</string>
<string name="prefs_export_passwords_title">Exporter les mots de passe</string>
<string name="prefs_export_passwords_summary">Exporter les mots de passe (chiffrés) vers un répertoire externe</string>
<string name="prefs_version">Version</string>

View file

@ -73,8 +73,7 @@
<string name="pref_crypto_title">暗号化</string>
<string name="pref_provider_title">OpenPGP プロバイダーを選択</string>
<string name="pref_key_title">OpenPGP 鍵 ID を選択</string>
<string name="pref_general_title">全般</string>
<string name="pref_show_time_title">パスワード表示時間</string>
<string name="pref_category_general_title">全般</string>
<string name="pref_copy_title">自動的にパスワードをコピー</string>
<string name="pref_copy_dialog_title">復号化が成功した後、自動的にパスワードをクリップボードにコピーします。</string>
<string name="ssh_key_success_dialog_title">SSH 鍵をインポートしました</string>

View file

@ -126,9 +126,7 @@
<string name="pref_provider_title">Выберите провайдера OpenPGP</string>
<string name="pref_key_title">Выберите ключ OpenPGP</string>
<string name="pref_no_key_selected">Ключи не выбраны</string>
<string name="pref_general_title">Общие</string>
<string name="pref_show_time_title">Время в буфере</string>
<string name="pref_show_time_summary">Уставить время (в секундах) в течении которого пароль будет находиться в буфере обмена. 0 - останется навсегда. Текущее значение: %1$s</string>
<string name="pref_category_general_title">Общие</string>
<string name="pref_copy_title">Автоматически копировать пароль</string>
<string name="pref_copy_dialog_title">Автоматически копировать пароль в буфер обмена после успешного расшифрования</string>
<string name="ssh_key_success_dialog_title">SSH ключ импортирован</string>
@ -158,8 +156,6 @@
<string name="pref_external_repository_summary">Использовать внешний репозиторий</string>
<string name="pref_select_external_repository">Выбрать внешний репозиторий</string>
<string name="prefs_use_default_file_picker">Использовать стандартное окно выбора файлов</string>
<string name="prefs_clear_after_copy_title">Автоматически очищать буфер обмена после вставки</string>
<string name="prefs_clear_after_copy_summary">После автоматического или ручного копирования, буфер обмена будет автоматически очищен.</string>
<string name="prefs_export_passwords_title">Экспортировать пароли</string>
<string name="prefs_export_passwords_summary">Экспортировать пароли в открытом виде во внешнее хранилище</string>
<string name="prefs_version">Версия</string>

View file

@ -73,8 +73,7 @@
<string name="pref_crypto_title">加密</string>
<string name="pref_provider_title">选择 OpenPGP 应用</string>
<string name="pref_key_title">选择 OpenPGP Key Id</string>
<string name="pref_general_title">通用</string>
<string name="pref_show_time_title">密码保存时限</string>
<string name="pref_category_general_title">通用</string>
<string name="pref_copy_title">自动复制密码</string>
<string name="pref_copy_dialog_title">解密成功后自动将密码复制到剪贴板</string>
<string name="ssh_key_success_dialog_title">成功导入SSH密钥</string>

View file

@ -70,8 +70,7 @@
<string name="pref_crypto_title">加密</string>
<string name="pref_provider_title">選擇 OpenPGP app</string>
<string name="pref_key_title">選擇 OpenPGP Key Id</string>
<string name="pref_general_title">一般</string>
<string name="pref_show_time_title">密碼保存時限</string>
<string name="pref_category_general_title">一般</string>
<string name="pref_copy_title">自動複製密碼</string>
<string name="pref_copy_dialog_title">解密成功後自動將密碼複製到剪貼簿</string>
<string name="ssh_key_success_dialog_title">成功匯入 SSH 金鑰</string>

View file

@ -143,9 +143,10 @@
<string name="pref_provider_title">Select OpenPGP provider</string>
<string name="pref_key_title">Select OpenPGP key ID</string>
<string name="pref_no_key_selected">No key selected</string>
<string name="pref_general_title">General</string>
<string name="pref_show_time_title">Password show time</string>
<string name="pref_show_time_summary">Set the time (in seconds) you want the password to be in clipboard. 0 means forever. Current value: %1$s</string>
<string name="pref_category_general_title">General</string>
<string name="pref_category_title_passwords">Passwords</string>
<string name="pref_clipboard_timeout_title">Password copy timeout</string>
<string name="pref_clipboard_timeout_summary">Set the time (in seconds) you want the password to be in clipboard. 0 means forever. Current value: %1$s</string>
<string name="pref_copy_title">Automatically copy password</string>
<string name="pref_copy_dialog_title">Automatically copy the password to the clipboard after decryption was successful.</string>
<string name="ssh_key_import_error_not_an_ssh_key_message">Selected file does not appear to be an SSH private key.</string>
@ -177,8 +178,6 @@
<string name="pref_external_repository_summary">Use an external password repository</string>
<string name="pref_select_external_repository">Select external repository</string>
<string name="prefs_use_default_file_picker">Use default file picker</string>
<string name="prefs_clear_after_copy_title">Automatically clear the clipboard after copy</string>
<string name="prefs_clear_after_copy_summary">After an automatic copy or a manual copy of the password, the clipboard will be automatically cleared.</string>
<string name="prefs_export_passwords_title">Export passwords</string>
<string name="prefs_export_passwords_summary">Exports the encrypted passwords to an external directory</string>
<string name="prefs_version">Version</string>
@ -223,6 +222,10 @@
<string name="ssh_keygen_copy">Copy</string>
<string name="ssh_keygen_tip">Provide this public key to your Git server.</string>
<string name="ssh_keygen_show_passphrase">Show passphrase</string>
<string name="ssh_key_gen_generating_progress">Generating keys…</string>
<string name="ssh_keygen_generating_done">Done!</string>
<string name="key_length_2048" translatable="false">2048</string>
<string name="key_length_4096" translatable="false">4096</string>
<!-- Misc -->
<string name="dialog_ok">OK</string>
@ -236,9 +239,9 @@
<string name="git_pull">Pull from remote</string>
<string name="git_push">Push to remote</string>
<string name="show_password_pref_title">Show the password</string>
<string name="show_password_pref_summary">Control the visibility of the passwords once decrypted, this does not disable the password copy</string>
<string name="show_password_pref_summary">Control the visibility of the passwords once decrypted. This does not disable copying to clipboard.</string>
<string name="show_extra_content_pref_title">Show extra content</string>
<string name="show_extra_content_pref_summary">Control the visibility of the extra content once decrypted</string>
<string name="show_extra_content_pref_summary">Control the visibility of the extra content once decrypted.</string>
<string name="pwd_generate_button">Generate</string>
<string name="refresh_list">Refresh list</string>
<string name="no_repo_selected">No external repository selected</string>

View file

@ -1,61 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.PreferenceCategory app:title="@string/pref_autofill_title">
<androidx.preference.SwitchPreferenceCompat
<PreferenceCategory app:title="@string/pref_autofill_title">
<SwitchPreferenceCompat
app:defaultValue="true"
app:key="autofill_enable"
app:title="@string/pref_autofill_enable_title"/>
<androidx.preference.ListPreference
<ListPreference
app:defaultValue="file"
app:entries="@array/oreo_autofill_directory_structure_entries"
app:entryValues="@array/oreo_autofill_directory_structure_values"
app:key="oreo_autofill_directory_structure"
app:title="@string/oreo_autofill_preference_directory_structure"
app:useSimpleSummaryProvider="true" />
<androidx.preference.Preference
<Preference
app:key="autofill_apps"
app:title="@string/pref_autofill_apps_title"/>
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:defaultValue="true"
app:key="autofill_default"
app:summary="@string/pref_autofill_default_hint"
app:title="@string/pref_autofill_default_title"/>
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:defaultValue="false"
app:key="autofill_always"
app:title="@string/pref_autofill_always_title"/>
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:defaultValue="false"
app:key="autofill_full_path"
app:summary="@string/pref_autofill_full_path_hint"
app:title="@string/pref_autofill_full_path_title"/>
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<androidx.preference.PreferenceCategory app:title="@string/pref_git_title">
<androidx.preference.Preference
<PreferenceCategory app:title="@string/pref_git_title">
<Preference
app:key="git_server_info"
app:title="@string/pref_edit_server_info" />
<androidx.preference.Preference
<Preference
app:key="git_config"
app:title="@string/pref_edit_git_config" />
<androidx.preference.Preference
<Preference
app:key="ssh_key"
app:title="@string/pref_ssh_title" />
<androidx.preference.Preference
<Preference
app:key="ssh_keygen"
app:title="@string/pref_ssh_keygen_title" />
<androidx.preference.Preference app:key="clear_saved_pass" />
<androidx.preference.Preference
<Preference app:key="clear_saved_pass" />
<Preference
app:key="hotp_remember_clear_choice"
app:title="@string/hotp_remember_clear_choice" />
<androidx.preference.Preference
<Preference
app:key="ssh_openkeystore_clear_keyid"
app:title="@string/ssh_openkeystore_clear_keyid" />
<androidx.preference.Preference
<Preference
app:key="ssh_see_key"
app:title="@string/pref_ssh_see_key_title" />
<androidx.preference.Preference
<Preference
app:key="git_delete_repo"
app:summary="@string/pref_git_delete_repo_summary"
app:title="@string/pref_git_delete_repo" />
@ -63,23 +63,23 @@
app:key="git_external"
app:summary="@string/pref_external_repository_summary"
app:title="@string/pref_external_repository" />
<androidx.preference.Preference
<Preference
app:dependency="git_external"
app:key="pref_select_external"
app:title="@string/pref_select_external_repository" />
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<androidx.preference.PreferenceCategory app:title="@string/pref_crypto_title">
<PreferenceCategory app:title="@string/pref_crypto_title">
<me.msfjarvis.openpgpktx.preference.OpenPgpAppPreference
app:key="openpgp_provider_list"
app:title="@string/pref_provider_title" />
<androidx.preference.Preference
<Preference
app:key="openpgp_key_id_pref"
app:title="@string/pref_key_title" />
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<androidx.preference.PreferenceCategory app:title="@string/password_generator_category_title">
<androidx.preference.ListPreference
<PreferenceCategory app:title="@string/password_generator_category_title">
<ListPreference
app:key="pref_key_pwgen_type"
app:title="@string/xkpwgen_pref_gentype_title"
app:defaultValue="classic"
@ -87,19 +87,19 @@
app:entryValues="@array/pwgen_provider_values"
app:useSimpleSummaryProvider="true"
app:persistent="true" />
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:key="pref_key_is_custom_dict"
app:title="@string/xkpwgen_pref_custom_dict_title"
app:summaryOn="@string/xkpwgen_pref_custom_dict_summary_on"
app:summaryOff="@string/xkpwgen_pref_custom_dict_summary_off"/>
<androidx.preference.Preference
<Preference
app:key="pref_key_custom_dict"
app:title="@string/xkpwgen_pref_custom_dict_picker_title"
app:summary="@string/xkpwgen_pref_custom_dict_picker_summary"
app:dependency="pref_key_is_custom_dict"/>
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<androidx.preference.PreferenceCategory app:title="@string/pref_general_title">
<PreferenceCategory app:title="@string/pref_category_general_title">
<ListPreference
android:defaultValue="@string/app_theme_def"
android:key="app_theme"
@ -107,45 +107,7 @@
android:entryValues="@array/app_theme_values"
android:summary="%s"
android:title="@string/theme_title" />
<androidx.preference.EditTextPreference
app:defaultValue="45"
app:dialogTitle="@string/pref_show_time_summary"
android:inputType="number"
app:key="general_show_time"
app:summary="@string/pref_show_time_summary"
app:title="@string/pref_show_time_title" />
<androidx.preference.CheckBoxPreference
app:defaultValue="true"
app:title="@string/show_password_pref_title"
app:summary="@string/show_password_pref_summary"
app:key="show_password" />
<androidx.preference.CheckBoxPreference
app:defaultValue="true"
app:title="@string/show_extra_content_pref_title"
app:summary="@string/show_extra_content_pref_summary"
app:key="show_extra_content" />
<androidx.preference.CheckBoxPreference
app:defaultValue="true"
app:dialogTitle="@string/pref_copy_dialog_title"
app:key="copy_on_decrypt"
app:summary="@string/pref_copy_dialog_title"
app:title="@string/pref_copy_title" />
<androidx.preference.CheckBoxPreference
app:defaultValue="true"
app:key="clear_after_copy"
app:summary="@string/prefs_clear_after_copy_summary"
app:title="@string/prefs_clear_after_copy_title" />
<androidx.preference.CheckBoxPreference
app:defaultValue="true"
app:key="filter_recursively"
app:summary="@string/pref_recursive_filter_hint"
app:title="@string/pref_recursive_filter" />
<androidx.preference.CheckBoxPreference
app:defaultValue="false"
app:key="search_on_start"
app:summary="@string/pref_search_on_start_hint"
app:title="@string/pref_search_on_start" />
<androidx.preference.ListPreference
<ListPreference
app:title="@string/pref_sort_order_title"
app:defaultValue="FOLDER_FIRST"
app:key="sort_order"
@ -153,35 +115,69 @@
app:entryValues="@array/sort_order_values"
app:persistent="true"
app:summary="%s" />
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:defaultValue="true"
app:key="filter_recursively"
app:summary="@string/pref_recursive_filter_hint"
app:title="@string/pref_recursive_filter" />
<CheckBoxPreference
app:defaultValue="false"
app:key="search_on_start"
app:summary="@string/pref_search_on_start_hint"
app:title="@string/pref_search_on_start" />
<CheckBoxPreference
app:title="@string/pref_show_hidden_title"
app:summary="@string/pref_show_hidden_summary"
app:key="show_hidden_folders"
app:defaultValue="false"
app:persistent="true" />
<androidx.preference.SwitchPreferenceCompat
<CheckBoxPreference
app:key="biometric_auth"
app:title="@string/biometric_auth_title"
app:summary="@string/biometric_auth_summary" />
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<PreferenceCategory app:title="@string/pref_category_title_passwords">
<EditTextPreference
android:inputType="number"
app:defaultValue="45"
app:key="general_show_time"
app:summary="@string/pref_clipboard_timeout_summary"
app:title="@string/pref_clipboard_timeout_title" />
<CheckBoxPreference
app:defaultValue="true"
app:title="@string/show_password_pref_title"
app:summary="@string/show_password_pref_summary"
app:key="show_password" />
<CheckBoxPreference
app:defaultValue="true"
app:title="@string/show_extra_content_pref_title"
app:summary="@string/show_extra_content_pref_summary"
app:key="show_extra_content" />
<CheckBoxPreference
app:defaultValue="true"
app:dialogTitle="@string/pref_copy_dialog_title"
app:key="copy_on_decrypt"
app:summary="@string/pref_copy_dialog_title"
app:title="@string/pref_copy_title" />
</PreferenceCategory>
<androidx.preference.PreferenceCategory app:title="@string/pref_misc_title">
<androidx.preference.Preference
<PreferenceCategory app:title="@string/pref_misc_title">
<Preference
app:key="export_passwords"
app:title="@string/prefs_export_passwords_title"
app:summary="@string/prefs_export_passwords_summary"/>
<androidx.preference.CheckBoxPreference
<CheckBoxPreference
app:defaultValue="false"
app:key="clear_clipboard_20x"
app:summary="@string/pref_clear_clipboard_hint"
app:title="@string/pref_clear_clipboard_title" />
</androidx.preference.PreferenceCategory>
</PreferenceCategory>
<androidx.preference.PreferenceCategory>
<androidx.preference.Preference
<PreferenceCategory>
<Preference
app:icon="@mipmap/ic_launcher_round"
app:key="app_version"
app:title="@string/prefs_version" />
</androidx.preference.PreferenceCategory>
</androidx.preference.PreferenceScreen>
</PreferenceCategory>
</PreferenceScreen>