diff --git a/yobble/Resources/Localizable.xcstrings b/yobble/Resources/Localizable.xcstrings index a1783b8..35910c6 100644 --- a/yobble/Resources/Localizable.xcstrings +++ b/yobble/Resources/Localizable.xcstrings @@ -278,7 +278,7 @@ "comment" : "Поле ввода кода 2FA" }, "Введите логин" : { - + "comment" : "Логин" }, "Введите логин и мы отправим шестизначный код подтверждения." : { @@ -287,7 +287,7 @@ }, "Введите пароль" : { - "comment" : "Поле ввода пароля на приложение" + "comment" : "Пароль\nПоле ввода пароля на приложение" }, "Веб" : { "comment" : "Тип сессии — веб" @@ -362,9 +362,6 @@ } } } - }, - "Войти по коду" : { - }, "Войти по паролю" : { @@ -947,9 +944,6 @@ }, "Мессенджер-режим сейчас проработан примерно на 50%." : { - }, - "Мессенджер-режим сейчас проработан примерно на 60%." : { - }, "Мини-приложения" : { "comment" : "Applets", @@ -1043,7 +1037,7 @@ } } }, - "Назад к входу" : { + "Назад" : { }, "Напишите нам через форму обратной связи в разделе \"Поддержка\"." : { @@ -1704,6 +1698,7 @@ }, "Пароль" : { "comment" : "Пароль", + "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { diff --git a/yobble/Views/Login/LoginView.swift b/yobble/Views/Login/LoginView.swift index 90b49f9..6a2f652 100644 --- a/yobble/Views/Login/LoginView.swift +++ b/yobble/Views/Login/LoginView.swift @@ -117,7 +117,7 @@ struct PasswordLoginView: View { } label: { HStack(spacing: 6) { Image(systemName: "arrow.left") - Text(NSLocalizedString("Войти по коду", comment: "")) + Text(NSLocalizedString("Назад", comment: "")) } .font(.footnote) .foregroundColor(.blue) @@ -126,12 +126,12 @@ struct PasswordLoginView: View { VStack(alignment: .leading, spacing: 8) { Text(NSLocalizedString("Вход по паролю", comment: "")) .font(.largeTitle).bold() - Text(NSLocalizedString("Если предпочитаете классический вход, используйте логин и пароль.", comment: "")) - .foregroundColor(.secondary) +// Text(NSLocalizedString("Если предпочитаете классический вход, используйте логин и пароль.", comment: "")) +// .foregroundColor(.secondary) } VStack(alignment: .leading, spacing: 12) { - TextField(NSLocalizedString("Логин", comment: ""), text: $viewModel.username) + TextField(NSLocalizedString("Введите логин", comment: ""), text: $viewModel.username) .padding() .background(Color(.secondarySystemBackground)) .cornerRadius(12) @@ -150,7 +150,7 @@ struct PasswordLoginView: View { .font(.caption) } - SecureField(NSLocalizedString("Пароль", comment: ""), text: $viewModel.password) + SecureField(NSLocalizedString("Введите пароль", comment: ""), text: $viewModel.password) .padding() .background(Color(.secondarySystemBackground)) .cornerRadius(12) @@ -169,15 +169,15 @@ struct PasswordLoginView: View { } } - VStack(alignment: .leading, spacing: 4) { - Toggle(NSLocalizedString("Режим мессенжера", comment: ""), isOn: $isMessengerModeEnabled) - .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - Text(isMessengerModeEnabled - ? "Мессенджер-режим сейчас проработан примерно на 60%." - : "Основной режим находится в ранней разработке (около 10%).") - .font(.footnote) - .foregroundColor(.secondary) - } +// VStack(alignment: .leading, spacing: 4) { +// Toggle(NSLocalizedString("Режим мессенжера", comment: ""), isOn: $isMessengerModeEnabled) +// .toggleStyle(SwitchToggleStyle(tint: .accentColor)) +// Text(isMessengerModeEnabled +// ? "Мессенджер-режим сейчас проработан примерно на 60%." +// : "Основной режим находится в ранней разработке (около 10%).") +// .font(.footnote) +// .foregroundColor(.secondary) +// } Button(action: { viewModel.login() @@ -369,6 +369,8 @@ private struct PasswordlessRequestView: View { Text(NSLocalizedString("Вход", comment: "")) .font(.largeTitle).bold() // Text(NSLocalizedString("Введите логин и мы отправим шестизначный код подтверждения.", comment: "")) +// .foregroundColor(.secondary) +// Text(NSLocalizedString("Введите логин и мы отправим шестизначный код подтверждения.", comment: "")) // .foregroundColor(.secondary) } @@ -402,7 +404,11 @@ private struct PasswordlessRequestView: View { .frame(maxWidth: .infinity) .padding() } else { - Text(NSLocalizedString("Получить код", comment: "")) +// Text(NSLocalizedString("Получить код", comment: "")) +// .bold() +// .frame(maxWidth: .infinity) +// .padding() + Text(NSLocalizedString("Войти", comment: "")) .bold() .frame(maxWidth: .infinity) .padding() @@ -415,6 +421,27 @@ private struct PasswordlessRequestView: View { 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 { withAnimation { viewModel.showPasswordLogin() @@ -426,9 +453,9 @@ private struct PasswordlessRequestView: View { } .padding(.vertical, 4) - Text(NSLocalizedString("Код может прийти по почте, push или в другое подключенное приложение.", comment: "")) - .font(.footnote) - .foregroundColor(.secondary) +// Text(NSLocalizedString("Код может прийти по почте, push или в другое подключенное приложение.", comment: "")) +// .font(.footnote) +// .foregroundColor(.secondary) } .padding(.vertical, 32) } diff --git a/yobble/Views/Login/RegistrationView.swift b/yobble/Views/Login/RegistrationView.swift index ede5ea7..049b3f1 100644 --- a/yobble/Views/Login/RegistrationView.swift +++ b/yobble/Views/Login/RegistrationView.swift @@ -54,7 +54,7 @@ struct RegistrationView: View { Button(action: goBack) { HStack(spacing: 6) { Image(systemName: "arrow.left") - Text(NSLocalizedString("Назад к входу", comment: "")) + Text(NSLocalizedString("Назад", comment: "")) } .font(.footnote) .foregroundColor(.blue) @@ -63,13 +63,13 @@ struct RegistrationView: View { VStack(alignment: .leading, spacing: 8) { Text(NSLocalizedString("Регистрация", comment: "Регистрация")) .font(.largeTitle).bold() - Text(NSLocalizedString("Создайте логин и пароль. При желании добавьте инвайт.", comment: "")) - .foregroundColor(.secondary) +// Text(NSLocalizedString("Создайте логин и пароль. При желании добавьте инвайт.", comment: "")) +// .foregroundColor(.secondary) } Group { VStack(alignment: .leading, spacing: 4) { - TextField(NSLocalizedString("Логин", comment: "Логин"), text: $username) + TextField(NSLocalizedString("Введите логин", comment: "Логин"), text: $username) .autocapitalization(.none) .disableAutocorrection(true) .focused($focusedField, equals: .username) @@ -90,7 +90,7 @@ struct RegistrationView: View { } VStack(alignment: .leading, spacing: 4) { - SecureField(NSLocalizedString("Пароль", comment: "Пароль"), text: $password) + SecureField(NSLocalizedString("Введите пароль", comment: "Пароль"), text: $password) .autocapitalization(.none) .focused($focusedField, equals: .password) .padding() @@ -212,7 +212,7 @@ struct RegistrationView: View { focusedField = nil viewModel.hasAcceptedTerms = false withAnimation { - viewModel.showPasswordLogin() + viewModel.showPasswordlessRequest() } }