forked from openedx/openedx-app-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Part 3 sync to upstream (openedx#533)
* chore: show unsupported error screen for gated content (openedx#37) * chore: string auto-generating * chore: removed unused func * chore: update facebook sdk to solve open(url) issue --------- Co-authored-by: Saeed Bashir <[email protected]> Co-authored-by: Anton Yarmolenko <[email protected]>
- Loading branch information
1 parent
c4fcc19
commit e76053c
Showing
18 changed files
with
172 additions
and
115 deletions.
There are no files selected for viewing
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
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
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
45 changes: 45 additions & 0 deletions
45
Course/Course/Presentation/Unit/Subviews/NotAvailableOnMobileView.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 @@ | ||
// | ||
// NotAvailableOnMobileView.swift | ||
// Course | ||
// | ||
// Created by Stepanok Ivan on 30.05.2023. | ||
// | ||
|
||
import SwiftUI | ||
import Core | ||
import Theme | ||
|
||
public struct NotAvailableOnMobileView: View { | ||
let url: String | ||
|
||
public init(url: String) { | ||
self.url = url | ||
} | ||
|
||
public var body: some View { | ||
ZStack(alignment: .center) { | ||
VStack(spacing: 10) { | ||
Spacer() | ||
CoreAssets.notAvaliable.swiftUIImage | ||
Text(CourseLocalization.NotAvaliable.title) | ||
.font(Theme.Fonts.titleLarge) | ||
.multilineTextAlignment(.center) | ||
.padding(.top, 40) | ||
Text(CourseLocalization.NotAvaliable.description) | ||
.font(Theme.Fonts.bodyLarge) | ||
.multilineTextAlignment(.center) | ||
.padding(.top, 12) | ||
StyledButton(CourseLocalization.NotAvaliable.button, action: { | ||
if let url = URL(string: url), UIApplication.shared.canOpenURL(url) { | ||
UIApplication.shared.open(url) | ||
} | ||
}) | ||
.frame(width: 215) | ||
.padding(.top, 40) | ||
Spacer() | ||
} | ||
.padding(24) | ||
} | ||
.navigationBarHidden(false) | ||
} | ||
} |
Oops, something went wrong.