Skip to content

Commit

Permalink
Merge pull request #192 from L-j-h-c/feature/#188-visitorProjectPage
Browse files Browse the repository at this point in the history
[Feat] #188 - 비활동 프로필 미등록 유저 프로젝트 및 마이페이지 분기
  • Loading branch information
L-j-h-c authored Apr 19, 2023
2 parents 0ebebef + c18e1a2 commit 319dcf6
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 20 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public extension SettingsDictionary {

static let baseSettings: Self = [
"OTHER_LDFLAGS" : [
"-Xlinker -interposable"
"$(inherited)"
]
]

Expand Down
4 changes: 4 additions & 0 deletions SOPT-iOS/Projects/Core/Sources/Literals/ExternalURL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public struct ExternalURL {
public static let findEmail = "https://forms.gle/XkVFMUPsWWV1DXU38"
}

public struct SOPT {
public static let project = "https://sopt.org/project"
}

public struct Playground {
#if DEV || PROD
public static let main = "https://playground.sopt.org"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ public final class AppMyPageVC: UIViewController, AppMyPageViewControllable {
frame: self.view.frame
)

// MARK: For UnregisteredInActive

private lazy var etcForUnregisteredInActiveSectionGroup = MypageSectionGroupView(
headerTitle: I18N.MyPage.etcSectionGroupTitle,
subviews: [
self.logoutListItem,
],
frame: self.view.frame
)

public init(
userType: UserType,
viewModel: AppMyPageViewModel,
Expand Down Expand Up @@ -182,11 +192,17 @@ extension AppMyPageVC {
self.soptampSectionGroup,
self.etcSectionGroup
)
case .visitor, .unregisteredInactive:
case .visitor:
self.contentStackView.addArrangedSubviews(
self.servicePolicySectionGroup,
self.etcForVisitorsSectionGroup
)

case .unregisteredInactive:
self.contentStackView.addArrangedSubviews(
self.servicePolicySectionGroup,
self.etcForUnregisteredInActiveSectionGroup
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,29 @@ extension MainVC: UICollectionViewDelegate {
self.navigationController?.pushViewController(viewController, animated: true)
return
}

let safariViewController = SFSafariViewController(url: URL(string: service.serviceDomainLink)!)
safariViewController.playgroundStyle()
self.present(safariViewController, animated: true)


var needOfficialProject = service == .project && viewModel.userType == .visitor
let serviceDomainURL = needOfficialProject
? ExternalURL.SOPT.project
: service.serviceDomainLink
showSafariVC(url: serviceDomainURL)
case (2, _):
guard let service = viewModel.otherServiceList[safe: indexPath.item] else { return }

let safariViewController = SFSafariViewController(url: URL(string: service.serviceDomainLink)!)
safariViewController.playgroundStyle()
self.present(safariViewController, animated: true)
showSafariVC(url: service.serviceDomainLink)
case(3, _):
guard viewModel.userType != .visitor && viewModel.userType != .unregisteredInactive else { return }

presentSoptampFeature()
default: break
}
}

private func showSafariVC(url: String) {
let safariViewController = SFSafariViewController(url: URL(string: url)!)
safariViewController.playgroundStyle()
self.present(safariViewController, animated: true)
}
}

// MARK: - UICollectionViewDataSource
Expand Down
4 changes: 2 additions & 2 deletions SOPT-iOS/Tuist/Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ let spm = SwiftPackageManagerDependencies([
.remote(url: "https://github.com/SnapKit/SnapKit.git", requirement: .upToNextMinor(from: "5.0.0")),
.remote(url: "https://github.com/Moya/Moya.git", requirement: .upToNextMajor(from: "15.0.0")),
.remote(url: "https://github.com/devxoul/Then", requirement: .upToNextMajor(from: "2")),
.remote(url: "https://github.com/onevcat/Kingfisher.git", requirement: .upToNextMajor(from: "7.0.0")),
.remote(url: "https://github.com/onevcat/Kingfisher.git", requirement: .upToNextMajor(from: "7.6.2")),
.remote(url: "https://github.com/FLEXTool/FLEX.git", requirement: .upToNextMajor(from: "4.3.0")),
.remote(url: "https://github.com/krzysztofzablocki/Inject.git", requirement: .upToNextMajor(from: "1.0.5")),
.remote(url: "https://github.com/Quick/Quick.git", requirement: .upToNextMajor(from: "5.0.0")),
.remote(url: "https://github.com/Quick/Nimble.git", requirement: .upToNextMajor(from: "10.0.0")),
.remote(url: "https://github.com/airbnb/lottie-ios", requirement: .upToNextMajor(from: "3.0.0"))
.remote(url: "https://github.com/airbnb/lottie-ios", requirement: .upToNextMajor(from: "4.1.3"))
], baseSettings: Settings.settings(
configurations: XCConfig.framework
))
Expand Down

0 comments on commit 319dcf6

Please sign in to comment.