BIT-541 Adding the icons for Apple and Android (#668)

This commit is contained in:
Oleg Semenenko 2024-01-18 13:23:20 -06:00 committed by Álison Fernandes
parent 53c2823141
commit e7a5cb86f3
4 changed files with 39 additions and 4 deletions

View file

@ -102,11 +102,11 @@ fun List<LoginUriView>?.toLoginIconData(
?: return localIconData
if (uri.startsWith(ANDROID_URI)) {
return IconData.Local(R.drawable.ic_settings)
return IconData.Local(R.drawable.ic_android)
}
if (uri.startsWith(IOS_URI)) {
return IconData.Local(R.drawable.ic_settings)
return IconData.Local(R.drawable.ic_ios)
}
if (isIconLoadingDisabled) {

View file

@ -0,0 +1,22 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M2,2h20v20h-20z"/>
<path
android:pathData="M4.776,8.479C4.432,8.479 4.139,8.599 3.899,8.839C3.659,9.079 3.539,9.368 3.539,9.704V14.873C3.539,15.218 3.659,15.51 3.899,15.75C4.139,15.991 4.432,16.111 4.776,16.111C5.121,16.111 5.411,15.991 5.648,15.75C5.884,15.51 6.003,15.218 6.003,14.873V9.704C6.003,9.368 5.882,9.079 5.642,8.839C5.402,8.599 5.113,8.479 4.776,8.479Z"
android:fillColor="#000000"/>
<path
android:pathData="M14.729,3.839L15.582,2.265C15.638,2.16 15.618,2.08 15.522,2.024C15.418,1.976 15.338,2 15.282,2.096L14.416,3.683C13.655,3.346 12.85,3.178 12,3.178C11.151,3.178 10.346,3.346 9.584,3.683L8.719,2.096C8.663,2 8.583,1.976 8.479,2.024C8.382,2.081 8.363,2.16 8.419,2.265L9.272,3.839C8.407,4.28 7.718,4.895 7.205,5.684C6.692,6.474 6.436,7.336 6.436,8.274H17.553C17.553,7.337 17.296,6.474 16.784,5.684C16.271,4.895 15.586,4.28 14.729,3.839ZM9.795,6.129C9.702,6.221 9.592,6.267 9.464,6.267C9.336,6.267 9.228,6.221 9.14,6.129C9.051,6.036 9.007,5.927 9.007,5.798C9.007,5.67 9.051,5.56 9.14,5.468C9.228,5.376 9.336,5.33 9.464,5.33C9.592,5.33 9.702,5.376 9.795,5.468C9.887,5.56 9.933,5.67 9.933,5.798C9.933,5.926 9.887,6.036 9.795,6.129ZM14.861,6.129C14.772,6.221 14.664,6.267 14.536,6.267C14.408,6.267 14.298,6.221 14.205,6.129C14.113,6.036 14.067,5.927 14.067,5.798C14.067,5.67 14.113,5.56 14.205,5.468C14.298,5.376 14.408,5.33 14.536,5.33C14.664,5.33 14.772,5.376 14.861,5.468C14.949,5.56 14.993,5.67 14.993,5.798C14.993,5.926 14.949,6.036 14.861,6.129Z"
android:fillColor="#000000"/>
<path
android:pathData="M6.483,16.711C6.483,17.08 6.611,17.393 6.868,17.649C7.124,17.905 7.436,18.033 7.805,18.033H8.695L8.707,20.762C8.707,21.107 8.827,21.399 9.067,21.64C9.308,21.88 9.596,22 9.933,22C10.277,22 10.569,21.88 10.81,21.64C11.05,21.399 11.17,21.107 11.17,20.762V18.034H12.829V20.762C12.829,21.107 12.949,21.399 13.19,21.64C13.43,21.88 13.722,22 14.067,22C14.411,22 14.704,21.88 14.944,21.64C15.185,21.399 15.305,21.107 15.305,20.762V18.034H16.206C16.567,18.034 16.875,17.906 17.132,17.649C17.388,17.393 17.516,17.081 17.516,16.712V8.707H6.483V16.711Z"
android:fillColor="#000000"/>
<path
android:pathData="M19.224,8.479C18.887,8.479 18.599,8.597 18.358,8.833C18.118,9.07 17.998,9.36 17.998,9.704V14.873C17.998,15.218 18.118,15.51 18.358,15.75C18.599,15.991 18.887,16.111 19.224,16.111C19.568,16.111 19.861,15.991 20.101,15.75C20.341,15.51 20.462,15.218 20.462,14.873V9.704C20.462,9.36 20.341,9.07 20.101,8.833C19.861,8.597 19.568,8.479 19.224,8.479Z"
android:fillColor="#000000"/>
</group>
</vector>

View file

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M4,2h16.846v20h-16.846z"/>
<path
android:pathData="M20.493,17.586C20.191,18.285 19.833,18.928 19.418,19.519C18.853,20.326 18.39,20.883 18.033,21.193C17.48,21.702 16.887,21.962 16.253,21.977C15.797,21.977 15.248,21.848 14.608,21.585C13.967,21.323 13.377,21.193 12.838,21.193C12.273,21.193 11.666,21.323 11.018,21.585C10.368,21.848 9.845,21.985 9.445,21.998C8.836,22.024 8.229,21.756 7.624,21.193C7.238,20.856 6.754,20.279 6.175,19.46C5.554,18.586 5.043,17.573 4.643,16.417C4.215,15.169 4,13.96 4,12.79C4,11.45 4.29,10.294 4.87,9.325C5.326,8.547 5.932,7.933 6.691,7.483C7.45,7.032 8.271,6.802 9.154,6.788C9.637,6.788 10.271,6.937 11.059,7.231C11.844,7.526 12.348,7.675 12.569,7.675C12.735,7.675 13.295,7.5 14.245,7.152C15.143,6.829 15.901,6.695 16.522,6.748C18.205,6.883 19.469,7.547 20.309,8.742C18.805,9.654 18.06,10.931 18.075,12.569C18.088,13.845 18.551,14.907 19.461,15.75C19.874,16.142 20.334,16.444 20.846,16.659C20.735,16.981 20.618,17.29 20.493,17.586ZM16.634,2.4C16.634,3.4 16.269,4.334 15.54,5.199C14.661,6.226 13.598,6.82 12.445,6.726C12.431,6.606 12.422,6.48 12.422,6.347C12.422,5.387 12.84,4.36 13.582,3.519C13.953,3.094 14.424,2.74 14.996,2.458C15.566,2.18 16.106,2.026 16.613,2C16.628,2.134 16.634,2.267 16.634,2.4Z"
android:fillColor="#000000"/>
</group>
</vector>

View file

@ -328,7 +328,7 @@ class VaultDataExtensionsTest {
baseIconUrl = Environment.Us.environmentUrlData.baseIconUrl,
)
val expected = IconData.Local(iconRes = R.drawable.ic_settings)
val expected = IconData.Local(iconRes = R.drawable.ic_android)
assertEquals(expected, actual)
}
@ -347,7 +347,7 @@ class VaultDataExtensionsTest {
baseIconUrl = Environment.Us.environmentUrlData.baseIconUrl,
)
val expected = IconData.Local(iconRes = R.drawable.ic_settings)
val expected = IconData.Local(iconRes = R.drawable.ic_ios)
assertEquals(expected, actual)
}