OTP wiki link

This commit is contained in:
J-Jamet
2021-03-05 20:52:50 +01:00
parent e0aab6cfbf
commit 8b88f72efc
5 changed files with 32 additions and 3 deletions

View File

@@ -120,8 +120,7 @@ class AssignMasterKeyDialogFragment : DialogFragment() {
.setPositiveButton(android.R.string.ok) { _, _ -> }
.setNegativeButton(android.R.string.cancel) { _, _ -> }
val credentialsInfo: ImageView? = rootView?.findViewById(R.id.credentials_information)
credentialsInfo?.setOnClickListener {
rootView?.findViewById<View>(R.id.credentials_information)?.setOnClickListener {
UriUtil.gotoUrl(activity, R.string.credentials_explanation_url)
}

View File

@@ -46,6 +46,7 @@ import com.kunzisoft.keepass.otp.OtpElement.Companion.MIN_TOTP_PERIOD
import com.kunzisoft.keepass.otp.OtpTokenType
import com.kunzisoft.keepass.otp.OtpType
import com.kunzisoft.keepass.otp.TokenCalculator
import com.kunzisoft.keepass.utils.UriUtil
import java.util.*
class SetOTPDialogFragment : DialogFragment() {
@@ -223,13 +224,16 @@ class SetOTPDialogFragment : DialogFragment() {
val builder = AlertDialog.Builder(activity)
builder.apply {
setTitle(R.string.entry_setup_otp)
setView(root)
.setPositiveButton(android.R.string.ok) {_, _ -> }
.setNegativeButton(android.R.string.cancel) { _, _ ->
}
}
root?.findViewById<View>(R.id.otp_information)?.setOnClickListener {
UriUtil.gotoUrl(activity, R.string.otp_explanation_url)
}
return builder.create()
}
return super.onCreateDialog(savedInstanceState)

View File

@@ -30,6 +30,30 @@
android:importantForAutofill="noExcludeDescendants"
tools:targetApi="o">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/otp_information"
android:text="@string/entry_setup_otp"
style="@style/KeepassDXStyle.TextAppearance.Large"/>
<ImageView
android:id="@+id/otp_information"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/ic_info_white_24dp"
style="@style/KeepassDXStyle.ImageButton.Simple"
android:contentDescription="@string/content_description_otp_information"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/setup_otp_type_message"
android:layout_width="match_parent"

View File

@@ -35,6 +35,7 @@
<string name="homepage_url" translatable="false">https://www.keepassdx.com</string>
<string name="issues_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/issues</string>
<string name="credentials_explanation_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/wiki/Credentials</string>
<string name="otp_explanation_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/wiki/OTP</string>
<string name="advanced_unlock_explanation_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/wiki/Advanced-Unlocking</string>
<string name="magic_keyboard_explanation_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/wiki/Magikeyboard</string>
<string name="clipboard_explanation_url" translatable="false">https://github.com/Kunzisoft/KeePassDX/wiki/Clipboard</string>

View File

@@ -53,6 +53,7 @@
<string name="content_description_add_item">Add item</string>
<string name="content_description_file_information">File info</string>
<string name="content_description_credentials_information">Credentials info</string>
<string name="content_description_otp_information">One-time password info</string>
<string name="content_description_password_checkbox">Password checkbox</string>
<string name="content_description_keyfile_checkbox">Keyfile checkbox</string>
<string name="content_description_repeat_toggle_password_visibility">Repeat toggle password visibility</string>