로그인 화면 일본어 SNS 아이콘 분기 추가

This commit is contained in:
Yu Sung
2026-01-28 15:57:25 +09:00
parent 5e209662d8
commit 5e85b1d679
5 changed files with 65 additions and 6 deletions

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_login_line.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_login_x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -15,10 +15,15 @@ struct LoginView: View {
} }
@ObservedObject var viewModel = LoginViewModel() @ObservedObject var viewModel = LoginViewModel()
@Environment(\.locale) private var locale
@State private var isPasswordVisible: Bool = false @State private var isPasswordVisible: Bool = false
@FocusState private var focusedField: FocusField? @FocusState private var focusedField: FocusField?
private var isJapaneseLanguage: Bool {
locale.identifier.hasPrefix("ja")
}
var body: some View { var body: some View {
BaseView(isLoading: $viewModel.isLoading) { BaseView(isLoading: $viewModel.isLoading) {
ZStack { ZStack {
@@ -129,12 +134,6 @@ struct LoginView: View {
AppState.shared.setAppStep(step: .signUp) AppState.shared.setAppStep(step: .signUp)
} }
Image("ic_login_kakao")
.onTapGesture {
hideKeyboard()
viewModel.loginWithKakao()
}
Image("ic_login_google") Image("ic_login_google")
.onTapGesture { .onTapGesture {
hideKeyboard() hideKeyboard()
@@ -146,6 +145,24 @@ struct LoginView: View {
hideKeyboard() hideKeyboard()
viewModel.loginWithApple() viewModel.loginWithApple()
} }
if isJapaneseLanguage {
Image("ic_login_line")
.onTapGesture {
hideKeyboard()
}
Image("ic_login_x")
.onTapGesture {
hideKeyboard()
}
} else {
Image("ic_login_kakao")
.onTapGesture {
hideKeyboard()
viewModel.loginWithKakao()
}
}
} }
.padding(.top, 20) .padding(.top, 20)