login view patch
This commit is contained in:
parent
1492afabd2
commit
97951cc748
@ -278,7 +278,7 @@
|
|||||||
"comment" : "Поле ввода кода 2FA"
|
"comment" : "Поле ввода кода 2FA"
|
||||||
},
|
},
|
||||||
"Введите логин" : {
|
"Введите логин" : {
|
||||||
|
"comment" : "Логин"
|
||||||
},
|
},
|
||||||
"Введите логин и мы отправим шестизначный код подтверждения." : {
|
"Введите логин и мы отправим шестизначный код подтверждения." : {
|
||||||
|
|
||||||
@ -287,7 +287,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
"Введите пароль" : {
|
"Введите пароль" : {
|
||||||
"comment" : "Поле ввода пароля на приложение"
|
"comment" : "Пароль\nПоле ввода пароля на приложение"
|
||||||
},
|
},
|
||||||
"Веб" : {
|
"Веб" : {
|
||||||
"comment" : "Тип сессии — веб"
|
"comment" : "Тип сессии — веб"
|
||||||
@ -362,9 +362,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"Войти по коду" : {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
"Войти по паролю" : {
|
"Войти по паролю" : {
|
||||||
|
|
||||||
@ -947,9 +944,6 @@
|
|||||||
},
|
},
|
||||||
"Мессенджер-режим сейчас проработан примерно на 50%." : {
|
"Мессенджер-режим сейчас проработан примерно на 50%." : {
|
||||||
|
|
||||||
},
|
|
||||||
"Мессенджер-режим сейчас проработан примерно на 60%." : {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
"Мини-приложения" : {
|
"Мини-приложения" : {
|
||||||
"comment" : "Applets",
|
"comment" : "Applets",
|
||||||
@ -1043,7 +1037,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Назад к входу" : {
|
"Назад" : {
|
||||||
|
|
||||||
},
|
},
|
||||||
"Напишите нам через форму обратной связи в разделе \"Поддержка\"." : {
|
"Напишите нам через форму обратной связи в разделе \"Поддержка\"." : {
|
||||||
@ -1704,6 +1698,7 @@
|
|||||||
},
|
},
|
||||||
"Пароль" : {
|
"Пароль" : {
|
||||||
"comment" : "Пароль",
|
"comment" : "Пароль",
|
||||||
|
"extractionState" : "stale",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"en" : {
|
"en" : {
|
||||||
"stringUnit" : {
|
"stringUnit" : {
|
||||||
|
|||||||
@ -117,7 +117,7 @@ struct PasswordLoginView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
Image(systemName: "arrow.left")
|
Image(systemName: "arrow.left")
|
||||||
Text(NSLocalizedString("Войти по коду", comment: ""))
|
Text(NSLocalizedString("Назад", comment: ""))
|
||||||
}
|
}
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
.foregroundColor(.blue)
|
.foregroundColor(.blue)
|
||||||
@ -126,12 +126,12 @@ struct PasswordLoginView: View {
|
|||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
Text(NSLocalizedString("Вход по паролю", comment: ""))
|
Text(NSLocalizedString("Вход по паролю", comment: ""))
|
||||||
.font(.largeTitle).bold()
|
.font(.largeTitle).bold()
|
||||||
Text(NSLocalizedString("Если предпочитаете классический вход, используйте логин и пароль.", comment: ""))
|
// Text(NSLocalizedString("Если предпочитаете классический вход, используйте логин и пароль.", comment: ""))
|
||||||
.foregroundColor(.secondary)
|
// .foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 12) {
|
VStack(alignment: .leading, spacing: 12) {
|
||||||
TextField(NSLocalizedString("Логин", comment: ""), text: $viewModel.username)
|
TextField(NSLocalizedString("Введите логин", comment: ""), text: $viewModel.username)
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color(.secondarySystemBackground))
|
.background(Color(.secondarySystemBackground))
|
||||||
.cornerRadius(12)
|
.cornerRadius(12)
|
||||||
@ -150,7 +150,7 @@ struct PasswordLoginView: View {
|
|||||||
.font(.caption)
|
.font(.caption)
|
||||||
}
|
}
|
||||||
|
|
||||||
SecureField(NSLocalizedString("Пароль", comment: ""), text: $viewModel.password)
|
SecureField(NSLocalizedString("Введите пароль", comment: ""), text: $viewModel.password)
|
||||||
.padding()
|
.padding()
|
||||||
.background(Color(.secondarySystemBackground))
|
.background(Color(.secondarySystemBackground))
|
||||||
.cornerRadius(12)
|
.cornerRadius(12)
|
||||||
@ -169,15 +169,15 @@ struct PasswordLoginView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
// VStack(alignment: .leading, spacing: 4) {
|
||||||
Toggle(NSLocalizedString("Режим мессенжера", comment: ""), isOn: $isMessengerModeEnabled)
|
// Toggle(NSLocalizedString("Режим мессенжера", comment: ""), isOn: $isMessengerModeEnabled)
|
||||||
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
// .toggleStyle(SwitchToggleStyle(tint: .accentColor))
|
||||||
Text(isMessengerModeEnabled
|
// Text(isMessengerModeEnabled
|
||||||
? "Мессенджер-режим сейчас проработан примерно на 60%."
|
// ? "Мессенджер-режим сейчас проработан примерно на 60%."
|
||||||
: "Основной режим находится в ранней разработке (около 10%).")
|
// : "Основной режим находится в ранней разработке (около 10%).")
|
||||||
.font(.footnote)
|
// .font(.footnote)
|
||||||
.foregroundColor(.secondary)
|
// .foregroundColor(.secondary)
|
||||||
}
|
// }
|
||||||
|
|
||||||
Button(action: {
|
Button(action: {
|
||||||
viewModel.login()
|
viewModel.login()
|
||||||
@ -369,6 +369,8 @@ private struct PasswordlessRequestView: View {
|
|||||||
Text(NSLocalizedString("Вход", comment: ""))
|
Text(NSLocalizedString("Вход", comment: ""))
|
||||||
.font(.largeTitle).bold()
|
.font(.largeTitle).bold()
|
||||||
// Text(NSLocalizedString("Введите логин и мы отправим шестизначный код подтверждения.", comment: ""))
|
// Text(NSLocalizedString("Введите логин и мы отправим шестизначный код подтверждения.", comment: ""))
|
||||||
|
// .foregroundColor(.secondary)
|
||||||
|
// Text(NSLocalizedString("Введите логин и мы отправим шестизначный код подтверждения.", comment: ""))
|
||||||
// .foregroundColor(.secondary)
|
// .foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,7 +404,11 @@ private struct PasswordlessRequestView: View {
|
|||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding()
|
.padding()
|
||||||
} else {
|
} else {
|
||||||
Text(NSLocalizedString("Получить код", comment: ""))
|
// Text(NSLocalizedString("Получить код", comment: ""))
|
||||||
|
// .bold()
|
||||||
|
// .frame(maxWidth: .infinity)
|
||||||
|
// .padding()
|
||||||
|
Text(NSLocalizedString("Войти", comment: ""))
|
||||||
.bold()
|
.bold()
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.padding()
|
.padding()
|
||||||
@ -415,6 +421,27 @@ private struct PasswordlessRequestView: View {
|
|||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
|
Button {
|
||||||
|
viewModel.hasAcceptedTerms = false
|
||||||
|
withAnimation {
|
||||||
|
viewModel.showRegistration()
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Text(NSLocalizedString("Нет аккаунта? Регистрация", comment: ""))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Button(action: {
|
||||||
|
// viewModel.hasAcceptedTerms = false
|
||||||
|
// withAnimation {
|
||||||
|
// viewModel.showRegistration()
|
||||||
|
// }
|
||||||
|
// }) {
|
||||||
|
// Text(NSLocalizedString("Нет аккаунта? Регистрация", comment: "Регистрация"))
|
||||||
|
// .foregroundColor(.blue)
|
||||||
|
// .frame(maxWidth: .infinity)
|
||||||
|
// }
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
viewModel.showPasswordLogin()
|
viewModel.showPasswordLogin()
|
||||||
@ -426,9 +453,9 @@ private struct PasswordlessRequestView: View {
|
|||||||
}
|
}
|
||||||
.padding(.vertical, 4)
|
.padding(.vertical, 4)
|
||||||
|
|
||||||
Text(NSLocalizedString("Код может прийти по почте, push или в другое подключенное приложение.", comment: ""))
|
// Text(NSLocalizedString("Код может прийти по почте, push или в другое подключенное приложение.", comment: ""))
|
||||||
.font(.footnote)
|
// .font(.footnote)
|
||||||
.foregroundColor(.secondary)
|
// .foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
.padding(.vertical, 32)
|
.padding(.vertical, 32)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,7 +54,7 @@ struct RegistrationView: View {
|
|||||||
Button(action: goBack) {
|
Button(action: goBack) {
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
Image(systemName: "arrow.left")
|
Image(systemName: "arrow.left")
|
||||||
Text(NSLocalizedString("Назад к входу", comment: ""))
|
Text(NSLocalizedString("Назад", comment: ""))
|
||||||
}
|
}
|
||||||
.font(.footnote)
|
.font(.footnote)
|
||||||
.foregroundColor(.blue)
|
.foregroundColor(.blue)
|
||||||
@ -63,13 +63,13 @@ struct RegistrationView: View {
|
|||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
Text(NSLocalizedString("Регистрация", comment: "Регистрация"))
|
Text(NSLocalizedString("Регистрация", comment: "Регистрация"))
|
||||||
.font(.largeTitle).bold()
|
.font(.largeTitle).bold()
|
||||||
Text(NSLocalizedString("Создайте логин и пароль. При желании добавьте инвайт.", comment: ""))
|
// Text(NSLocalizedString("Создайте логин и пароль. При желании добавьте инвайт.", comment: ""))
|
||||||
.foregroundColor(.secondary)
|
// .foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
TextField(NSLocalizedString("Логин", comment: "Логин"), text: $username)
|
TextField(NSLocalizedString("Введите логин", comment: "Логин"), text: $username)
|
||||||
.autocapitalization(.none)
|
.autocapitalization(.none)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
.focused($focusedField, equals: .username)
|
.focused($focusedField, equals: .username)
|
||||||
@ -90,7 +90,7 @@ struct RegistrationView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 4) {
|
VStack(alignment: .leading, spacing: 4) {
|
||||||
SecureField(NSLocalizedString("Пароль", comment: "Пароль"), text: $password)
|
SecureField(NSLocalizedString("Введите пароль", comment: "Пароль"), text: $password)
|
||||||
.autocapitalization(.none)
|
.autocapitalization(.none)
|
||||||
.focused($focusedField, equals: .password)
|
.focused($focusedField, equals: .password)
|
||||||
.padding()
|
.padding()
|
||||||
@ -212,7 +212,7 @@ struct RegistrationView: View {
|
|||||||
focusedField = nil
|
focusedField = nil
|
||||||
viewModel.hasAcceptedTerms = false
|
viewModel.hasAcceptedTerms = false
|
||||||
withAnimation {
|
withAnimation {
|
||||||
viewModel.showPasswordLogin()
|
viewModel.showPasswordlessRequest()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user