-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable P3 color in RN and gradients * Bump Reanimated, Skia * WIP: new UI * Fix Android build * Android fixes, add placeholder bridge fee labels * Points UI Data (#5876) * feat: insert new points data * feat: claim request * fix: cleanup smooth pager ids * Remove unused imports * Lighten separators in light mode * Fix extra space when Stack children aren't rendered Also makes the leaderboard section spacing consistent with the other sections * Claim flow improvements, card visibility tweaks * Cache remote card images, minor code cleanup * i18n, clean up InfoCard placeholders * Add i18n strings * Clean up InfoCard, notifications toggle styles * Add experimental flag, remote flag * Lower dark mode border opacity * Claim flow improvements, i18n * Hide ClaimCard for watched wallets * Make copy adjustments * Fix wallet list scroll bug This wallet list code needs more significant refactoring, but this fixes the issue that often prevents the wallet list from being scrollable * Clean up light mode styles * Add claim flow spinner, network list cleanup * claim (#5887) * Adjust spinner size, layout * fix claim * Add basic claim error state * Add missing i18n strings * Catch more error cases, use claim error UI instead of alert Replaces the "Unable to load wallet" alert with the claim error state, since the !wallet condition catches non-serious errors like Face ID failures * Speed up wallet switcher, minor code cleanup * Use more saturated green * differentiate errors * Update using default gas limit for bridge quote if it exists * Update default value in experimental config for ETH_REWARDS * Clean up Android claim flow styles * Improve copy * Improve InfoCard copy, styles * Adjust InfoCard copy: Rank → Placed * Add bridge failure error state * Fix bridge-error Done button press handler * Clean up loading skeletons --------- Co-authored-by: Christopher Howard <derhowiedesigns@gmail.com> Co-authored-by: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> Co-authored-by: Bruno Barbieri <brunobar79@gmail.com> Co-authored-by: jinchung <jin.chung17@gmail.com>
- Loading branch information
1 parent
06f5a6d
commit ae5e687
Showing
48 changed files
with
2,825 additions
and
496 deletions.
There are no files selected for viewing
Binary file modified
BIN
+1.12 MB
(140%)
android/app/src/main/assets/fonts/SF-Pro-Rounded-Black.otf
100755 → 100644
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
diff --git a/node_modules/react-native-linear-gradient/ios/BVLinearGradientLayer.m b/node_modules/react-native-linear-gradient/ios/BVLinearGradientLayer.m | ||
index bda0a1b..4a3ede4 100644 | ||
--- a/node_modules/react-native-linear-gradient/ios/BVLinearGradientLayer.m | ||
+++ b/node_modules/react-native-linear-gradient/ios/BVLinearGradientLayer.m | ||
@@ -3,6 +3,26 @@ | ||
#include <math.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
+@implementation UIColor (ColorSpace) | ||
+ | ||
+- (UIColor *)colorWithCGColorSpace:(CGColorSpaceRef)colorSpace { | ||
+ const CGFloat *components = CGColorGetComponents(self.CGColor); | ||
+ size_t count = CGColorGetNumberOfComponents(self.CGColor); | ||
+ CGFloat newComponents[count]; | ||
+ | ||
+ for (size_t i = 0; i < count; i++) { | ||
+ newComponents[i] = components[i]; | ||
+ } | ||
+ | ||
+ CGColorRef colorRef = CGColorCreate(colorSpace, newComponents); | ||
+ UIColor *color = [UIColor colorWithCGColor:colorRef]; | ||
+ CGColorRelease(colorRef); | ||
+ | ||
+ return color; | ||
+} | ||
+ | ||
+@end | ||
+ | ||
@implementation BVLinearGradientLayer | ||
|
||
- (instancetype)init | ||
@@ -182,59 +202,48 @@ - (void)drawInContext:(CGContextRef)ctx | ||
return; | ||
|
||
CGFloat *locations = nil; | ||
- | ||
locations = malloc(sizeof(CGFloat) * self.colors.count); | ||
|
||
- for (NSInteger i = 0; i < self.colors.count; i++) | ||
- { | ||
- if (self.locations.count > i) | ||
- { | ||
+ for (NSInteger i = 0; i < self.colors.count; i++) { | ||
+ if (self.locations.count > i) { | ||
locations[i] = self.locations[i].floatValue; | ||
- } | ||
- else | ||
- { | ||
+ } else { | ||
locations[i] = (1.0 / (self.colors.count - 1)) * i; | ||
} | ||
} | ||
|
||
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | ||
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceDisplayP3); | ||
NSMutableArray *colors = [[NSMutableArray alloc] initWithCapacity:self.colors.count]; | ||
+ | ||
for (UIColor *color in self.colors) { | ||
- [colors addObject:(id)color.CGColor]; | ||
+ UIColor *p3Color = [color colorWithCGColorSpace:colorSpace]; | ||
+ [colors addObject:(__bridge id)p3Color.CGColor]; | ||
} | ||
|
||
- CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFArrayRef)colors, locations); | ||
+ CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)colors, locations); | ||
|
||
free(locations); | ||
|
||
CGPoint start, end; | ||
|
||
- if (_useAngle) | ||
- { | ||
- // Angle is in bearing degrees (North = 0, East = 90) | ||
- // convert it to cartesian (N = 90, E = 0) | ||
+ if (_useAngle) { | ||
float angle = (90 - _angle); | ||
CGPoint relativeStartPoint = [BVLinearGradientLayer getGradientStartPointFromAngle:angle AndSize:size]; | ||
|
||
- // Get true angleCenter | ||
CGPoint angleCenter = CGPointMake( | ||
_angleCenter.x * size.width, | ||
_angleCenter.y * size.height | ||
); | ||
- // Translate to center on angle center | ||
- // Flip Y coordinate to convert from cartesian | ||
+ | ||
start = CGPointMake( | ||
angleCenter.x + relativeStartPoint.x, | ||
angleCenter.y - relativeStartPoint.y | ||
); | ||
- // Reflect across the center to get the end point | ||
end = CGPointMake( | ||
angleCenter.x - relativeStartPoint.x, | ||
angleCenter.y + relativeStartPoint.y | ||
); | ||
- } | ||
- else | ||
- { | ||
+ } else { | ||
start = CGPointMake(self.startPoint.x * size.width, self.startPoint.y * size.height); | ||
end = CGPointMake(self.endPoint.x * size.width, self.endPoint.y * size.height); | ||
} |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
import { Cover, useColorMode, useForegroundColor } from '@/design-system'; | ||
import { ForegroundColor } from '@/design-system/color/palettes'; | ||
import { IS_IOS } from '@/env'; | ||
|
||
export const Border = ({ | ||
borderColor = 'separatorTertiary', | ||
borderRadius, | ||
borderWidth = 1, | ||
enableInLightMode, | ||
enableOnAndroid, | ||
}: { | ||
borderColor?: ForegroundColor; | ||
borderRadius: number; | ||
borderWidth?: number; | ||
enableInLightMode?: boolean; | ||
enableOnAndroid?: boolean; | ||
}) => { | ||
const { isDarkMode } = useColorMode(); | ||
|
||
const color = useForegroundColor(borderColor); | ||
|
||
return ( | ||
(isDarkMode || enableInLightMode) && | ||
(IS_IOS || enableOnAndroid) && ( | ||
<Cover | ||
style={{ | ||
borderColor: color, | ||
borderCurve: 'continuous', | ||
borderRadius, | ||
borderWidth, | ||
overflow: 'hidden', | ||
pointerEvents: 'none', | ||
}} | ||
/> | ||
) | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.