언어 설정 화면 추가 및 언어 헤더 적용
설정에서 시스템/한국어/영어/일본어 선택을 지원한다. 선택 시 Accept-Language 헤더와 UI locale을 즉시 반영한다. 언어 변경 후 스플래시를 거쳐 메인으로 소프트 재시작한다.
This commit is contained in:
@@ -43,6 +43,28 @@ struct SettingsView: View {
|
||||
AppState.shared.setAppStep(step: .notificationSettings)
|
||||
}
|
||||
|
||||
Rectangle()
|
||||
.frame(width: cardWidth - 26.7, height: 0.3)
|
||||
.foregroundColor(Color.gray90)
|
||||
|
||||
HStack(spacing: 0) {
|
||||
Text("언어 설정")
|
||||
.font(.custom(Font.bold.rawValue, size: 14.7))
|
||||
.foregroundColor(Color.grayee)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image("ic_forward")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
.padding(.horizontal, 3.3)
|
||||
.frame(width: cardWidth - 26.7, height: 50)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
AppState.shared.setAppStep(step: .languageSettings)
|
||||
}
|
||||
|
||||
if UserDefaults.bool(forKey: .auth) {
|
||||
Rectangle()
|
||||
.frame(width: cardWidth - 26.7, height: 0.3)
|
||||
@@ -205,7 +227,7 @@ struct SettingsView: View {
|
||||
UserDefaults.reset()
|
||||
recentContentViewModel.truncate()
|
||||
|
||||
AppState.shared.isChangeAdultContentVisible = true
|
||||
AppState.shared.isRestartApp = true
|
||||
AppState.shared.setAppStep(step: .splash)
|
||||
}
|
||||
},
|
||||
@@ -227,7 +249,7 @@ struct SettingsView: View {
|
||||
viewModel.logoutAllDevice {
|
||||
self.isShowLogoutAllDeviceDialog = false
|
||||
UserDefaults.reset()
|
||||
AppState.shared.isChangeAdultContentVisible = true
|
||||
AppState.shared.isRestartApp = true
|
||||
AppState.shared.setAppStep(step: .splash)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user