diff --git a/yobble/Resources/Localizable.xcstrings b/yobble/Resources/Localizable.xcstrings index 50163de..569b2b6 100644 --- a/yobble/Resources/Localizable.xcstrings +++ b/yobble/Resources/Localizable.xcstrings @@ -188,9 +188,6 @@ }, "Profile" : { - }, - "Push включены — приходят все новые сообщения." : { - "comment" : "Message profile notifications subtitle on" }, "Push-уведомления" : { "localizations" : { @@ -223,9 +220,6 @@ }, "Yobble Passport" : { - }, - "Автоудаление" : { - "comment" : "Message profile auto delete alert title\nMessage profile auto delete title" }, "Автоудаление аккаунта" : { "localizations" : { @@ -264,7 +258,7 @@ }, "Безопасность" : { - "comment" : "Message profile safety section title\nЗаголовок экрана настроек безопасности", + "comment" : "Заголовок экрана настроек безопасности", "localizations" : { "en" : { "stringUnit" : { @@ -279,9 +273,6 @@ }, "Биография" : { - }, - "Блокировка и жалобы доступны из профиля, как в Telegram." : { - "comment" : "Message profile safety section description" }, "Блокировка контакта \"%1$@\" появится позже." : { "comment" : "Contacts block placeholder message" @@ -631,9 +622,6 @@ }, "Ещё…" : { - }, - "Жалоба" : { - "comment" : "Message profile report alert title" }, "Заблокирован" : { "comment" : "Message profile blocked tag" @@ -891,9 +879,6 @@ "Кликер в разработке" : { "comment" : "Concept tab placeholder title" }, - "Кнопка поделиться соберёт ссылку, QR и кнопку пересылки контакта." : { - "comment" : "Message profile share alert message" - }, "Код дружбы" : { "comment" : "Friend code badge" }, @@ -906,9 +891,6 @@ "Коды восстановления" : { "comment" : "Раздел кодов восстановления 2FA" }, - "Контакт" : { - "comment" : "Message profile contact section title" - }, "Контактов пока нет" : { "comment" : "Contacts empty state title" }, @@ -1285,9 +1267,6 @@ } } }, - "Настройки чата" : { - "comment" : "Message profile chat settings title" - }, "Начальная настройка" : { }, @@ -1719,9 +1698,6 @@ }, "Отображаемое имя" : { - }, - "Отправим ссылку или QR — как в Telegram." : { - "comment" : "Message profile share contact subtitle" }, "Отправить код ещё раз" : { @@ -1784,18 +1760,12 @@ }, "Очистить всё" : { - }, - "Очистить историю" : { - "comment" : "Message profile clear history title" }, "Очистить кэш (кроме текущего)" : { }, "Очистить кэш текущего пользователя" : { - }, - "Очистка истории" : { - "comment" : "Message profile clear history alert title" }, "Ошибка" : { "comment" : "Common error title\nContacts load error title\nProfile update error title\nЗаголовок сообщения об ошибке", @@ -2030,12 +2000,6 @@ } } }, - "Поделиться" : { - "comment" : "Message profile share alert title" - }, - "Поделиться профилем" : { - "comment" : "Message profile share contact title" - }, "Подключение" : { }, @@ -2062,9 +2026,6 @@ "Подтверждённый профиль" : { "comment" : "Message profile verified tag" }, - "Пожаловаться" : { - "comment" : "Message profile report title" - }, "Пожалуйста, введите корректный e-mail." : { "comment" : "feedback: email error", "localizations" : { @@ -2549,9 +2510,6 @@ }, "Режим" : { - }, - "Режим автоудаления появится чуть позже. Мы добавим пресеты на 24 часа, 7 дней и 1 месяц — совсем как в Telegram." : { - "comment" : "Message profile auto delete alert message" }, "Режим мессенжера" : { @@ -2678,9 +2636,6 @@ "Скоро можно будет искать сообщения, ссылки и файлы в этом чате." : { "comment" : "Message profile search action description" }, - "Скоро можно будет очистить сообщения выборочно или целиком. Пока подготовим дизайн." : { - "comment" : "Message profile clear history alert message" - }, "Скоро появится мини-игра, где можно заработать очки для кастомизации профиля. Следите за обновлениями!" : { "comment" : "Concept tab placeholder description" }, @@ -2740,9 +2695,6 @@ }, "Сообщение слишком длинное." : { - }, - "Сообщения пока сохраняются навсегда." : { - "comment" : "Message profile auto delete subtitle" }, "Сообщите о материалах" : { "comment" : "feedback category subtitle: content", @@ -2755,9 +2707,6 @@ } } }, - "Сообщите о спаме или нарушении правил." : { - "comment" : "Message profile report subtitle" - }, "Сохранение..." : { }, @@ -2884,15 +2833,9 @@ }, "Тип диалога" : { - }, - "Тишина включена. Чат не тревожит до включения сигнала." : { - "comment" : "Message profile notifications subtitle off" }, "Только чаты (готово 60%)" : { - }, - "Тонкие настройки диалога по образцу профиля Telegram." : { - "comment" : "Message profile chat settings description" }, "Ты шо ебанутый? А ниче тот факт что новый пароль должен отличаться от старого." : { "localizations" : { @@ -2941,9 +2884,6 @@ "Удалить контакт" : { "comment" : "Contacts context action delete" }, - "Удалить переписку только для себя." : { - "comment" : "Message profile clear history subtitle" - }, "Удалить фото" : { "comment" : "Avatar delete" }, @@ -2967,12 +2907,6 @@ } } }, - "Управление карточкой собеседника." : { - "comment" : "Message profile contact section description" - }, - "Форма жалобы появится чуть позже — добавим прикрепление скриншотов и тип нарушения." : { - "comment" : "Message profile report alert message" - }, "Функция пока недоступна." : { "comment" : "Сообщение заглушки" }, diff --git a/yobble/Views/Chat/MessageProfileView.swift b/yobble/Views/Chat/MessageProfileView.swift index 68d4c2b..5a252d6 100644 --- a/yobble/Views/Chat/MessageProfileView.swift +++ b/yobble/Views/Chat/MessageProfileView.swift @@ -23,10 +23,7 @@ struct MessageProfileView: View { quickActionsSection aboutSection mediaPreviewSection - chatSettingsSection - contactActionsSection - safetySection - footerHint +// footerHint } .padding(.horizontal, 20) .padding(.vertical, 24) @@ -369,142 +366,14 @@ struct MessageProfileView: View { } } - private var chatSettingsSection: some View { - section( - title: NSLocalizedString("Настройки чата", comment: "Message profile chat settings title"), - description: NSLocalizedString("Тонкие настройки диалога по образцу профиля Telegram.", comment: "Message profile chat settings description") - ) { - card { - VStack(spacing: 0) { - Toggle(isOn: $areNotificationsEnabled) { - VStack(alignment: .leading, spacing: 2) { - Text(NSLocalizedString("Уведомления", comment: "Message profile notifications title")) - Text( - areNotificationsEnabled - ? NSLocalizedString("Push включены — приходят все новые сообщения.", comment: "Message profile notifications subtitle on") - : NSLocalizedString("Тишина включена. Чат не тревожит до включения сигнала.", comment: "Message profile notifications subtitle off") - ) - .font(.caption) - .foregroundColor(.secondary) - } - } - .toggleStyle(SwitchToggleStyle(tint: .accentColor)) - .padding(.vertical, 4) - - rowDivider - - buttonRow( - icon: "timer", - title: NSLocalizedString("Автоудаление", comment: "Message profile auto delete title"), - subtitle: NSLocalizedString("Сообщения пока сохраняются навсегда.", comment: "Message profile auto delete subtitle"), - iconTint: .orange - ) { - showPlaceholderAction( - title: NSLocalizedString("Автоудаление", comment: "Message profile auto delete alert title"), - message: NSLocalizedString("Режим автоудаления появится чуть позже. Мы добавим пресеты на 24 часа, 7 дней и 1 месяц — совсем как в Telegram.", comment: "Message profile auto delete alert message") - ) - } - - rowDivider - - buttonRow( - icon: "text.bubble", - title: NSLocalizedString("Очистить историю", comment: "Message profile clear history title"), - subtitle: NSLocalizedString("Удалить переписку только для себя.", comment: "Message profile clear history subtitle"), - iconTint: .blue - ) { - showPlaceholderAction( - title: NSLocalizedString("Очистка истории", comment: "Message profile clear history alert title"), - message: NSLocalizedString("Скоро можно будет очистить сообщения выборочно или целиком. Пока подготовим дизайн.", comment: "Message profile clear history alert message") - ) - } - } - } - } - } - - private var contactActionsSection: some View { - section( - title: NSLocalizedString("Контакт", comment: "Message profile contact section title"), - description: NSLocalizedString("Управление карточкой собеседника.", comment: "Message profile contact section description") - ) { - card { - VStack(spacing: 0) { - buttonRow( - icon: "person.badge.plus", - title: NSLocalizedString("Добавить в контакты", comment: "Message profile add to contacts title"), - subtitle: NSLocalizedString("Появится отдельная запись в адресной книге Yobble.", comment: "Message profile add to contacts subtitle"), - iconTint: .accentColor - ) { - handleAddContactTap() - } - - rowDivider - - buttonRow( - icon: "paperplane.fill", - title: NSLocalizedString("Поделиться профилем", comment: "Message profile share contact title"), - subtitle: NSLocalizedString("Отправим ссылку или QR — как в Telegram.", comment: "Message profile share contact subtitle"), - iconTint: .purple - ) { - showPlaceholderAction( - title: NSLocalizedString("Поделиться", comment: "Message profile share alert title"), - message: NSLocalizedString("Кнопка поделиться соберёт ссылку, QR и кнопку пересылки контакта.", comment: "Message profile share alert message") - ) - } - } - } - } - } - - private var safetySection: some View { - section( - title: NSLocalizedString("Безопасность", comment: "Message profile safety section title"), - description: NSLocalizedString("Блокировка и жалобы доступны из профиля, как в Telegram.", comment: "Message profile safety section description") - ) { - card { - VStack(spacing: 0) { - buttonRow( - icon: "hand.raised.slash.fill", - title: isBlockedByCurrentUser - ? NSLocalizedString("Разблокировать", comment: "Message profile unblock title") - : NSLocalizedString("Заблокировать", comment: "Message profile block title"), - subtitle: isBlockedByCurrentUser - ? NSLocalizedString("Пользователь снова сможет писать вам.", comment: "Message profile unblock subtitle") - : NSLocalizedString("Перестанет появляться в чате и не сможет писать.", comment: "Message profile block subtitle"), - iconTint: .red, - destructive: true - ) { - handleBlockToggleTap() - } - - rowDivider - - buttonRow( - icon: "exclamationmark.bubble.fill", - title: NSLocalizedString("Пожаловаться", comment: "Message profile report title"), - subtitle: NSLocalizedString("Сообщите о спаме или нарушении правил.", comment: "Message profile report subtitle"), - iconTint: .orange, - destructive: true - ) { - showPlaceholderAction( - title: NSLocalizedString("Жалоба", comment: "Message profile report alert title"), - message: NSLocalizedString("Форма жалобы появится чуть позже — добавим прикрепление скриншотов и тип нарушения.", comment: "Message profile report alert message") - ) - } - } - } - } - } - - private var footerHint: some View { - Text(NSLocalizedString("Мы постепенно повторяем знакомый паттерн Telegram, чтобы переход был комфортным. Укажите, что ещё ожидать на экране профиля — добавим приоритетно.", comment: "Message profile footer")) - .font(.footnote) - .foregroundColor(.secondary) - .multilineTextAlignment(.center) - .padding(.horizontal, 12) - .padding(.bottom, 24) - } +// private var footerHint: some View { +// Text(NSLocalizedString("Мы постепенно повторяем знакомый паттерн Telegram, чтобы переход был комфортным. Укажите, что ещё ожидать на экране профиля — добавим приоритетно.", comment: "Message profile footer")) +// .font(.footnote) +// .foregroundColor(.secondary) +// .multilineTextAlignment(.center) +// .padding(.horizontal, 12) +// .padding(.bottom, 24) +// } // MARK: - Helper Builders