aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt5
-rw-r--r--app/src/main/res/layout/decrypt_layout.xml7
-rw-r--r--app/src/main/res/values/strings.xml1
3 files changed, 10 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
index 1a8a5051..168f92e1 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -246,6 +246,11 @@ class PgpActivity : AppCompatActivity(), OpenPgpServiceConnection.OnBound {
crypto_username_show.typeface = monoTypeface
crypto_username_show.text = entry.username
}
+ else {
+ crypto_username_show.visibility = View.GONE
+ crypto_username_show_label.visibility = View.GONE
+ crypto_copy_username.visibility = View.GONE
+ }
}
if (entry.hasTotp()) {
diff --git a/app/src/main/res/layout/decrypt_layout.xml b/app/src/main/res/layout/decrypt_layout.xml
index e5095d66..ac274e4e 100644
--- a/app/src/main/res/layout/decrypt_layout.xml
+++ b/app/src/main/res/layout/decrypt_layout.xml
@@ -133,6 +133,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:contentDescription="@string/copy_username"
+ android:visibility="invisible"
android:background="@color/background"
android:src="@drawable/ic_content_copy"/>
@@ -170,9 +171,9 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
- android:layout_alignParentTop="true"
+ android:layout_below="@id/crypto_username_show"
android:visibility="invisible"
- android:contentDescription="@string/copy_username"
+ android:contentDescription="@string/copy_totp"
android:background="@color/background"
android:src="@drawable/ic_content_copy"/>
@@ -182,9 +183,9 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
- android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/crypto_copy_totp"
android:layout_toStartOf="@id/crypto_copy_totp"
+ android:layout_below="@id/crypto_username_show"
android:text="@string/totp"
android:textColor="@android:color/black"
android:textStyle="bold" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8a5f0e39..9d23a253 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -97,6 +97,7 @@
<string name="edit_password">Edit password</string>
<string name="copy_password">Copy password</string>
<string name="copy_username">Copy username</string>
+ <string name="copy_totp">Copy OTP code</string>
<string name="share_as_plaintext">Share as plaintext</string>
<string name="last_changed">Last changed %s</string>