로그인 화면 일본어 SNS 아이콘 분기 추가
This commit is contained in:
21
SodaLive/Resources/Assets.xcassets/ic_login_line.imageset/Contents.json
vendored
Normal file
21
SodaLive/Resources/Assets.xcassets/ic_login_line.imageset/Contents.json
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
BIN
SodaLive/Resources/Assets.xcassets/ic_login_line.imageset/ic_login_line.png
vendored
Normal file
BIN
SodaLive/Resources/Assets.xcassets/ic_login_line.imageset/ic_login_line.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 KiB |
21
SodaLive/Resources/Assets.xcassets/ic_login_x.imageset/Contents.json
vendored
Normal file
21
SodaLive/Resources/Assets.xcassets/ic_login_x.imageset/Contents.json
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
BIN
SodaLive/Resources/Assets.xcassets/ic_login_x.imageset/ic_login_x.png
vendored
Normal file
BIN
SodaLive/Resources/Assets.xcassets/ic_login_x.imageset/ic_login_x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@@ -15,10 +15,15 @@ struct LoginView: View {
|
||||
}
|
||||
|
||||
@ObservedObject var viewModel = LoginViewModel()
|
||||
@Environment(\.locale) private var locale
|
||||
|
||||
@State private var isPasswordVisible: Bool = false
|
||||
@FocusState private var focusedField: FocusField?
|
||||
|
||||
private var isJapaneseLanguage: Bool {
|
||||
locale.identifier.hasPrefix("ja")
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
ZStack {
|
||||
@@ -129,12 +134,6 @@ struct LoginView: View {
|
||||
AppState.shared.setAppStep(step: .signUp)
|
||||
}
|
||||
|
||||
Image("ic_login_kakao")
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
viewModel.loginWithKakao()
|
||||
}
|
||||
|
||||
Image("ic_login_google")
|
||||
.onTapGesture {
|
||||
hideKeyboard()
|
||||
@@ -146,6 +145,24 @@ struct LoginView: View {
|
||||
hideKeyboard()
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user