Compare commits

..

No commits in common. "c84a8e36a0457adcbe8ef8814150d3429d00a32d" and "19939dcf6147cdc1280f37d6105adcd14f7ae39a" have entirely different histories.

2 changed files with 219 additions and 22 deletions

View File

@ -188,6 +188,9 @@
},
"Profile" : {
},
"Push включены — приходят все новые сообщения." : {
"comment" : "Message profile notifications subtitle on"
},
"Push-уведомления" : {
"localizations" : {
@ -220,6 +223,9 @@
},
"Yobble Passport" : {
},
"Автоудаление" : {
"comment" : "Message profile auto delete alert title\nMessage profile auto delete title"
},
"Автоудаление аккаунта" : {
"localizations" : {
@ -258,7 +264,7 @@
},
"Безопасность" : {
"comment" : "Заголовок экрана настроек безопасности",
"comment" : "Message profile safety section title\nЗаголовок экрана настроек безопасности",
"localizations" : {
"en" : {
"stringUnit" : {
@ -273,6 +279,9 @@
},
"Биография" : {
},
"Блокировка и жалобы доступны из профиля, как в Telegram." : {
"comment" : "Message profile safety section description"
},
"Блокировка контакта \"%1$@\" появится позже." : {
"comment" : "Contacts block placeholder message"
@ -622,6 +631,9 @@
},
"Ещё…" : {
},
"Жалоба" : {
"comment" : "Message profile report alert title"
},
"Заблокирован" : {
"comment" : "Message profile blocked tag"
@ -879,6 +891,9 @@
"Кликер в разработке" : {
"comment" : "Concept tab placeholder title"
},
"Кнопка поделиться соберёт ссылку, QR и кнопку пересылки контакта." : {
"comment" : "Message profile share alert message"
},
"Код дружбы" : {
"comment" : "Friend code badge"
},
@ -891,6 +906,9 @@
"Коды восстановления" : {
"comment" : "Раздел кодов восстановления 2FA"
},
"Контакт" : {
"comment" : "Message profile contact section title"
},
"Контактов пока нет" : {
"comment" : "Contacts empty state title"
},
@ -1267,6 +1285,9 @@
}
}
},
"Настройки чата" : {
"comment" : "Message profile chat settings title"
},
"Начальная настройка" : {
},
@ -1698,6 +1719,9 @@
},
"Отображаемое имя" : {
},
"Отправим ссылку или QR — как в Telegram." : {
"comment" : "Message profile share contact subtitle"
},
"Отправить код ещё раз" : {
@ -1760,12 +1784,18 @@
},
"Очистить всё" : {
},
"Очистить историю" : {
"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Заголовок сообщения об ошибке",
@ -2000,6 +2030,12 @@
}
}
},
"Поделиться" : {
"comment" : "Message profile share alert title"
},
"Поделиться профилем" : {
"comment" : "Message profile share contact title"
},
"Подключение" : {
},
@ -2026,6 +2062,9 @@
"Подтверждённый профиль" : {
"comment" : "Message profile verified tag"
},
"Пожаловаться" : {
"comment" : "Message profile report title"
},
"Пожалуйста, введите корректный e-mail." : {
"comment" : "feedback: email error",
"localizations" : {
@ -2510,6 +2549,9 @@
},
"Режим" : {
},
"Режим автоудаления появится чуть позже. Мы добавим пресеты на 24 часа, 7 дней и 1 месяц — совсем как в Telegram." : {
"comment" : "Message profile auto delete alert message"
},
"Режим мессенжера" : {
@ -2636,6 +2678,9 @@
"Скоро можно будет искать сообщения, ссылки и файлы в этом чате." : {
"comment" : "Message profile search action description"
},
"Скоро можно будет очистить сообщения выборочно или целиком. Пока подготовим дизайн." : {
"comment" : "Message profile clear history alert message"
},
"Скоро появится мини-игра, где можно заработать очки для кастомизации профиля. Следите за обновлениями!" : {
"comment" : "Concept tab placeholder description"
},
@ -2695,6 +2740,9 @@
},
"Сообщение слишком длинное." : {
},
"Сообщения пока сохраняются навсегда." : {
"comment" : "Message profile auto delete subtitle"
},
"Сообщите о материалах" : {
"comment" : "feedback category subtitle: content",
@ -2707,6 +2755,9 @@
}
}
},
"Сообщите о спаме или нарушении правил." : {
"comment" : "Message profile report subtitle"
},
"Сохранение..." : {
},
@ -2833,9 +2884,15 @@
},
"Тип диалога" : {
},
"Тишина включена. Чат не тревожит до включения сигнала." : {
"comment" : "Message profile notifications subtitle off"
},
"Только чаты (готово 60%)" : {
},
"Тонкие настройки диалога по образцу профиля Telegram." : {
"comment" : "Message profile chat settings description"
},
"Ты шо ебанутый? А ниче тот факт что новый пароль должен отличаться от старого." : {
"localizations" : {
@ -2884,6 +2941,9 @@
"Удалить контакт" : {
"comment" : "Contacts context action delete"
},
"Удалить переписку только для себя." : {
"comment" : "Message profile clear history subtitle"
},
"Удалить фото" : {
"comment" : "Avatar delete"
},
@ -2907,6 +2967,12 @@
}
}
},
"Управление карточкой собеседника." : {
"comment" : "Message profile contact section description"
},
"Форма жалобы появится чуть позже — добавим прикрепление скриншотов и тип нарушения." : {
"comment" : "Message profile report alert message"
},
"Функция пока недоступна." : {
"comment" : "Сообщение заглушки"
},

View File

@ -23,7 +23,10 @@ struct MessageProfileView: View {
quickActionsSection
aboutSection
mediaPreviewSection
// footerHint
chatSettingsSection
contactActionsSection
safetySection
footerHint
}
.padding(.horizontal, 20)
.padding(.vertical, 24)
@ -366,14 +369,142 @@ struct MessageProfileView: View {
}
}
// 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 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)
}
// MARK: - Helper Builders
@ -694,24 +825,24 @@ struct MessageProfileView: View {
description: NSLocalizedString("Голосовые звонки пока недоступны. Как только включим WebRTC, кнопка оживёт.", comment: "Message profile call action description"),
tint: .green
),
ProfileQuickAction(
icon: "video.fill",
title: NSLocalizedString("Видео", comment: "Message profile video action"),
description: NSLocalizedString("Видео созвоны появятся вместе с звонками. Интерфейс повторит Telegram.", comment: "Message profile video action description"),
tint: .purple
),
// ProfileQuickAction(
// icon: "video.fill",
// title: NSLocalizedString("Видео", comment: "Message profile video action"),
// description: NSLocalizedString("Видео созвоны появятся вместе с звонками. Интерфейс повторит Telegram.", comment: "Message profile video action description"),
// tint: .purple
// ),
ProfileQuickAction(
icon: "bell.slash.fill",
title: NSLocalizedString("Заглушить", comment: "Message profile mute action"),
description: NSLocalizedString("Появится мутация на 1 час, 1 день или навсегда.", comment: "Message profile mute action description"),
tint: .orange
),
// ProfileQuickAction(
// icon: "magnifyingglass",
// title: NSLocalizedString("Поиск", comment: "Message profile search action"),
// description: NSLocalizedString("Скоро можно будет искать сообщения, ссылки и файлы в этом чате.", comment: "Message profile search action description"),
// tint: .blue
// ),
ProfileQuickAction(
icon: "magnifyingglass",
title: NSLocalizedString("Поиск", comment: "Message profile search action"),
description: NSLocalizedString("Скоро можно будет искать сообщения, ссылки и файлы в этом чате.", comment: "Message profile search action description"),
tint: .blue
),
ProfileQuickAction(
icon: "ellipsis.circle",
title: NSLocalizedString("Ещё", comment: "Message profile more action"),