summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-03-25 18:13:04 +0100
committerGitHub <noreply@github.com>2020-03-25 18:13:04 +0100
commitfde16c60f4ce5d57a0c7d5a0186dcd532a23f0f0 (patch)
tree8a72bcc077590707c47017548cc8adc3eae6e0d1 /app/src/main/res
parent973e023dda3caf17fe024b9ba7f1872c5527e654 (diff)
Make preferred directory structure for Autofill configurable (#660)
Some users keep their password files in a directory structure such as: /example.org/john@doe.org.gpg while others prefer the style: /example.org/john@doe.org/password.gpg This commit adds a setting that allows to switch between the two. All Autofill operations, such as search, match, generate and save, respect this setting. Note: The first style seems to be the most widely used and is therefore kept as the default. The second style is mentioned on the official Pass website at: https://www.passwordstore.org/#organization
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/encrypt_layout.xml4
-rw-r--r--app/src/main/res/values/arrays.xml8
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/xml/preference.xml7
4 files changed, 19 insertions, 2 deletions
diff --git a/app/src/main/res/layout/encrypt_layout.xml b/app/src/main/res/layout/encrypt_layout.xml
index 40ae757f..e4d9464a 100644
--- a/app/src/main/res/layout/encrypt_layout.xml
+++ b/app/src/main/res/layout/encrypt_layout.xml
@@ -9,13 +9,13 @@
android:padding="@dimen/activity_horizontal_margin"
tools:context="com.zeapo.pwdstore.crypto.PgpActivity">
- <androidx.appcompat.widget.AppCompatTextView
+ <androidx.appcompat.widget.AppCompatEditText
android:id="@+id/crypto_password_category"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:textColor="?android:attr/textColor"
- android:textIsSelectable="false"
+ android:enabled="false"
android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 522fe6cc..37b55432 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -51,5 +51,13 @@
<item>classic</item>
<item>xkpasswd</item>
</string-array>
+ <string-array name="oreo_autofill_directory_structure_entries">
+ <item>/example.org/john@doe.org(.gpg)</item>
+ <item>/example.org/john@doe.org/password(.gpg)</item>
+ </string-array>
+ <string-array name="oreo_autofill_directory_structure_values">
+ <item>file</item>
+ <item>directory</item>
+ </string-array>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5df51af5..ba491c87 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -42,6 +42,7 @@
<string name="clipboard_username_toast_text">Username copied to clipboard</string>
<string name="clipboard_otp_toast_text">OTP code copied to clipboard</string>
<string name="file_toast_text">Please provide a file name</string>
+ <string name="path_toast_text">Please provide a file path</string>
<string name="empty_toast_text">You cannot use an empty password or empty extra content</string>
<!-- Git Async Task -->
@@ -268,6 +269,7 @@
<string name="oreo_autofill_fill_support">Fill credentials</string>
<string name="oreo_autofill_flaky_fill_support">Fill credentials (may require restarting the browser from time to time)</string>
<string name="oreo_autofill_no_support">No support</string>
+ <string name="oreo_autofill_preference_directory_structure">Password file organization</string>
<!-- Autofill -->
<string name="autofill_description">Autofills password fields in apps. Only works for Android versions 4.3 and up. Does not rely on the clipboard for Android versions 5.0 and up.</string>
diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml
index 08f23787..b1c5e4d0 100644
--- a/app/src/main/res/xml/preference.xml
+++ b/app/src/main/res/xml/preference.xml
@@ -6,6 +6,13 @@
app:defaultValue="true"
app:key="autofill_enable"
app:title="@string/pref_autofill_enable_title"/>
+ <androidx.preference.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
app:key="autofill_apps"
app:title="@string/pref_autofill_apps_title"/>