mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Replace illustration for mailbox problem
This commit is contained in:
5
briar-android/artwork/ic_exclamation_mark.svg
Normal file
5
briar-android/artwork/ic_exclamation_mark.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="91" height="90" viewBox="0 0 91 90" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M43.7972 23.7552C43.7972 22.844 44.5359 22.1052 45.4472 22.1052C46.3584 22.1052 47.0972 22.844 47.0972 23.7552V50.8604C47.0972 51.7717 46.3584 52.5104 45.4472 52.5104C44.5359 52.5104 43.7972 51.7717 43.7972 50.8604V23.7552Z" fill="#FBBF24"/>
|
||||
<path d="M43.7972 61.4861C43.7972 60.5749 44.5359 59.8361 45.4472 59.8361C46.3584 59.8361 47.0972 60.5749 47.0972 61.4861V61.7552C47.0972 62.6665 46.3584 63.4052 45.4472 63.4052C44.5359 63.4052 43.7972 62.6665 43.7972 61.7552V61.4861Z" fill="#FBBF24"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M89.4004 45C89.4004 69.3005 69.7009 89 45.4004 89C21.0999 89 1.40039 69.3005 1.40039 45C1.40039 20.6995 21.0999 1 45.4004 1C69.7009 1 89.4004 20.6995 89.4004 45ZM86.1004 45C86.1004 67.478 67.8784 85.7 45.4004 85.7C22.9224 85.7 4.70039 67.478 4.70039 45C4.70039 22.522 22.9224 4.3 45.4004 4.3C67.8784 4.3 86.1004 22.522 86.1004 45Z" fill="#FBBF24"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1005 B |
@@ -1,7 +1,6 @@
|
||||
package org.briarproject.briar.android.mailbox;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@@ -21,7 +20,6 @@ import org.briarproject.nullsafety.ParametersNotNullByDefault;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.annotation.ColorRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
@@ -33,8 +31,6 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
import static android.view.View.GONE;
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static androidx.core.content.ContextCompat.getColor;
|
||||
import static androidx.core.widget.ImageViewCompat.setImageTintList;
|
||||
import static androidx.transition.TransitionManager.beginDelayedTransition;
|
||||
import static org.briarproject.bramble.api.mailbox.MailboxConstants.API_CLIENT_TOO_OLD;
|
||||
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
|
||||
@@ -141,24 +137,20 @@ public class MailboxStatusFragment extends Fragment {
|
||||
}
|
||||
|
||||
private void onMailboxStateChanged(MailboxStatus status) {
|
||||
@ColorRes int tintRes;
|
||||
@DrawableRes int iconRes;
|
||||
String title;
|
||||
String message = null;
|
||||
if (status.hasProblem(System.currentTimeMillis())) {
|
||||
tintRes = R.color.briar_red_500;
|
||||
title = getString(R.string.mailbox_status_failure_title);
|
||||
iconRes = R.drawable.ic_error;
|
||||
showUnlinkWarning = false;
|
||||
wizardButton.setVisibility(VISIBLE);
|
||||
} else if (status.getAttemptsSinceSuccess() > 0) {
|
||||
iconRes = R.drawable.ic_help_outline_white;
|
||||
iconRes = R.drawable.ic_exclamation_mark;
|
||||
title = getString(R.string.mailbox_status_problem_title);
|
||||
tintRes = R.color.briar_orange_500;
|
||||
showUnlinkWarning = false;
|
||||
wizardButton.setVisibility(VISIBLE);
|
||||
} else if (status.getMailboxCompatibility() < 0) {
|
||||
tintRes = R.color.briar_red_500;
|
||||
if (status.getMailboxCompatibility() == API_CLIENT_TOO_OLD) {
|
||||
title = getString(R.string.mailbox_status_app_too_old_title);
|
||||
message =
|
||||
@@ -175,13 +167,10 @@ public class MailboxStatusFragment extends Fragment {
|
||||
} else {
|
||||
iconRes = R.drawable.ic_check_circle;
|
||||
title = getString(R.string.mailbox_status_connected_title);
|
||||
tintRes = R.color.briar_brand_green;
|
||||
showUnlinkWarning = true;
|
||||
wizardButton.setVisibility(GONE);
|
||||
}
|
||||
imageView.setImageResource(iconRes);
|
||||
int color = getColor(requireContext(), tintRes);
|
||||
setImageTintList(imageView, ColorStateList.valueOf(color));
|
||||
statusTitleView.setText(title);
|
||||
if (message == null) {
|
||||
statusMessageView.setVisibility(GONE);
|
||||
|
||||
16
briar-android/src/main/res/drawable/ic_exclamation_mark.xml
Normal file
16
briar-android/src/main/res/drawable/ic_exclamation_mark.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="90dp"
|
||||
android:height="90dp"
|
||||
android:viewportWidth="91"
|
||||
android:viewportHeight="90">
|
||||
<path
|
||||
android:fillColor="@color/il_orange"
|
||||
android:pathData="M43.797,23.755C43.797,22.844 44.536,22.105 45.447,22.105C46.358,22.105 47.097,22.844 47.097,23.755V50.86C47.097,51.772 46.358,52.51 45.447,52.51C44.536,52.51 43.797,51.772 43.797,50.86V23.755Z" />
|
||||
<path
|
||||
android:fillColor="@color/il_orange"
|
||||
android:pathData="M43.797,61.486C43.797,60.575 44.536,59.836 45.447,59.836C46.358,59.836 47.097,60.575 47.097,61.486V61.755C47.097,62.667 46.358,63.405 45.447,63.405C44.536,63.405 43.797,62.667 43.797,61.755V61.486Z" />
|
||||
<path
|
||||
android:fillColor="@color/il_orange"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M89.4,45C89.4,69.3 69.701,89 45.4,89C21.1,89 1.4,69.3 1.4,45C1.4,20.699 21.1,1 45.4,1C69.701,1 89.4,20.699 89.4,45ZM86.1,45C86.1,67.478 67.878,85.7 45.4,85.7C22.922,85.7 4.7,67.478 4.7,45C4.7,22.522 22.922,4.3 45.4,4.3C67.878,4.3 86.1,22.522 86.1,45Z" />
|
||||
</vector>
|
||||
@@ -30,5 +30,6 @@
|
||||
<color name="il_border">#64748B</color>
|
||||
<color name="il_background">#334155</color>
|
||||
<color name="il_lime">@color/briar_lime_400_new</color>
|
||||
<color name="il_orange">@color/briar_orange_400</color>
|
||||
<color name="il_red">@color/briar_red_500_new</color>
|
||||
</resources>
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
<color name="briar_blue_400">#418cd8</color>
|
||||
|
||||
<color name="briar_orange_200">#fed69f</color>
|
||||
<color name="briar_orange_400">#FBBF24</color>
|
||||
<color name="briar_orange_500">#fc9403</color>
|
||||
<color name="briar_orange_500_new">#F59E0B</color>
|
||||
|
||||
<color name="briar_red_500">#db3b21</color>
|
||||
<color name="briar_red_500_new">#EF4444</color>
|
||||
@@ -60,6 +62,7 @@
|
||||
<color name="il_border">#9CA3AF</color>
|
||||
<color name="il_background">#E5E7EB</color>
|
||||
<color name="il_lime">@color/briar_lime_600_new</color>
|
||||
<color name="il_orange">@color/briar_orange_500_new</color>
|
||||
<color name="il_red">@color/briar_red_600</color>
|
||||
|
||||
<!-- text colors -->
|
||||
|
||||
Reference in New Issue
Block a user