aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/res
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-10-16 12:58:36 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-10-16 12:58:36 +0200
commitde3791de3f73523926f6f5293992504c8cca5d57 (patch)
tree27f76d83c2dceacad14c3b7dd7eccccf450a2594 /OpenKeychain/src/main/res
parent709a91422e0ecaf0099d257288ea80305f7002b3 (diff)
downloadopen-keychain-de3791de3f73523926f6f5293992504c8cca5d57.tar.gz
open-keychain-de3791de3f73523926f6f5293992504c8cca5d57.tar.bz2
open-keychain-de3791de3f73523926f6f5293992504c8cca5d57.zip
Allow choosing of YubiKey PIN
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r--OpenKeychain/src/main/res/layout/create_yubi_key_pin_fragment.xml111
-rw-r--r--OpenKeychain/src/main/res/layout/create_yubi_key_pin_repeat_fragment.xml42
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml7
3 files changed, 34 insertions, 126 deletions
diff --git a/OpenKeychain/src/main/res/layout/create_yubi_key_pin_fragment.xml b/OpenKeychain/src/main/res/layout/create_yubi_key_pin_fragment.xml
deleted file mode 100644
index 34871affe..000000000
--- a/OpenKeychain/src/main/res/layout/create_yubi_key_pin_fragment.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:fillViewport="true"
- android:layout_above="@+id/create_key_buttons">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:layout_marginLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/create_key_yubi_key_pin_text" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:layout_marginLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/create_key_yubi_key_pin" />
-
- <TextView
- android:id="@+id/create_yubi_key_pin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:layout_marginLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceLarge"
- tools:text="123456" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dp"
- android:layout_marginLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/create_key_yubi_key_admin_pin" />
-
- <TextView
- android:id="@+id/create_yubi_key_admin_pin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:layout_marginLeft="8dp"
- android:textAppearance="?android:attr/textAppearanceLarge"
- tools:text="12345678" />
-
- </LinearLayout>
- </ScrollView>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:background="?attr/colorButtonRow"
- android:id="@+id/create_key_buttons">
-
- <TextView
- android:id="@+id/create_key_back_button"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="center_vertical"
- android:text="@string/btn_back"
- android:textAllCaps="true"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:drawableLeft="@drawable/ic_chevron_left_grey_24dp"
- android:drawablePadding="8dp"
- android:gravity="left|center_vertical"
- android:clickable="true"
- style="?android:attr/borderlessButtonStyle" />
-
- <TextView
- android:id="@+id/create_key_next_button"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="center_vertical"
- android:text="@string/btn_next"
- android:textAllCaps="true"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:drawableRight="@drawable/ic_chevron_right_grey_24dp"
- android:drawablePadding="8dp"
- android:gravity="right|center_vertical"
- android:clickable="true"
- style="?android:attr/borderlessButtonStyle" />
- </LinearLayout>
-</RelativeLayout>
diff --git a/OpenKeychain/src/main/res/layout/create_yubi_key_pin_repeat_fragment.xml b/OpenKeychain/src/main/res/layout/create_yubi_key_pin_repeat_fragment.xml
index af9080f55..c3b73d91f 100644
--- a/OpenKeychain/src/main/res/layout/create_yubi_key_pin_repeat_fragment.xml
+++ b/OpenKeychain/src/main/res/layout/create_yubi_key_pin_repeat_fragment.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -21,7 +22,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
- android:text="@string/create_key_yubi_key_pin_repeat_text"
+ android:text="@string/create_key_yubi_key_pin_text"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
@@ -33,12 +34,21 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
<EditText
- android:id="@+id/create_yubi_key_pin_repeat"
+ android:id="@+id/create_yubi_key_pin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="8dp"
android:ems="10"
+ android:hint="@string/create_key_yubi_key_pin"
+ android:inputType="numberPassword" />
+
+ <EditText
+ android:id="@+id/create_yubi_key_pin_repeat"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:ems="10"
android:hint="@string/create_key_yubi_key_pin_repeat"
android:inputType="numberPassword" />
@@ -46,19 +56,27 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
+ android:layout_marginTop="48dp"
+ android:text="@string/create_key_yubi_key_admin_pin_text"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dp"
android:layout_marginTop="16dp"
android:text="@string/create_key_yubi_key_admin_pin"
android:textAppearance="?android:attr/textAppearanceMedium" />
- <EditText
- android:id="@+id/create_yubi_key_admin_pin_repeat"
- android:layout_width="match_parent"
+ <TextView
+ android:id="@+id/create_yubi_key_admin_pin"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="8dp"
- android:ems="10"
- android:hint="@string/create_key_yubi_key_admin_pin_repeat"
- android:inputType="numberPassword" />
+ android:layout_marginLeft="8dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="48dp"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ tools:text="12345678" />
</LinearLayout>
</ScrollView>
@@ -78,8 +96,8 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="center_vertical"
+ android:layout_weight="1"
android:clickable="true"
android:drawableLeft="@drawable/ic_chevron_left_grey_24dp"
android:drawablePadding="8dp"
@@ -96,8 +114,8 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="center_vertical"
+ android:layout_weight="1"
android:clickable="true"
android:drawablePadding="8dp"
android:drawableRight="@drawable/ic_chevron_right_grey_24dp"
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index bc238690b..15e714a11 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -759,13 +759,14 @@
<string name="create_key_add_email_text">"Additional email addresses are also associated to this key and can be used for secure communication."</string>
<string name="create_key_email_already_exists_text">"Email address has already been added"</string>
<string name="create_key_email_invalid_email">"Email address format is invalid"</string>
- <string name="create_key_yubi_key_pin_text">"Please remember the PIN, it is required to use your YubiKey later. Please write down the Admin PIN and store it in a safe place."</string>
+ <string name="create_key_yubi_key_pin_text">"Please choose a PIN with 6 numbers."</string>
+ <string name="create_key_yubi_key_admin_pin_text">"Please write down the Admin PIN and store it in a safe place (required when you used a wrong PIN 3 times)."</string>
<string name="create_key_yubi_key_pin">"PIN"</string>
<string name="create_key_yubi_key_admin_pin">"Admin PIN"</string>
- <string name="create_key_yubi_key_pin_repeat_text">"Please enter the PIN and Admin PIN to proceed."</string>
<string name="create_key_yubi_key_pin_repeat">"Repeat PIN"</string>
- <string name="create_key_yubi_key_admin_pin_repeat">"Repeat Admin PIN"</string>
<string name="create_key_yubi_key_pin_not_correct">"PIN is not correct!"</string>
+ <string name="create_key_yubi_key_pin_too_short">"PIN must be at least 6 numbers long!"</string>
+ <string name="create_key_yubi_key_pin_insecure">"Please choose a secure PIN, not 000000, 123456 or similar combinations."</string>
<!-- View key -->
<string name="view_key_revoked">"Revoked: Key must not be used anymore!"</string>