Skip to content

Commit

Permalink
Merge branch 'develop' into feature/WEAV-137
Browse files Browse the repository at this point in the history
  • Loading branch information
jisu15-kim authored Nov 21, 2024
2 parents c73aff2 + b289ae2 commit 627dcd7
Show file tree
Hide file tree
Showing 39 changed files with 712 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ Derived/
Tuist/.build
Projects/Core/CoreKit/Sources/Secret.swift
graph.png
OpenApiGenerator/.build
8 changes: 8 additions & 0 deletions Projects/App/Sources/Debug/AuthInfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ struct AuthDebugInfoView: View {
dismissButton: .default(Text("확인"))
)
}
.toolbarRole(.navigationStack)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button("로그아웃", role: .destructive) {
AppCoordinator.shared.logout()
}
}
}
}

// 클립보드에 복사하는 함수
Expand Down
5 changes: 5 additions & 0 deletions Projects/App/Sources/Navigation/NavigationStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ extension PathType {
case .authAgreement(let input):
AuthAgreementView(input)

case .profileIntro(let input):
ProfileIntroView(input)

case .authGreeting(let input):
AuthGreetingView(input)
case .authProfileGender(let input):
Expand All @@ -55,6 +58,8 @@ extension PathType {
case .authName(let input):
AuthNameInputView(input)

case .dreamPartnerIntro(let input):
DreamPartnerIntroView(input)
case .dreamPartnerAgeRange(let input):
DreamPartnerAgeView(input)
case .dreamPartnerJobOccupation(let input):
Expand Down
7 changes: 7 additions & 0 deletions Projects/Core/CommonKit/Sources/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,11 @@ public final class AppCoordinator: ObservableObject {
}
return userInfo
}

public func logout() {
TokenManager.accessToken = nil
TokenManager.refreshToken = nil
TokenManager.registerToken = nil
AuthState.change(.loggedOut)
}
}
10 changes: 10 additions & 0 deletions Projects/Core/CommonKit/Sources/Path/PathTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public enum PathType: Hashable {
.signUp(.authRegion(input: .mock)),
.signUp(.authPhoneInput),

.signUp(.dreamPartnerIntro(input: .mock)),
.signUp(.dreamPartnerAgeRange(input: .mock))
]
#endif
Expand All @@ -69,6 +70,8 @@ public enum PathType: Hashable {
case .authPhoneVerify: return "전화번호 인증"
case .authAgreement: return "이용 약관"

case .profileIntro: return "프로필 입력 인트로"

case .authGreeting: return "가입 후 환영"
case .authProfileGender: return "성별 입력"
case .authProfileAge: return "나이 입력"
Expand All @@ -77,6 +80,7 @@ public enum PathType: Hashable {
case .authRegion: return "내 지역, 선호 지역 입력"
case .authName: return "이름 입력"

case .dreamPartnerIntro: return "이상형 입력 인트로"
case .dreamPartnerAgeRange: return "이상형 나이대"
case .dreamPartnerJobOccupation: return "이상형 직업"
case .dreamPartnerDistance: return "이상형과의 거리"
Expand All @@ -90,6 +94,7 @@ public enum SignUpSubViewType: Hashable {
case authPhoneVerify(SMSSendResponse)
case authAgreement(input: SignUpFormDomain)

case profileIntro(input: SignUpFormDomain)
case authGreeting(input: SignUpFormDomain)
case authProfileGender(input: SignUpFormDomain)
case authProfileAge(input: SignUpFormDomain)
Expand All @@ -98,6 +103,7 @@ public enum SignUpSubViewType: Hashable {
case authRegion(input: SignUpFormDomain)
case authName(input: SignUpFormDomain)

case dreamPartnerIntro(input: SignUpFormDomain)
case dreamPartnerAgeRange(input: SignUpFormDomain)
case dreamPartnerJobOccupation(input: SignUpFormDomain)
case dreamPartnerDistance(input: SignUpFormDomain)
Expand All @@ -108,6 +114,8 @@ public enum SignUpSubViewType: Hashable {

public func hash(into hasher: inout Hasher) {
switch self {
case .profileIntro:
hasher.combine(-1)
case .authPhoneInput:
hasher.combine(0)
case .authPhoneVerify:
Expand All @@ -129,6 +137,8 @@ public enum SignUpSubViewType: Hashable {
case .authName:
hasher.combine(9)

case .dreamPartnerIntro:
hasher.combine(-2)
case .dreamPartnerAgeRange:
hasher.combine(10)
case .dreamPartnerJobOccupation:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "profile_border.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "profile_default.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "heart-with-arrow.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "magnifying-glass.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 45 additions & 19 deletions Projects/DesignSystem/DesignCore/Sources/Tooltip/ToolTip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,63 @@
import SwiftUI

extension View {
public func tooltip(message: String, offset: CGFloat) -> some View {
public func tooltip(message: String?, offset: CGFloat) -> some View {
return modifier(ToolTipViewModifier(message: message, offset: offset))
}

public func tooltip(message: AttributedString?, offset: CGFloat) -> some View {
return modifier(ToolTipViewModifier(message: message, offset: offset))
}
}

struct ToolTipViewModifier: ViewModifier {
let message: String
let message: AttributedString?
let offset: CGFloat

init(
message: AttributedString?,
offset: CGFloat
) {
self.message = message
self.offset = offset
}

init(
message: String?,
offset: CGFloat
) {
if let message {
self.message = .init(stringLiteral: message)
} else {
self.message = nil
}
self.offset = offset
}

func body(content: Content) -> some View {
content
.overlay {
Text(message)
.padding(.horizontal, 20)
.padding(.vertical, 10)
.typography(.regular_12)
.foregroundStyle(.white)
.multilineTextAlignment(.center)
.background {
ZStack {
RoundedRectangle(cornerRadius: 6)
.fill(DesignCore.Colors.grey400)
VStack {
Spacer()
InvertedTriangle()
if let message {
Text(message)
.padding(.horizontal, 20)
.padding(.vertical, 10)
.typography(.regular_12)
.foregroundStyle(.white)
.multilineTextAlignment(.center)
.background {
ZStack {
RoundedRectangle(cornerRadius: 6)
.fill(DesignCore.Colors.grey400)
VStack {
Spacer()
InvertedTriangle()
}
.offset(y: 12)
}
.offset(y: 12)
}
}
.frame(width: 300)
.offset(y: -offset)
// .frame(width: 300)
.offset(y: -offset)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ public struct ProfilePannelView: View {
VStack(spacing: 6) {
HStack {
Spacer()
RoundedRectangle(cornerRadius: 24)
.frame(width: 102, height: 102)
ZStack {
DesignCore.Images.profileDefault.image
.cornerRadius(20, corners: .allCorners)
DesignCore.Images.profileBorder.image
}
.frame(width: 102, height: 102)
Spacer()
}
.shadow(.default)
Expand Down
5 changes: 1 addition & 4 deletions Projects/Features/Home/UnitTest/WidgetUnitTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ struct WidgetUnitTest {
model: writeState,
input: .init(
widgetType: .body,
content: nil,
successHandler: {

}
content: nil
),
service: ProfileServiceMock()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension AuthAgreementIntent: AuthAgreementIntent.Intentable {
func onTapNextButton() {
Task {
await AppCoordinator.shared.changeRootView(
.signUp(.authGreeting(input: input.input))
.signUp(.profileIntro(input: input.input))
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public struct DreamPartnerAgeView: View {
}
.ignoresSafeArea(.keyboard)
.textureBackground()
.setPopNavigation {
.setNavigation(showLeftBackButton: false) {
AppCoordinator.shared.pop()
}
.setLoading(state.isLoading)
Expand Down
Loading

0 comments on commit 627dcd7

Please sign in to comment.