diff --git a/.github/workflows/SwiftLint.yml b/.github/workflows/SwiftLint.yml index 856ec4476..1840516a1 100644 --- a/.github/workflows/SwiftLint.yml +++ b/.github/workflows/SwiftLint.yml @@ -22,5 +22,5 @@ jobs: # Fetch changes from the base branch of the pull request git fetch origin ${{ github.base_ref }} # Use git diff to find changed Swift files, then lint each file with SwiftLint - git diff --name-only origin/${{ github.base_ref }} | grep '\.swift$' | xargs swiftlint lint + git diff --name-only origin/${{ github.base_ref }} | grep '\.swift$' | xargs swiftlint --config dydx/.swiftlint.yml --fix lint diff --git a/PlatformUI/PlatformUI/Components/ComboBox/ComboBox.swift b/PlatformUI/PlatformUI/Components/ComboBox/ComboBox.swift index 4a995665c..cb722a3bd 100644 --- a/PlatformUI/PlatformUI/Components/ComboBox/ComboBox.swift +++ b/PlatformUI/PlatformUI/Components/ComboBox/ComboBox.swift @@ -59,7 +59,7 @@ public class ComboBoxModel: PlatformViewModel { trailing: trailing) .createView(parentStyle: style) .themeColor(background: .layer4) - .cornerRadius(12) + .borderAndClip(style: .cornerRadius(12), borderColor: .borderDefault, lineWidth: 1) .onTapGesture { [weak self] in self?.onTapAction?() } diff --git a/PlatformUI/PlatformUI/Components/TabGroup/TabItemViewModel.swift b/PlatformUI/PlatformUI/Components/TabGroup/TabItemViewModel.swift index d19e73800..7de5633ee 100644 --- a/PlatformUI/PlatformUI/Components/TabGroup/TabItemViewModel.swift +++ b/PlatformUI/PlatformUI/Components/TabGroup/TabItemViewModel.swift @@ -56,8 +56,8 @@ public class TabItemViewModel: PlatformViewModel, Equatable { case .text(let value): return Text(value) .themeFont(fontSize: .small) - .padding(.vertical, 6) - .padding(.horizontal, 8) + .padding([.bottom, .top], 8) + .padding([.leading, .trailing], 12) .themeStyle(styleKey: styleKey, parentStyle: style) .borderAndClip(style: .capsule, borderColor: .layer6, lineWidth: borderWidth) .wrappedInAnyView() @@ -66,7 +66,7 @@ public class TabItemViewModel: PlatformViewModel, Equatable { size: CGSize(width: 18, height: 18), templateColor: templateColor) .createView(parentStyle: parentStyle) - .padding([.bottom, .top], 6) + .padding([.bottom, .top], 8) .padding([.leading, .trailing], 12) .themeStyle(styleKey: styleKey, parentStyle: style) .borderAndClip(style: .capsule, borderColor: .layer6, lineWidth: borderWidth) @@ -81,8 +81,8 @@ public class TabItemViewModel: PlatformViewModel, Equatable { } .frame(maxWidth: .infinity) return AnyView(content) + } - } } } diff --git a/dydx/dydxPresenters/dydxPresenters/_v4/Error/dydxTradeRestrictedViewPresenter.swift b/dydx/dydxPresenters/dydxPresenters/_v4/Error/dydxTradeRestrictedViewPresenter.swift index 8b61d2f67..082211ef3 100644 --- a/dydx/dydxPresenters/dydxPresenters/_v4/Error/dydxTradeRestrictedViewPresenter.swift +++ b/dydx/dydxPresenters/dydxPresenters/_v4/Error/dydxTradeRestrictedViewPresenter.swift @@ -62,7 +62,7 @@ public class dydxTradeRestrictedViewModel: PlatformViewModel { return AnyView( ZStack(alignment: .bottom) { - ThemeColor.SemanticColor.layer0.color + ThemeColor.SemanticColor.layer1.color .opacity(0.8) VStack(alignment: .leading, spacing: 16) { HStack(spacing: 0) { diff --git a/dydx/dydxViews/dydxViews/Shared/PlaceholderView.swift b/dydx/dydxViews/dydxViews/Shared/PlaceholderView.swift index 07be21391..a9d053f5e 100644 --- a/dydx/dydxViews/dydxViews/Shared/PlaceholderView.swift +++ b/dydx/dydxViews/dydxViews/Shared/PlaceholderView.swift @@ -38,7 +38,7 @@ public class PlaceholderViewModel: PlatformViewModel { PlatformTableViewCellViewModel(main: main) .createView(parentStyle: style) .frame(width: UIScreen.main.bounds.width - 32) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(16) ) } diff --git a/dydx/dydxViews/dydxViews/Themes/ThemeDark.json b/dydx/dydxViews/dydxViews/Themes/ThemeDark.json index 8205eb2e9..612cbb84b 100644 --- a/dydx/dydxViews/dydxViews/Themes/ThemeDark.json +++ b/dydx/dydxViews/dydxViews/Themes/ThemeDark.json @@ -8,11 +8,11 @@ "layer_0": "#000000", "layer_1": "#18181B", "layer_2": "#0C0C0D", - "layer_3": "#18181B", - "layer_4": "#252528", - "layer_5": "#313135", - "layer_6": "#3D3D42", - "layer_7": "#494950", + "layer_3": "#212124", + "layer_4": "#303033", + "layer_5": "#3B3B3F", + "layer_6": "#494950", + "layer_7": "#56565C", "color_purple": "#7774FF", "color_green": "#1AFFB9", @@ -25,15 +25,15 @@ "color_faded_red": "#FF5C5C29", "color_faded_yellow": "#FFCC4829", - "border_default": "#313135", - "border_destructive": "#FF616133", - "border_button": "#7774FF", + "border_default": "#494950", + "border_destructive": "#FF5C5C33", + "border_button": "#FFFFFF", "gradient_gray_start": "#313135", "gradient_gray_end": "#18181B", - "gradient_green_start": "#17332C", + "gradient_green_start": "#17332C29", "gradient_green_end": "#313135", - "gradient_red_start": "#331A1A", + "gradient_red_start": "#331A1A29", "gradient_red_end": "#313135" } }, diff --git a/dydx/dydxViews/dydxViews/Themes/ThemeLight.json b/dydx/dydxViews/dydxViews/Themes/ThemeLight.json index c40e0a0f9..a44ead89a 100644 --- a/dydx/dydxViews/dydxViews/Themes/ThemeLight.json +++ b/dydx/dydxViews/dydxViews/Themes/ThemeLight.json @@ -6,34 +6,34 @@ "text_tertiary": "#737373", "layer_0": "#FFFFFF", - "layer_1": "#EDF0F2", - "layer_2": "#F9FAFB", - "layer_3": "#EDF0F2", + "layer_1": "#E9ECEE", + "layer_2": "#FFFFFF", + "layer_3": "#F7F8FA", "layer_4": "#FFFFFF", - "layer_5": "#E0E6EB", - "layer_6": "#D1D9E0", - "layer_7": "#C2CCD6", + "layer_5": "#EDF0F2", + "layer_6": "#D5DADF", + "layer_7": "#C2CBD3", - "color_purple": "#6966FF", + "color_purple": "#7774FF", "color_green": "#2CCC98", "color_yellow": "#FFCC48", "color_red": "#E76565", "color_black": "#000000", "color_white": "#FFFFFF", - "color_faded_purple": "#6966FF29", + "color_faded_purple": "#7774FF29", "color_faded_green": "#2CCC9829", "color_faded_red": "#E7656529", "color_faded_yellow": "#FFCC4829", "border_default": "#D1D9E0", - "border_destructive": "#E7656529", + "border_destructive": "#E7656533", "border_button": "#7774FF", "gradient_gray_start": "#F0F2F5", "gradient_gray_end": "#D1D9E0", - "gradient_green_start": "#D8F3EB", + "gradient_green_start": "#D8F3EB29", "gradient_green_end": "#E7EBEE", - "gradient_red_start": "#FAE2E2", + "gradient_red_start": "#FAE2E229", "gradient_red_end": "#E7EBEE" } }, diff --git a/dydx/dydxViews/dydxViews/Themes/dydxStyle.json b/dydx/dydxViews/dydxViews/Themes/dydxStyle.json index ffef10711..dead98332 100644 --- a/dydx/dydxViews/dydxViews/Themes/dydxStyle.json +++ b/dydx/dydxViews/dydxViews/Themes/dydxStyle.json @@ -62,8 +62,8 @@ "_textColor": "text_primary" }, "pill_tab_group_unselected_item": { - "_textColor": "text_tertiary", - "_layerColor": "layer_4" + "_textColor": "text_secondary", + "_layerColor": "layer_5" }, "pill_tab_group_selected_item": { "_textColor": "text_primary", diff --git a/dydx/dydxViews/dydxViews/_v4/Markets/Components/dydxMarketAssetItemView.swift b/dydx/dydxViews/dydxViews/_v4/Markets/Components/dydxMarketAssetItemView.swift index 2ad8695a5..f7271e342 100644 --- a/dydx/dydxViews/dydxViews/_v4/Markets/Components/dydxMarketAssetItemView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Markets/Components/dydxMarketAssetItemView.swift @@ -70,7 +70,7 @@ open class dydxMarketAssetItemViewModel: PlatformViewModel { trailing: trailing.wrappedViewModel) .createView(parentStyle: parentStyle) .frame(height: 64) - .themeGradient(background: .layer4, gradientType: gradientType) + .themeGradient(background: .layer3, gradientType: gradientType) .cornerRadius(16) if isFavorited { diff --git a/dydx/dydxViews/dydxViews/_v4/NewsAlerts/Components/Alerts/dydxAlertItem.swift b/dydx/dydxViews/dydxViews/_v4/NewsAlerts/Components/Alerts/dydxAlertItem.swift index d6abe115d..232a2a03e 100644 --- a/dydx/dydxViews/dydxViews/_v4/NewsAlerts/Components/Alerts/dydxAlertItem.swift +++ b/dydx/dydxViews/dydxViews/_v4/NewsAlerts/Components/Alerts/dydxAlertItem.swift @@ -58,7 +58,7 @@ public class dydxAlertItemModel: PlatformViewModel, Equatable { Spacer() } .padding(16) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(16, corners: .allCorners) .overlay( RoundedRectangle(cornerRadius: 16) diff --git a/dydx/dydxViews/dydxViews/_v4/Onboarding/TOS/dydxTosView.swift b/dydx/dydxViews/dydxViews/_v4/Onboarding/TOS/dydxTosView.swift index f2df1d5a6..8d22f7f94 100644 --- a/dydx/dydxViews/dydxViews/_v4/Onboarding/TOS/dydxTosView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Onboarding/TOS/dydxTosView.swift @@ -96,7 +96,7 @@ public class dydxTosViewModel: PlatformViewModel { .leftAligned() .padding() } - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(12, corners: .allCorners) } diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioChartView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioChartView.swift index 2bad67b44..1809e9d3e 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioChartView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioChartView.swift @@ -53,7 +53,7 @@ public class dydxPortfolioChartViewModel: PlatformViewModel { } .frame(height: 290) .frame(maxWidth: .infinity) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(28) } .cornerRadius(28, corners: [.topLeft, .topRight]) @@ -100,15 +100,15 @@ public class dydxPortfolioChartViewModel: PlatformViewModel { let items = self.resolutionTitles?.compactMap { Text($0) .themeFont(fontType: .bold, fontSize: .small) - .padding(8) .themeColor(foreground: .textTertiary) + .padding(8) .wrappedViewModel } let selectedItems = self.resolutionTitles?.compactMap { Text($0) .themeFont(fontType: .bold, fontSize: .small) + .themeColor(foreground: .textPrimary) .padding(8) - .themeColor(background: .layer0) .cornerRadius(8) .wrappedViewModel } diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioFeesView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioFeesView.swift index a882064bb..8bd5c2938 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioFeesView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioFeesView.swift @@ -192,7 +192,7 @@ public class dydxPortfolioFeesViewModel: PlatformViewModel { } .padding(.vertical, 10) .padding(.horizontal, 12) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(9, corners: .allCorners) } diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioPositionsView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioPositionsView.swift index ae8535406..decce565e 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioPositionsView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/Sections/dydxPortfolioPositionsView.swift @@ -80,7 +80,7 @@ public class dydxPortfolioPositionItemViewModel: PlatformViewModel { trailing: trailing.wrappedViewModel) .createView(parentStyle: parentStyle) .frame(height: 64) - .themeGradient(background: .layer4, gradientType: self.gradientType) + .themeGradient(background: .layer3, gradientType: self.gradientType) .cornerRadius(16) .onTapGesture { [weak self] in self?.handler?.onTapAction?() diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioHeaderView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioHeaderView.swift index a3037267e..1eb3ebc7f 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioHeaderView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioHeaderView.swift @@ -33,33 +33,34 @@ public class dydxPortfolioHeaderViewModel: PlatformViewModel { PlatformView(viewModel: self, parentStyle: parentStyle, styleKey: styleKey) { [weak self] style in guard let self = self else { return AnyView(PlatformView.nilView) } - let title: String? - let icon: String? + let title: String + let icon: String let action: (() -> Void)? + let backgroundColor: ThemeColor.SemanticColor + let borderColor: ThemeColor.SemanticColor? switch self.state { case .onboard: title = DataLocalizer.localize(path: "APP.ONBOARDING.GET_STARTED") icon = "icon_wallet_connect" action = self.onboardAction + backgroundColor = .colorPurple + borderColor = nil case .onboardCompleted: title = DataLocalizer.localize(path: "APP.GENERAL.TRANSFER") icon = "icon_transfer" action = self.depositAction + backgroundColor = .layer4 + borderColor = .layer6 } return AnyView( HStack { -// Text(DataLocalizer.localize(path: "APP.PORTFOLIO.PORTFOLIO", params: nil)) -// .themeFont(fontType: .bold, fontSize: .largest) -// -// Spacer() - - Text(title ?? "") + Text(title) .themeFont(fontType: .bold, fontSize: .small) .themeColor(foreground: .textTertiary) let icon = PlatformIconViewModel(type: .asset(name: icon, bundle: Bundle.dydxView), - clip: .circle(background: .layer5, spacing: 24, borderColor: .layer6), + clip: .circle(background: backgroundColor, spacing: 24, borderColor: borderColor), size: CGSize(width: 42, height: 42)) PlatformButtonViewModel(content: icon, type: .iconType, diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSectionsView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSectionsView.swift index 2f2720f9a..92dcada58 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSectionsView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSectionsView.swift @@ -36,6 +36,7 @@ public class dydxPortfolioSectionsViewModel: PlatformViewModel { let selectedItems = self.itemTitles?.compactMap { Text($0) .themeFont(fontType: .bold, fontSize: .largest) + .themeColor(foreground: .textPrimary) .wrappedViewModel } return AnyView( diff --git a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSelectorView.swift b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSelectorView.swift index d4a6d1cc8..a137d3503 100644 --- a/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSelectorView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Portfolio/Components/dydxPortfolioSelectorView.swift @@ -74,6 +74,7 @@ public class dydxPortfolioSelectorViewModel: PlatformViewModel { HStack { Text(items[selectedIndex].title ?? "") .themeFont(fontType: .bold, fontSize: .largest) + .themeColor(foreground: .textPrimary) PlatformIconViewModel(type: .system(name: self.present ? "chevron.up": "chevron.down"), clip: .circle(background: .layer5, spacing: 16, borderColor: ThemeColor.SemanticColor.layer6), size: CGSize(width: 28, height: 28), diff --git a/dydx/dydxViews/dydxViews/_v4/Profile/Components/dydxProfileButtonsView.swift b/dydx/dydxViews/dydxViews/_v4/Profile/Components/dydxProfileButtonsView.swift index 54ac3cd24..f95665d8d 100644 --- a/dydx/dydxViews/dydxViews/_v4/Profile/Components/dydxProfileButtonsView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Profile/Components/dydxProfileButtonsView.swift @@ -35,18 +35,21 @@ public class dydxProfileButtonsViewModel: PlatformViewModel { imageName: "icon_transfer_deposit", title: DataLocalizer.localize(path: "APP.GENERAL.DEPOSIT"), templateColor: self.onboarded ? .textSecondary : .textTertiary, + textColor: self.onboarded ? .textSecondary : .textTertiary, action: self.depositAction) self.createButton(parentStyle: style, imageName: "icon_transfer_withdrawal", title: DataLocalizer.localize(path: "APP.GENERAL.WITHDRAW"), templateColor: self.onboarded ? .textSecondary : .textTertiary, + textColor: self.onboarded ? .textSecondary : .textTertiary, action: self.withdrawAction) self.createButton(parentStyle: style, imageName: "icon_transfer_dydx", title: DataLocalizer.localize(path: "APP.GENERAL.TRANSFER"), templateColor: self.onboarded ? .textSecondary : .textTertiary, + textColor: self.onboarded ? .textSecondary : .textTertiary, action: self.transferAction) if self.onboarded { @@ -54,6 +57,7 @@ public class dydxProfileButtonsViewModel: PlatformViewModel { imageName: "settings_signout", title: DataLocalizer.localize(path: "APP.GENERAL.SIGN_OUT"), templateColor: nil, + textColor: .textSecondary, action: self.signOutAction) } else { self.createButton(parentStyle: style, @@ -61,6 +65,7 @@ public class dydxProfileButtonsViewModel: PlatformViewModel { title: DataLocalizer.localize(path: "APP.GENERAL.CONNECT"), backgroundColor: .colorPurple, templateColor: .colorWhite, + textColor: .textSecondary, action: self.onboardAction) } } @@ -68,7 +73,7 @@ public class dydxProfileButtonsViewModel: PlatformViewModel { } } - private func createButton(parentStyle: ThemeStyle, imageName: String, title: String, styleKey: String? = nil, backgroundColor: ThemeColor.SemanticColor = .layer3, templateColor: ThemeColor.SemanticColor?, action: (() -> Void)?) -> some View { + private func createButton(parentStyle: ThemeStyle, imageName: String, title: String, styleKey: String? = nil, backgroundColor: ThemeColor.SemanticColor = .layer3, templateColor: ThemeColor.SemanticColor?, textColor: ThemeColor.SemanticColor, action: (() -> Void)?) -> some View { let icon = PlatformIconViewModel(type: .asset(name: imageName, bundle: Bundle.dydxView), clip: .circle(background: backgroundColor, spacing: 24, borderColor: .layer6), size: CGSize(width: 48, height: 48), @@ -77,7 +82,7 @@ public class dydxProfileButtonsViewModel: PlatformViewModel { let title = Text(title) .themeFont(fontSize: .small) - .themeColor(foreground: templateColor ?? .textSecondary) + .themeColor(foreground: textColor) .lineLimit(1) let buttonContent = VStack { diff --git a/dydx/dydxViews/dydxViews/_v4/Profile/TradingNetwork/dydxTradingNetworkView.swift b/dydx/dydxViews/dydxViews/_v4/Profile/TradingNetwork/dydxTradingNetworkView.swift index 2b30c7e58..3b6735e8d 100644 --- a/dydx/dydxViews/dydxViews/_v4/Profile/TradingNetwork/dydxTradingNetworkView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Profile/TradingNetwork/dydxTradingNetworkView.swift @@ -49,7 +49,7 @@ public class dydxTradingNetworkItemViewModel: PlatformViewModel { .createView(parentStyle: style) } .frame(width: UIScreen.main.bounds.width - 32, height: 64) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(16) .onTapGesture { [weak self] in self?.onSelected?() diff --git a/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/Components/dydxRewardsHelpView.swift b/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/Components/dydxRewardsHelpView.swift index 0527733fd..591e9227b 100644 --- a/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/Components/dydxRewardsHelpView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/Components/dydxRewardsHelpView.swift @@ -20,7 +20,7 @@ public class dydxRewardsHelpViewModel: dydxTitledCardViewModel { private let listViewModel = PlatformListViewModel() public init() { - super.init(title: DataLocalizer.shared?.localize(path: "APP.GENERAL.HELP", params: nil) ?? "", + super.init(title: DataLocalizer.shared?.localize(path: "APP.HEADER.HELP", params: nil) ?? "", verticalContentPadding: 0, horizontalContentPadding: 0) } diff --git a/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/dydxTradingRewardsView.swift b/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/dydxTradingRewardsView.swift index 5de3f0106..bb27bd39d 100644 --- a/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/dydxTradingRewardsView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Profile/TradingRewards/dydxTradingRewardsView.swift @@ -61,7 +61,6 @@ struct dydxTradingRewardsViewModel_Previews_Dark: PreviewProvider { ThemeSettings.applyStyles() return dydxHelpViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) @@ -76,7 +75,6 @@ struct dydxTradingRewardsViewModel_Previews_Light: PreviewProvider { ThemeSettings.applyStyles() return dydxHelpViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) diff --git a/dydx/dydxViews/dydxViews/_v4/Receipt/dydxReceiptView.swift b/dydx/dydxViews/dydxViews/_v4/Receipt/dydxReceiptView.swift index d8f8a2ede..06adfe52e 100644 --- a/dydx/dydxViews/dydxViews/_v4/Receipt/dydxReceiptView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Receipt/dydxReceiptView.swift @@ -104,8 +104,7 @@ public class dydxReceiptViewModel: PlatformViewModel { .frame(maxWidth: .infinity) .padding() .themeColor(background: .layer3) - .cornerRadius(8) - .border(cornerRadius: 8) + .borderAndClip(style: .cornerRadius(12), borderColor: .borderDefault, lineWidth: 1) .padding(.horizontal, -8) } diff --git a/dydx/dydxViews/dydxViews/_v4/Search/dydxSearchView.swift b/dydx/dydxViews/dydxViews/_v4/Search/dydxSearchView.swift index 6581cc866..eb64ca461 100644 --- a/dydx/dydxViews/dydxViews/_v4/Search/dydxSearchView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Search/dydxSearchView.swift @@ -90,7 +90,7 @@ public class dydxSearchViewModel: PlatformViewModel { .frame(height: 40) .padding(.vertical, 2) .padding(.horizontal, 12) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .clipShape(Capsule()) if presentationStyle == .modal { diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipBuySellView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipBuySellView.swift index 2f6fd2a18..59e2b8856 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipBuySellView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipBuySellView.swift @@ -66,7 +66,6 @@ struct dydxTradeSheetTipBuySellView_Previews_Dark: PreviewProvider { ThemeSettings.applyStyles() return dydxTradeSheetTipBuySellViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) @@ -81,7 +80,6 @@ struct dydxTradeSheetTipBuySellView_Previews_Light: PreviewProvider { ThemeSettings.applyStyles() return dydxTradeSheetTipBuySellViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipDraftView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipDraftView.swift index e7305b0d1..d1f724bdc 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipDraftView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/SheetTip/dydxTradeSheetTipDraftView.swift @@ -81,7 +81,6 @@ struct dydxTradeSheetTipDraftView_Previews_Dark: PreviewProvider { ThemeSettings.applyStyles() return dydxTradeSheetTipDraftViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) @@ -96,7 +95,6 @@ struct dydxTradeSheetTipDraftView_Previews_Light: PreviewProvider { ThemeSettings.applyStyles() return dydxTradeSheetTipDraftViewModel.previewValue .createView() - .themeColor(background: .layer0) .environmentObject(themeSettings) // .edgesIgnoringSafeArea(.bottom) .previewLayout(.sizeThatFits) diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputFields/dydxTradeInputSizeView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputFields/dydxTradeInputSizeView.swift index bbd42e6d5..b6ddda8e5 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputFields/dydxTradeInputSizeView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputFields/dydxTradeInputSizeView.swift @@ -93,8 +93,7 @@ public class dydxTradeInputSizeViewModel: PlatformTextInputViewModel { private func createTopView(inputView: PlatformView, parentStyle: ThemeStyle) -> some View { inputView - .themeColor(background: .layer6) - .cornerRadius(12) + .makeInput() } private func createBottomView(parentStyle: ThemeStyle) -> some View { @@ -124,7 +123,8 @@ public class dydxTradeInputSizeViewModel: PlatformTextInputViewModel { } } .padding(12) - .makeInput() + .themeColor(background: .layer1) + .cornerRadius(12, corners: .allCorners) } } diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputViewModifier.swift b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputViewModifier.swift index 0bee0abe4..cf0914218 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputViewModifier.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/Components/TradeInputViewModifier.swift @@ -21,6 +21,6 @@ struct TradeInputModifier: ViewModifier { func body(content: Content) -> some View { content .themeColor(background: .layer4) - .cornerRadius(12) + .borderAndClip(style: .cornerRadius(12), borderColor: .borderDefault, lineWidth: 1) } } diff --git a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/dydxTradeInputView.swift b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/dydxTradeInputView.swift index 870a579d3..0a5b3fbed 100644 --- a/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/dydxTradeInputView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Trade/TradeInput/dydxTradeInputView.swift @@ -106,7 +106,7 @@ public class dydxTradeInputViewModel: PlatformViewModel { } .padding() .frame(maxWidth: .infinity) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.topLeft, .topRight]) } diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/Components/TransferAmountBox.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/Components/TransferAmountBox.swift index ef42d0350..65c14580a 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/Components/TransferAmountBox.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/Components/TransferAmountBox.swift @@ -47,7 +47,7 @@ public class TransferAmountBoxModel: PlatformTextInputViewModel { } .padding() .padding(.top, 6) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.bottomLeft, .bottomRight]) VStack { diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/Components/dydxTransferFaucetView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/Components/dydxTransferFaucetView.swift index b3942c233..295a523db 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/Components/dydxTransferFaucetView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/Components/dydxTransferFaucetView.swift @@ -44,7 +44,7 @@ public class dydxTransferFaucetViewModel: PlatformViewModel { .createView(parentStyle: style) .padding(.vertical, 2) .padding(.horizontal, 10) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .clipShape(Capsule()) .frame(minWidth: 0, maxWidth: .infinity) diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/Deposit/dydxTransferDepositView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/Deposit/dydxTransferDepositView.swift index 2387e729f..00341d040 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/Deposit/dydxTransferDepositView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/Deposit/dydxTransferDepositView.swift @@ -54,7 +54,7 @@ public class dydxTransferDepositViewModel: PlatformViewModel { } .padding() .frame(maxWidth: .infinity) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.topLeft, .topRight]) self.ctaButton?.createView(parentStyle: style) diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/Search/dydxTransferSearchItemView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/Search/dydxTransferSearchItemView.swift index 969e04a54..4af7c65fe 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/Search/dydxTransferSearchItemView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/Search/dydxTransferSearchItemView.swift @@ -52,7 +52,7 @@ public class dydxTransferSearchItemViewModel: PlatformViewModel { trailing: trailing.wrappedViewModel) .createView(parentStyle: style) .frame(width: UIScreen.main.bounds.width - 32, height: 64) - .themeColor(background: .layer4) + .themeColor(background: .layer3) .cornerRadius(12) .onTapGesture { [weak self] in self?.onTapAction?() diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/TransferOut/dydxTransferOutView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/TransferOut/dydxTransferOutView.swift index a72441b3d..b1014c9bf 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/TransferOut/dydxTransferOutView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/TransferOut/dydxTransferOutView.swift @@ -49,8 +49,7 @@ public class dydxTransferOutViewModel: PlatformViewModel { VStack(spacing: 12) { self.chainsComboBox?.createView(parentStyle: style) self.addressInput?.createView(parentStyle: style) - .themeColor(background: .layer4) - .cornerRadius(12) + .makeInput() self.tokensComboBox?.createView(parentStyle: style) self.amountBox?.createView(parentStyle: style) } @@ -64,7 +63,7 @@ public class dydxTransferOutViewModel: PlatformViewModel { } .padding() .frame(maxWidth: .infinity) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.topLeft, .topRight]) self.ctaButton?.createView(parentStyle: style) @@ -84,7 +83,7 @@ struct dydxTransferOutView_Previews_Dark: PreviewProvider { ThemeSettings.applyStyles() return dydxTransferOutViewModel.previewValue .createView() - .themeColor(background: .layer0) + .themeColor(background: .layer1) .environmentObject(themeSettings) .previewLayout(.sizeThatFits) } @@ -98,7 +97,7 @@ struct dydxTransferOutView_Previews_Light: PreviewProvider { ThemeSettings.applyStyles() return dydxTransferOutViewModel.previewValue .createView() - .themeColor(background: .layer0) + .themeColor(background: .layer1) .environmentObject(themeSettings) .previewLayout(.sizeThatFits) } diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/TransferStatus/dydxTransferStatusView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/TransferStatus/dydxTransferStatusView.swift index 698d5c883..28e9bce57 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/TransferStatus/dydxTransferStatusView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/TransferStatus/dydxTransferStatusView.swift @@ -67,7 +67,7 @@ public class dydxTransferStatusViewModel: PlatformViewModel { .padding(.bottom, 12) .frame(height: 180) .frame(maxWidth: .infinity) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.topLeft, .topRight]) if self.deleteAction != nil { diff --git a/dydx/dydxViews/dydxViews/_v4/Transfer/Withdrawal/dydxTransferWithdrawalView.swift b/dydx/dydxViews/dydxViews/_v4/Transfer/Withdrawal/dydxTransferWithdrawalView.swift index ceb0fa9ed..f03321462 100644 --- a/dydx/dydxViews/dydxViews/_v4/Transfer/Withdrawal/dydxTransferWithdrawalView.swift +++ b/dydx/dydxViews/dydxViews/_v4/Transfer/Withdrawal/dydxTransferWithdrawalView.swift @@ -48,8 +48,7 @@ public class dydxTransferWithdrawalViewModel: PlatformViewModel { VStack(spacing: 12) { HStack { self.addressInput?.createView(parentStyle: style) - .themeColor(background: .layer4) - .cornerRadius(12) + .makeInput() self.chainsComboBox?.createView(parentStyle: style) } @@ -68,7 +67,7 @@ public class dydxTransferWithdrawalViewModel: PlatformViewModel { } .padding() .frame(maxWidth: .infinity) - .themeColor(background: .layer0) + .themeColor(background: .layer1) .cornerRadius(12, corners: [.topLeft, .topRight]) self.ctaButton?.createView(parentStyle: style)