summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorglowinthedark <48893368+glowinthedark@users.noreply.github.com>2020-08-17 12:40:03 +0200
committerGitHub <noreply@github.com>2020-08-17 16:10:03 +0530
commit82ae0a8629a42bc169b4b1993bc8257457703e3f (patch)
treebf70bdc580a44a3cdced36c4b0e0b4bd89895f1d /app/src/main/res
parente2a372bc63eac1a68427dfc55e32cd83f0440219 (diff)
Allow adding digits and symbols in XkPasswd generator using mask-like values (#1023)
* - XkPasswordGeneratorDialogFragment: add symbol/number mask to allow appending numbers+symbols via a mask such as `ddds` which would generate random.password123!; position of `d` and `s` is not currently considered; only the count is relevant * - update CHANGELOG.md * - update CHANGELOG.md * - rename constants * Update CHANGELOG.md Co-authored-by: Harsh Shandilya <me@msfjarvis.dev> * - add missing marginTop * - add missing marginTop Co-authored-by: null <null> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev> Co-authored-by: glowinthedark <glowinthedark> Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/fragment_xkpwgen.xml23
-rw-r--r--app/src/main/res/values/arrays.xml2
-rw-r--r--app/src/main/res/values/strings.xml2
3 files changed, 25 insertions, 2 deletions
diff --git a/app/src/main/res/layout/fragment_xkpwgen.xml b/app/src/main/res/layout/fragment_xkpwgen.xml
index 112c94d9..749fba47 100644
--- a/app/src/main/res/layout/fragment_xkpwgen.xml
+++ b/app/src/main/res/layout/fragment_xkpwgen.xml
@@ -75,7 +75,28 @@
android:entries="@array/capitalization_type_values"
android:entryValues="@array/capitalization_type_values"
android:spinnerMode="dropdown"
+ app:layout_constraintEnd_toEndOf="@id/total_words"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/separator" />
+ app:layout_constraintTop_toBottomOf="@id/total_words" />
+
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/xk_numbers_symbols_label"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:hint="@string/xkpwgen_extrachars_label"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="@id/separator"
+ app:layout_constraintTop_toBottomOf="@id/separator"
+ app:layout_constraintTop_toTopOf="@id/xkCapType">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/xk_number_symbol_mask"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:autofillHints=""
+ android:inputType="text"
+ android:text="@string/xk_numbers_symbols_append_default" />
+ </com.google.android.material.textfield.TextInputLayout>
+
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 1ccdd5eb..6b5edf6c 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -18,7 +18,7 @@
<item>lowercase</item>
<item>UPPERCASE</item>
<item>TitleCase</item>
- <item>Sentencecase</item>
+ <item>Sentence</item>
</string-array>
<string-array name="pwgen_provider_labels">
<item>Classic</item>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4b1e81bf..fe2a3488 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -390,4 +390,6 @@
<!-- GPG key selection in folder creation -->
<string name="folder_creation_err_file_exists">A file by that name already exists</string>
<string name="folder_creation_err_folder_exists">A folder by that name already exists</string>
+ <string name="xkpwgen_extrachars_label" >Digits/Symbols (d/s)</string>
+ <string name="xk_numbers_symbols_append_default">ds</string>
</resources>