-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
3,143 additions
and
985 deletions.
There are no files selected for viewing
221 changes: 175 additions & 46 deletions
221
Authorization/AuthorizationTests/AuthorizationMock.generated.swift
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Core/Core/Assets.xcassets/UpgradeAccess/UpgradeArrowImage.imageset/Contents.json
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,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "arrow.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true | ||
} | ||
} |
Binary file added
BIN
+3.7 KB
Core/Core/Assets.xcassets/UpgradeAccess/UpgradeArrowImage.imageset/arrow.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
Core/Core/Assets.xcassets/UpgradeAccess/UpgradeCalendarImage.imageset/Contents.json
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,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "calendar.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Core/Core/Assets.xcassets/UpgradeAccess/UpgradeCalendarImage.imageset/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
Core/Core/Assets.xcassets/UpgradeAccess/UpgradeCheckmarkImage.imageset/Contents.json
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,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "checkmark.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...Core/Assets.xcassets/UpgradeAccess/UpgradeCheckmarkImage.imageset/checkmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
45 changes: 45 additions & 0 deletions
45
Core/Core/CourseUpgrade/Modifiers/PaymentSnackbarModifier.swift
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,45 @@ | ||
// | ||
// PaymentSnackbarModifier.swift | ||
// Core | ||
// | ||
// Created by Vadim Kuznetsov on 11.06.24. | ||
// | ||
|
||
import SwiftUI | ||
import Theme | ||
|
||
public struct PaymentSnackbarModifier: ViewModifier { | ||
@StateObject var viewModel: PaymentSnackbarModifierViewModel = .init() | ||
public func body(content: Content) -> some View { | ||
content | ||
.onAppear { | ||
viewModel.isOnScreen = true | ||
} | ||
.onDisappear { | ||
viewModel.isOnScreen = false | ||
} | ||
.overlay(alignment: .bottom) { | ||
ZStack(alignment: .bottom) { | ||
if viewModel.showPaymentSuccess { | ||
PaymentSnakbarView() | ||
.transition(.move(edge: .bottom)) | ||
.onAppear { | ||
doAfter(Theme.Timeout.snackbarMessageLongTimeout) { | ||
viewModel.showPaymentSuccess = false | ||
} | ||
} | ||
} | ||
} | ||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom) | ||
.animation(.easeInOut, value: viewModel.showPaymentSuccess) | ||
.allowsHitTesting(false) | ||
.accessibilityHidden(true) | ||
} | ||
} | ||
} | ||
|
||
extension View { | ||
public func paymentSnackbar() -> some View { | ||
modifier(PaymentSnackbarModifier()) | ||
} | ||
} |
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,40 @@ | ||
// | ||
// PaymentSnakbarView.swift | ||
// Core | ||
// | ||
// Created by Vadim Kuznetsov on 11.06.24. | ||
// | ||
|
||
import SwiftUI | ||
import Theme | ||
|
||
public struct PaymentSnakbarView: View { | ||
public var body: some View { | ||
VStack(alignment: .leading, spacing: 8) { | ||
Text(CoreLocalization.CourseUpgrade.Snackbar.title) | ||
.font(Theme.Fonts.titleMedium) | ||
.foregroundColor(Theme.Colors.textPrimary) | ||
|
||
Text(CoreLocalization.CourseUpgrade.Snackbar.successMessage) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
.font(Theme.Fonts.labelLarge) | ||
.foregroundColor(Theme.Colors.textPrimary) | ||
} | ||
.padding(20) | ||
.overlay( | ||
RoundedRectangle(cornerRadius: 8) | ||
.stroke(Theme.Colors.datesSectionStroke, lineWidth: 2) | ||
) | ||
.background(Theme.Colors.datesSectionBackground) | ||
.clipShape( | ||
RoundedRectangle(cornerRadius: 8) | ||
) | ||
.padding(16) | ||
} | ||
} | ||
|
||
#if DEBUG | ||
#Preview { | ||
PaymentSnakbarView() | ||
} | ||
#endif |
Oops, something went wrong.