[IMPROVEMENT] Customize Sign in with Apple button (#2420)

This commit is contained in:
Diego Mello 2020-08-21 16:22:29 -03:00 committed by GitHub
parent 7813ed3b28
commit 51d914eccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 20 deletions

View File

@ -326,18 +326,6 @@ class LoginServices extends React.PureComponent {
break;
}
if (name === 'apple') {
return (
<AppleAuthentication.AppleAuthenticationButton
buttonType={AppleAuthentication.AppleAuthenticationButtonType.CONTINUE}
buttonStyle={theme === 'light' ? AppleAuthentication.AppleAuthenticationButtonStyle.BLACK : AppleAuthentication.AppleAuthenticationButtonStyle.WHITE}
cornerRadius={BORDER_RADIUS}
style={[styles.serviceButton, { height: BUTTON_HEIGHT }]}
onPress={onPress}
/>
);
}
name = name.charAt(0).toUpperCase() + name.slice(1);
let buttonText;
if (isSaml || (service.service === 'cas' && CAS_enabled)) {
@ -362,7 +350,7 @@ class LoginServices extends React.PureComponent {
underlayColor={themes[theme].buttonText}
>
<View style={styles.serviceButtonContainer}>
{service.authType === 'oauth' ? <CustomIcon name={icon} size={24} color={themes[theme].titleText} style={styles.serviceIcon} /> : null}
{service.authType === 'oauth' || service.authType === 'apple' ? <CustomIcon name={icon} size={24} color={themes[theme].titleText} style={styles.serviceIcon} /> : null}
<Text style={[styles.serviceText, { color: themes[theme].titleText }]}>{buttonText}</Text>
</View>
</Touch>

File diff suppressed because one or more lines are too long

View File

@ -37,8 +37,8 @@
50046CB6BDA69B9232CF66D9 /* libPods-RocketChatRN.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C235DC7B31A4D1578EDEF219 /* libPods-RocketChatRN.a */; };
7A006F14229C83B600803143 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7A006F13229C83B600803143 /* GoogleService-Info.plist */; };
7A0D62D2242AB187006D5C06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7A0D62D1242AB187006D5C06 /* LaunchScreen.storyboard */; };
7A51A3EB24ED97DE00B08334 /* custom.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7A51A3EA24ED97DE00B08334 /* custom.ttf */; };
7A51A3EC24ED97DE00B08334 /* custom.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7A51A3EA24ED97DE00B08334 /* custom.ttf */; };
7A3268F624F04FFE0050E241 /* custom.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7A3268F524F04FFE0050E241 /* custom.ttf */; };
7A3268F724F04FFE0050E241 /* custom.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7A3268F524F04FFE0050E241 /* custom.ttf */; };
7AAA749E23043B1E00F1ADE9 /* Watermelon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAA749D23043B1E00F1ADE9 /* Watermelon.swift */; };
7AC99C1C2339361F0000A0CB /* Watermelon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAA749D23043B1E00F1ADE9 /* Watermelon.swift */; };
7ACD4897222860DE00442C55 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7ACD4853222860DE00442C55 /* JavaScriptCore.framework */; };
@ -125,7 +125,7 @@
66D6B1D0567051BE541450C9 /* Pods-RocketChatRN.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RocketChatRN.release.xcconfig"; path = "Pods/Target Support Files/Pods-RocketChatRN/Pods-RocketChatRN.release.xcconfig"; sourceTree = "<group>"; };
7A006F13229C83B600803143 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
7A0D62D1242AB187006D5C06 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
7A51A3EA24ED97DE00B08334 /* custom.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = custom.ttf; sourceTree = "<group>"; };
7A3268F524F04FFE0050E241 /* custom.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = custom.ttf; sourceTree = "<group>"; };
7AAA749C23043B1D00F1ADE9 /* RocketChatRN-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RocketChatRN-Bridging-Header.h"; sourceTree = "<group>"; };
7AAA749D23043B1E00F1ADE9 /* Watermelon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Watermelon.swift; sourceTree = "<group>"; };
7ACD4853222860DE00442C55 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
@ -285,7 +285,7 @@
AF5E16F0398347E6A80C8CBE /* Resources */ = {
isa = PBXGroup;
children = (
7A51A3EA24ED97DE00B08334 /* custom.ttf */,
7A3268F524F04FFE0050E241 /* custom.ttf */,
);
name = Resources;
sourceTree = "<group>";
@ -481,7 +481,7 @@
buildActionMask = 2147483647;
files = (
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
7A51A3EB24ED97DE00B08334 /* custom.ttf in Resources */,
7A3268F624F04FFE0050E241 /* custom.ttf in Resources */,
7A006F14229C83B600803143 /* GoogleService-Info.plist in Resources */,
7A0D62D2242AB187006D5C06 /* LaunchScreen.storyboard in Resources */,
);
@ -492,7 +492,7 @@
buildActionMask = 2147483647;
files = (
1EDDE57A22DFAD8E0078F69D /* Images.xcassets in Resources */,
7A51A3EC24ED97DE00B08334 /* custom.ttf in Resources */,
7A3268F724F04FFE0050E241 /* custom.ttf in Resources */,
1EC6ACB722CB9FC300A41C61 /* MainInterface.storyboard in Resources */,
1ED59D4C22CBA77D00C54289 /* GoogleService-Info.plist in Resources */,
);

Binary file not shown.

Binary file not shown.