Compare commits

...

4 Commits

Author SHA1 Message Date
526a57b556 patch error 2025-10-26 02:52:16 +03:00
7f73216936 add msg 2025-10-26 02:49:59 +03:00
128ed5723a edit loading 2025-10-26 02:47:58 +03:00
0a7d519567 add error msg 2025-10-26 02:39:55 +03:00
2 changed files with 57 additions and 49 deletions

View File

@ -94,9 +94,6 @@
}, },
"Email не подтверждён. Подтвердите, чтобы активировать дополнительные проверки." : { "Email не подтверждён. Подтвердите, чтобы активировать дополнительные проверки." : {
"comment" : "Описание необходимости подтверждения email" "comment" : "Описание необходимости подтверждения email"
},
"error" : {
}, },
"Fun Fest" : { "Fun Fest" : {
"comment" : "Fun Fest", "comment" : "Fun Fest",
@ -644,6 +641,9 @@
}, },
"Значение сохранено в буфере обмена." : { "Значение сохранено в буфере обмена." : {
"comment" : "Сообщение после копирования" "comment" : "Сообщение после копирования"
},
"Идет загрузка..." : {
}, },
"Идея" : { "Идея" : {
"comment" : "feedback category: idea", "comment" : "feedback category: idea",

View File

@ -25,14 +25,6 @@ struct BlockedUsersView: View {
emptyState emptyState
} else { } else {
usersSection usersSection
if isLoading {
Section {
ProgressView()
.frame(maxWidth: .infinity, alignment: .center)
}
} else if errorMessageDown != nil{
Text("error")
}
} }
} }
.navigationTitle(NSLocalizedString("Заблокированные", comment: "")) .navigationTitle(NSLocalizedString("Заблокированные", comment: ""))
@ -88,8 +80,26 @@ struct BlockedUsersView: View {
private var usersSection: some View { private var usersSection: some View {
Section(header: Text(NSLocalizedString("Заблокированные", comment: ""))) { Section(header: Text(NSLocalizedString("Заблокированные", comment: ""))) {
ForEach(blockedUsers) { ForEach(blockedUsers) { user in
user in userRow(user)
}
if isLoading {
Text("Идет загрузка...")
.foregroundColor(.gray)
.frame(maxWidth: .infinity, alignment: .center)
.listRowBackground(Color.clear)
.listRowSeparator(.hidden)
} else if let errorMessage = errorMessageDown {
Text(errorMessage)
.foregroundColor(.red)
.frame(maxWidth: .infinity, alignment: .center)
.listRowBackground(Color.clear)
.listRowSeparator(.hidden)
}
}
}
private func userRow(_ user: BlockedUser) -> some View {
HStack(spacing: 12) { HStack(spacing: 12) {
Circle() Circle()
.fill(Color.accentColor.opacity(0.15)) .fill(Color.accentColor.opacity(0.15))
@ -128,8 +138,6 @@ struct BlockedUsersView: View {
} }
} }
} }
}
}
private var emptyState: some View { private var emptyState: some View {
VStack(spacing: 12) { VStack(spacing: 12) {
@ -185,7 +193,7 @@ struct BlockedUsersView: View {
if offset == 0 { if offset == 0 {
loadError = message loadError = message
} }
activeAlert = .error(message: message) // activeAlert = .error(message: message)
errorMessageDown = message errorMessageDown = message
if AppConfig.DEBUG { print("[BlockedUsersView] load blocked users failed: \(error)") } if AppConfig.DEBUG { print("[BlockedUsersView] load blocked users failed: \(error)") }
} }