-
Notifications
You must be signed in to change notification settings - Fork 1
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
20 changed files
with
293 additions
and
133 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...Projects/Modules/Networks/Demo/Resources/Assets.xcassets/appleLogo.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "ic_baseline-apple.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+484 Bytes
...etworks/Demo/Resources/Assets.xcassets/appleLogo.imageset/ic_baseline-apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+855 Bytes
...orks/Demo/Resources/Assets.xcassets/appleLogo.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.17 KB
...orks/Demo/Resources/Assets.xcassets/appleLogo.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...Projects/Modules/Networks/Demo/Resources/Assets.xcassets/kakaoLogo.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "ri_kakao-talk-fill.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+490 Bytes
...tworks/Demo/Resources/Assets.xcassets/kakaoLogo.imageset/ri_kakao-talk-fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+828 Bytes
...rks/Demo/Resources/Assets.xcassets/kakaoLogo.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.13 KB
...rks/Demo/Resources/Assets.xcassets/kakaoLogo.imageset/[email protected]
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
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
HMH_Tuist_iOS/Projects/Modules/Networks/Demo/Sources/ServiceButton.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 @@ | ||
// | ||
// ServiceButton.swift | ||
// NetworksDemo | ||
// | ||
// Created by 류희재 on 11/24/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import Core | ||
|
||
struct ServiceButton : View { | ||
|
||
let imageResource: ImageResource | ||
let backgroundColor: Color | ||
let title: String | ||
let action: () -> Void | ||
|
||
internal var body: some View { | ||
Button { | ||
action() | ||
} label: { | ||
|
||
VStack { | ||
Image(imageResource) | ||
.resizable() | ||
.scaledToFit() | ||
.frame(width: 75, height: 75) | ||
Text(title) | ||
.foregroundStyle(.white) | ||
.bold() | ||
.padding(.top, 7) | ||
|
||
} | ||
.frame(width: 145, height: 145) | ||
.background(backgroundColor) | ||
.multilineTextAlignment(.center) | ||
.shadow(radius: 2) | ||
.overlay( | ||
RoundedRectangle(cornerRadius: 10) | ||
.stroke(Color(.white), lineWidth: 1) | ||
) | ||
} | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...Modules/Networks/Demo/Sources/ServiceTest/ChallengeServiceTest/ChallengeServiceView.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
94 changes: 94 additions & 0 deletions
94
HMH_Tuist_iOS/Projects/Modules/Networks/Demo/Sources/TokenTestView.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,94 @@ | ||
// | ||
// TokenTestView.swift | ||
// NetworksDemo | ||
// | ||
// Created by 류희재 on 11/24/24. | ||
// Copyright © 2024 HMH-iOS. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import Networks | ||
import Core | ||
|
||
//디버그(Debug) 모드와 릴리즈(Release) 모드에서 Xcode의 프리뷰(Preview) 활성화 여부 다름 So QA를 다시 debug로 변경 | ||
|
||
struct TokenTestHomeView: View { | ||
@EnvironmentObject var container: DIContainer | ||
private let cancelBag = CancelBag() | ||
|
||
var body: some View { | ||
NavigationStack(path: $container.navigationRouter.destinations) { | ||
VStack(alignment: .center) { | ||
Spacer() | ||
.frame(height: 25) | ||
|
||
Image(.main) | ||
.resizable() | ||
.frame(width: 86, height: 86) | ||
|
||
Spacer() | ||
.frame(height: 20) | ||
|
||
Text("HMH-iOS\nNetwork Demo App") | ||
.foregroundStyle(.white) | ||
.frame(alignment: .center) | ||
.font(.title) | ||
.bold() | ||
.multilineTextAlignment(.center) | ||
|
||
Spacer() | ||
.frame(height: 20) | ||
|
||
Text("테스트를 하기 전, idToken부터 받으세요!") | ||
.foregroundStyle(.gray) | ||
.frame(alignment: .center) | ||
.font(.body) | ||
.bold() | ||
.multilineTextAlignment(.center) | ||
|
||
Spacer() | ||
.frame(height: 60) | ||
|
||
HStack { | ||
Spacer() | ||
ServiceButton( | ||
imageResource: .kakaoLogo, | ||
backgroundColor: .yellow, | ||
title: "KAKAO") { | ||
let oauthKakaoService = OAuthKakaoService() | ||
oauthKakaoService.authorize() | ||
.sink(receiveCompletion: { _ in | ||
|
||
}, receiveValue: { token in | ||
UserManager.shared.accessToken = token | ||
container.navigationRouter.push(to: .home) | ||
}) | ||
.store(in: cancelBag) | ||
|
||
} | ||
|
||
Spacer() | ||
.frame(width: 25) | ||
|
||
ServiceButton( | ||
imageResource: .appleLogo, | ||
backgroundColor: .white, | ||
title: "APPLE") { | ||
container.navigationRouter.push(to: .home) | ||
} | ||
|
||
Spacer() | ||
} | ||
Spacer() | ||
} | ||
.padding(.horizontal, 30) | ||
.setHMHNavigation() | ||
.background(Color(asset: NetworksDemoAsset.blackground)) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
return TokenTestHomeView() | ||
.environmentObject(DIContainer.stub) | ||
} |
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
Oops, something went wrong.