mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add apple login logo to button
This commit is contained in:
parent
66a5c21b96
commit
028af7d699
5 changed files with 56 additions and 12 deletions
|
|
@ -39,7 +39,7 @@ fun GoogleAuthButton(viewModel: LoginViewModel) {
|
|||
}
|
||||
}
|
||||
|
||||
GoogleSignInButton(
|
||||
LoadingButtonWithIcon(
|
||||
text = "Continue with Google",
|
||||
loadingText = "Signing in...",
|
||||
isLoading = viewModel.isLoading,
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ package app.omnivore.omnivore.ui.auth
|
|||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.material.Surface
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -14,17 +13,16 @@ import androidx.compose.ui.graphics.Shape
|
|||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@ExperimentalMaterialApi
|
||||
@Composable
|
||||
fun GoogleSignInButton(
|
||||
fun LoadingButtonWithIcon(
|
||||
text: String,
|
||||
loadingText: String = "Signing in...",
|
||||
loadingText: String,
|
||||
icon: Painter,
|
||||
isLoading: Boolean = false,
|
||||
shape: Shape = Shapes().medium,
|
||||
borderColor: Color = Color.LightGray,
|
||||
backgroundColor: Color = MaterialTheme.colors.surface,
|
||||
progressIndicatorColor: Color = MaterialTheme.colors.primary,
|
||||
backgroundColor: Color = MaterialTheme.colorScheme.surface,
|
||||
progressIndicatorColor: Color = MaterialTheme.colorScheme.primary,
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
Surface(
|
||||
|
|
@ -12,7 +12,6 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.onFocusEvent
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
|
|
@ -73,9 +72,12 @@ fun WelcomeScreenContent(viewModel: LoginViewModel, navController: NavHostContro
|
|||
GoogleAuthButton(viewModel)
|
||||
}
|
||||
|
||||
AppleSignInButton(painterResource(id = R.drawable.ic_logo_google)) {
|
||||
// Fill in later...
|
||||
}
|
||||
LoadingButtonWithIcon(
|
||||
text = "Continue with Apple",
|
||||
loadingText = "Signing in...",
|
||||
icon = painterResource(id = R.drawable.ic_logo_apple),
|
||||
onClick = {}
|
||||
)
|
||||
|
||||
ContinueWithEmailButton(navController)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M21.281,18.424C20.933,19.228 20.521,19.967 20.044,20.647C19.394,21.574 18.861,22.216 18.451,22.572C17.815,23.157 17.134,23.457 16.404,23.474C15.88,23.474 15.248,23.325 14.513,23.022C13.775,22.721 13.097,22.572 12.477,22.572C11.827,22.572 11.129,22.721 10.383,23.022C9.636,23.325 9.035,23.482 8.574,23.498C7.875,23.528 7.177,23.22 6.481,22.572C6.037,22.185 5.481,21.52 4.815,20.579C4.101,19.574 3.513,18.408 3.053,17.08C2.56,15.644 2.313,14.254 2.313,12.909C2.313,11.367 2.646,10.038 3.313,8.924C3.838,8.029 4.535,7.323 5.408,6.805C6.281,6.287 7.224,6.023 8.24,6.006C8.796,6.006 9.525,6.178 10.431,6.516C11.334,6.855 11.914,7.027 12.168,7.027C12.358,7.027 13.002,6.826 14.095,6.425C15.127,6.053 15.999,5.899 16.713,5.96C18.648,6.116 20.102,6.879 21.069,8.253C19.338,9.302 18.482,10.77 18.499,12.654C18.515,14.122 19.047,15.343 20.094,16.313C20.568,16.763 21.097,17.111 21.687,17.358C21.559,17.728 21.424,18.083 21.281,18.424ZM16.843,0.96C16.843,2.11 16.422,3.184 15.585,4.178C14.574,5.36 13.351,6.043 12.025,5.935C12.008,5.797 11.999,5.652 11.999,5.5C11.999,4.395 12.479,3.213 13.333,2.247C13.759,1.758 14.301,1.351 14.959,1.027C15.615,0.707 16.235,0.53 16.818,0.5C16.835,0.654 16.843,0.808 16.843,0.96V0.96Z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="129dp"
|
||||
android:height="26dp"
|
||||
android:viewportWidth="129"
|
||||
android:viewportHeight="26">
|
||||
<path
|
||||
android:pathData="M43.71,13.11C43.71,9.58 41.52,7.57 38.66,7.57C35.78,7.57 33.61,9.58 33.61,13.11C33.61,16.63 35.78,18.66 38.66,18.66C41.52,18.66 43.71,16.64 43.71,13.11ZM41.4,13.11C41.4,15.4 40.31,16.64 38.66,16.64C37,16.64 35.92,15.4 35.92,13.11C35.92,10.83 37,9.59 38.66,9.59C40.31,9.59 41.4,10.83 41.4,13.11Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M47.63,7.72V18.51H49.84V11.46H49.93L52.72,18.46H54.23L57.02,11.49H57.11V18.51H59.32V7.72H56.51L53.54,14.97H53.41L50.44,7.72H47.63Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M72.45,7.72H70.18V14.5H70.09L65.43,7.72H63.43V18.51H65.71V11.72H65.79L70.48,18.51H72.45V7.72Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M78.84,7.72H76.56V18.51H78.84V7.72Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M84.9,7.72H82.36L86.09,18.51H89.03L92.75,7.72H90.22L87.6,15.92H87.5L84.9,7.72Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M105.58,13.11C105.58,9.58 103.39,7.57 100.52,7.57C97.65,7.57 95.47,9.58 95.47,13.11C95.47,16.63 97.65,18.66 100.52,18.66C103.39,18.66 105.58,16.64 105.58,13.11ZM103.26,13.11C103.26,15.4 102.18,16.64 100.52,16.64C98.86,16.64 97.78,15.4 97.78,13.11C97.78,10.83 98.86,9.59 100.52,9.59C102.18,9.59 103.26,10.83 103.26,13.11Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M109.49,18.51H111.77V14.68H113.44L115.48,18.51H118L115.71,14.31C116.94,13.79 117.62,12.72 117.62,11.24C117.62,9.1 116.2,7.72 113.75,7.72H109.49V18.51ZM111.77,12.85V9.58H113.31C114.63,9.58 115.27,10.17 115.27,11.24C115.27,12.31 114.63,12.85 113.32,12.85H111.77Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M121.45,18.51H128.75V16.63H123.74V14.05H128.35V12.17H123.74V9.6H128.73V7.72H121.45V18.51Z"
|
||||
android:fillColor="#3D3D3D"/>
|
||||
<path
|
||||
android:pathData="M8.72,17.73V10.37C8.72,9.74 9.46,9.39 9.95,9.82L12.22,13.14C12.69,13.52 13.34,13.52 13.81,13.14L16.03,9.85C16.52,9.44 17.26,9.77 17.26,10.4V14.29C17.26,16.17 18.52,17.71 20.41,17.71H20.46C22.07,17.71 23.47,16.61 23.85,15.05C24.04,14.23 24.21,13.38 24.21,12.73C24.18,6.29 18.74,1.42 12.22,1.86C6.69,2.24 2.23,6.7 1.85,12.23C1.41,18.75 6.56,24.19 13.02,24.19"
|
||||
android:strokeWidth="2.18182"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#3D3D3D"/>
|
||||
</vector>
|
||||
Loading…
Reference in a new issue