mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Pwned: added remark
This commit is contained in:
parent
21ac49f1c4
commit
99a88bb14e
3 changed files with 33 additions and 8 deletions
|
@ -57,12 +57,21 @@ public class FragmentDialogPwned extends FragmentDialogBase {
|
|||
final Button btnCheck = dview.findViewById(R.id.btnCheck);
|
||||
final ContentLoadingProgressBar pbCheck = dview.findViewById(R.id.pbCheck);
|
||||
final ImageButton ibPwned = dview.findViewById(R.id.ibPwned);
|
||||
final TextView tvRemark = dview.findViewById(R.id.tvRemark);
|
||||
final TextView tvPrivacy = dview.findViewById(R.id.tvPrivacy);
|
||||
final Group grpReady = dview.findViewById(R.id.grpReady);
|
||||
|
||||
final int colorError = Helper.resolveColor(context, androidx.appcompat.R.attr.colorError);
|
||||
final int colorVerified = Helper.resolveColor(context, R.attr.colorVerified);
|
||||
|
||||
tvCaption.getPaint().setUnderlineText(true);
|
||||
tvCaption.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.view(v.getContext(), Uri.parse(BuildConfig.PWNED_URI + "Passwords"), true);
|
||||
}
|
||||
});
|
||||
|
||||
btnCheck.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -140,18 +149,14 @@ public class FragmentDialogPwned extends FragmentDialogBase {
|
|||
ibPwned.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.view(v.getContext(), Uri.parse(BuildConfig.PWNED_URI), true);
|
||||
Helper.view(v.getContext(), Uri.parse(BuildConfig.PWNED_URI + "Passwords"), true);
|
||||
}
|
||||
});
|
||||
|
||||
pbCheck.setVisibility(View.GONE);
|
||||
grpReady.setVisibility(View.GONE);
|
||||
|
||||
tvCaption.getPaint().setUnderlineText(true);
|
||||
tvCaption.setOnClickListener(new View.OnClickListener() {
|
||||
tvRemark.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.view(v.getContext(), Uri.parse(BuildConfig.PWNED_URI), true);
|
||||
Helper.view(v.getContext(), Uri.parse("https://en.wikipedia.org/wiki/K-anonymity"), true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -163,6 +168,9 @@ public class FragmentDialogPwned extends FragmentDialogBase {
|
|||
}
|
||||
});
|
||||
|
||||
pbCheck.setVisibility(View.GONE);
|
||||
grpReady.setVisibility(View.GONE);
|
||||
|
||||
return new AlertDialog.Builder(context)
|
||||
.setView(dview)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
|
|
|
@ -68,6 +68,22 @@
|
|||
app:layout_constraintTop_toTopOf="@id/btnCheck"
|
||||
app:srcCompat="@drawable/twotone_info_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRemark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableEnd="@drawable/twotone_info_24"
|
||||
android:drawablePadding="6dp"
|
||||
android:drawableTint="?attr/colorWarning"
|
||||
android:text="@string/title_pawned_remark"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
android:textStyle="italic"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCheck" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPrivacy"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -80,7 +96,7 @@
|
|||
android:textColor="?android:attr/textColorLink"
|
||||
app:drawableTint="?android:attr/textColorLink"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnCheck" />
|
||||
app:layout_constraintTop_toBottomOf="@id/tvRemark" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/grpReady"
|
||||
|
|
|
@ -1962,6 +1962,7 @@
|
|||
<string name="title_force_sync">Force sync</string>
|
||||
<string name="title_force_send">Force send</string>
|
||||
<string name="title_pawned" translatable="false">Have I been pwned?</string>
|
||||
<string name="title_pawned_remark">This will check the password, without sending it (using k-anonymization), and not the email address!</string>
|
||||
|
||||
<string name="title_language_all">All</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue