Compare commits

..

No commits in common. "2f68345c569aa1eba31589c3ec98a2852e87dc62" and "359b51627228b1b84f4102c0c69da771bc4d2285" have entirely different histories.

7 changed files with 15 additions and 107 deletions

View File

@ -235,9 +235,6 @@
}
}
},
"Если не нашли ответ, напишите нам своё предложение или проблему." : {
"comment" : "FAQ: contact developers footer"
},
"Заглушка: Push-уведомления" : {
},
@ -336,7 +333,6 @@
}
},
"Идеи" : {
"extractionState" : "stale",
"localizations" : {
"en" : {
"stringUnit" : {
@ -400,12 +396,6 @@
}
}
},
"Кликер в разработке" : {
"comment" : "Concept tab placeholder title"
},
"Концепт" : {
"comment" : "Tab bar: concept clicker"
},
"Корзина" : {
"comment" : "Cart",
"localizations" : {
@ -1134,9 +1124,6 @@
}
}
},
"Связаться с разработчиками" : {
"comment" : "FAQ: contact developers link"
},
"Сервер не отвечает. Попробуйте позже." : {
"localizations" : {
"en" : {
@ -1178,9 +1165,6 @@
}
}
},
"Скоро появится мини-игра, где можно заработать очки для кастомизации профиля. Следите за обновлениями!" : {
"comment" : "Concept tab placeholder description"
},
"Слишком много запросов." : {
"localizations" : {
"en" : {

View File

@ -6,9 +6,6 @@
//
import SwiftUI
#if canImport(UIKit)
import UIKit
#endif
struct ChatsTab: View {
var currentUserId: String?
@ -128,9 +125,7 @@ struct ChatsTab: View {
}
}
.listStyle(.plain)
.modifier(ScrollDismissesKeyboardModifier())
.simultaneousGesture(searchBarGesture)
.simultaneousGesture(tapToDismissKeyboardGesture)
// .safeAreaInset(edge: .top) {
// VStack(spacing: 0) {
// searchBar
@ -198,12 +193,6 @@ struct ChatsTab: View {
}
}
private var tapToDismissKeyboardGesture: some Gesture {
TapGesture().onEnded {
dismissKeyboard()
}
}
private var isSearching: Bool {
!searchText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
}
@ -297,24 +286,6 @@ struct ChatsTab: View {
}
}
private extension ChatsTab {
func dismissKeyboard() {
#if canImport(UIKit)
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
#endif
}
}
private struct ScrollDismissesKeyboardModifier: ViewModifier {
func body(content: Content) -> some View {
if #available(iOS 16.0, *) {
content.scrollDismissesKeyboard(.interactively)
} else {
content
}
}
}
private struct ChatRowView: View {
let chat: PrivateChatListItem
let currentUserId: String?

View File

@ -1,33 +0,0 @@
import SwiftUI
struct ConceptTab: View {
var body: some View {
ScrollView {
VStack(spacing: 24) {
Image(systemName: "gamecontroller.fill")
.resizable()
.scaledToFit()
.frame(width: 96, height: 96)
.foregroundColor(.accentColor)
Text(NSLocalizedString("Кликер в разработке", comment: "Concept tab placeholder title"))
.font(.title2)
.fontWeight(.semibold)
Text(NSLocalizedString("Скоро появится мини-игра, где можно заработать очки для кастомизации профиля. Следите за обновлениями!", comment: "Concept tab placeholder description"))
.font(.body)
.multilineTextAlignment(.center)
.foregroundColor(.secondary)
.padding(.horizontal)
}
.padding(.vertical, 48)
.frame(maxWidth: .infinity)
}
.background(Color(UIColor.systemGroupedBackground))
}
}
#Preview {
ConceptTab()
.environmentObject(ThemeManager())
}

View File

@ -12,7 +12,7 @@ struct CustomTabBar: View {
}
// Tab 2: Search
TabBarButton(systemName: "gamecontroller.fill", text: NSLocalizedString("Концепт", comment: "Tab bar: concept clicker"), isSelected: selectedTab == 1) {
TabBarButton(systemName: "lightbulb", text: NSLocalizedString("Идеи", comment: ""), isSelected: selectedTab == 1) {
selectedTab = 1
}

View File

@ -3,7 +3,7 @@ import SwiftUI
import UIKit
#endif
struct FeedbackView: View {
struct FeedbackTab: View {
@State private var suggestion: String = ""
@State private var submittedSuggestion: String? = nil
@State private var isSubmitting: Bool = false
@ -122,7 +122,7 @@ struct FeedbackView: View {
}
}
private extension FeedbackView {
private extension FeedbackTab {
func dismissKeyboardIfNeeded() {
guard isSuggestionFocused else { return }
isSuggestionFocused = false
@ -133,9 +133,9 @@ private extension FeedbackView {
}
}
struct FeedbackView_Previews: PreviewProvider {
struct FeedbackTab_Previews: PreviewProvider {
static var previews: some View {
FeedbackView()
FeedbackTab()
.environmentObject(ThemeManager())
}
}

View File

@ -18,7 +18,7 @@ struct MainView: View {
private var tabTitle: String {
switch selectedTab {
case 0: return "Home"
case 1: return "Concept"
case 1: return "Ideas"
case 2: return "Chats"
case 3: return "Profile"
default: return "Home"
@ -47,7 +47,7 @@ struct MainView: View {
NewHomeTab()
.opacity(selectedTab == 0 ? 1 : 0)
ConceptTab()
FeedbackTab()
.opacity(selectedTab == 1 ? 1 : 0)
ChatsTab(

View File

@ -23,29 +23,15 @@ struct FAQView: View {
]
var body: some View {
List {
ForEach(faqItems) { item in
VStack(alignment: .leading, spacing: 6) {
Text(item.question)
.font(.headline)
Text(item.answer)
.font(.subheadline)
.foregroundColor(.secondary)
}
.padding(.vertical, 6)
}
Section {
NavigationLink(destination: FeedbackView()) {
Text(NSLocalizedString("Связаться с разработчиками", comment: "FAQ: contact developers link"))
.font(.callout)
.fontWeight(.semibold)
.foregroundColor(.accentColor)
}
} footer: {
Text(NSLocalizedString("Если не нашли ответ, напишите нам своё предложение или проблему.", comment: "FAQ: contact developers footer"))
.font(.footnote)
List(faqItems) { item in
VStack(alignment: .leading, spacing: 6) {
Text(item.question)
.font(.headline)
Text(item.answer)
.font(.subheadline)
.foregroundColor(.secondary)
}
.padding(.vertical, 6)
}
.listStyle(.insetGrouped)
.navigationTitle(NSLocalizedString("Частые вопросы", comment: "FAQ navigation title"))