mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-22 08:10:59 +00:00
Mute and report cleanup
This commit is contained in:
parent
8e6793fbf5
commit
a5483a87d2
4 changed files with 31 additions and 29 deletions
|
@ -27,12 +27,12 @@
|
||||||
"account.joined-%@" = "Joined %@";
|
"account.joined-%@" = "Joined %@";
|
||||||
"account.locked.accessibility-label" = "Locked account";
|
"account.locked.accessibility-label" = "Locked account";
|
||||||
"account.mute" = "Mute";
|
"account.mute" = "Mute";
|
||||||
"account.mute.indefinite" = "Indefnite";
|
"account.mute.indefinite" = "Indefinite";
|
||||||
"account.mute.confirm-%@" = "Are you sure you want to mute %@?";
|
"account.mute.confirm-%@" = "Are you sure you want to mute %@?";
|
||||||
"account.mute.confirm.explanation" = "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts and follow you.";
|
"account.mute.confirm.explanation" = "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts and follow you.";
|
||||||
"account.mute.confirm.hide-notifications" = "Hide notifications from this user?";
|
"account.mute.confirm.hide-notifications" = "Hide notifications from this user?";
|
||||||
"account.mute.confirm.duration" = "Duration";
|
"account.mute.confirm.duration" = "Duration";
|
||||||
"account.mute.target-%@" = "Muting %@";
|
"account.mute.target-%@" = "Mute %@";
|
||||||
"account.muted" = "Muted";
|
"account.muted" = "Muted";
|
||||||
"account.reject-follow-request-button.accessibility-label" = "Reject follow request";
|
"account.reject-follow-request-button.accessibility-label" = "Reject follow request";
|
||||||
"account.request" = "Request";
|
"account.request" = "Request";
|
||||||
|
@ -245,9 +245,9 @@
|
||||||
"notifications.unknown" = "Notification from %@";
|
"notifications.unknown" = "Notification from %@";
|
||||||
"remove" = "Remove";
|
"remove" = "Remove";
|
||||||
"report" = "Report";
|
"report" = "Report";
|
||||||
|
"report.additional-comments" = "Additional comments";
|
||||||
"report.hint" = "The report will be sent to your server moderators. You can provide an explanation of why you are reporting this account below:";
|
"report.hint" = "The report will be sent to your server moderators. You can provide an explanation of why you are reporting this account below:";
|
||||||
"report.placeholder" = "Additional comments";
|
"report.target-%@" = "Report %@";
|
||||||
"report.target-%@" = "Reporting %@";
|
|
||||||
"report.forward.hint" = "The account is from another server. Send an anonymized copy of the report there as well?";
|
"report.forward.hint" = "The account is from another server. Send an anonymized copy of the report there as well?";
|
||||||
"report.forward-%@" = "Forward report to %@";
|
"report.forward-%@" = "Forward report to %@";
|
||||||
"search.scope.all" = "All";
|
"search.scope.all" = "All";
|
||||||
|
@ -302,7 +302,6 @@
|
||||||
"status.visibility.unlisted.description" = "Visible for all, but not in public timelines";
|
"status.visibility.unlisted.description" = "Visible for all, but not in public timelines";
|
||||||
"status.visibility.private.description" = "Visible for followers only";
|
"status.visibility.private.description" = "Visible for followers only";
|
||||||
"status.visibility.direct.description" = "Visible for mentioned users only";
|
"status.visibility.direct.description" = "Visible for mentioned users only";
|
||||||
"submit" = "Submit";
|
|
||||||
"tag.accessibility-recent-uses-%ld" = "%ld recent uses";
|
"tag.accessibility-recent-uses-%ld" = "%ld recent uses";
|
||||||
"tag.accessibility-hint.post" = "View posts associated with trend";
|
"tag.accessibility-hint.post" = "View posts associated with trend";
|
||||||
"tag.accessibility-hint.toot" = "View toots associated with trend";
|
"tag.accessibility-hint.toot" = "View toots associated with trend";
|
||||||
|
|
|
@ -11,21 +11,23 @@ struct MuteView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
VStack(alignment: .leading, spacing: .defaultSpacing) {
|
Section {
|
||||||
Text("account.mute.confirm-\(viewModel.accountName)")
|
VStack(alignment: .leading, spacing: .defaultSpacing) {
|
||||||
Text("account.mute.confirm.explanation")
|
Text("account.mute.confirm-\(viewModel.accountName)")
|
||||||
}
|
Text("account.mute.confirm.explanation")
|
||||||
Toggle("account.mute.confirm.hide-notifications", isOn: $viewModel.notifications)
|
}
|
||||||
Picker("account.mute.confirm.duration", selection: $viewModel.duration) {
|
Toggle("account.mute.confirm.hide-notifications", isOn: $viewModel.notifications)
|
||||||
ForEach(MuteViewModel.Duration.allCases) { duration in
|
Picker("account.mute.confirm.duration", selection: $viewModel.duration) {
|
||||||
Text(verbatim: duration.title).tag(duration)
|
ForEach(MuteViewModel.Duration.allCases) { duration in
|
||||||
|
Text(verbatim: duration.title).tag(duration)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Group {
|
Section {
|
||||||
if viewModel.loading {
|
if viewModel.loading {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
} else {
|
} else {
|
||||||
Button("account.mute") {
|
Button("account.mute.target-\(viewModel.accountName)") {
|
||||||
viewModel.mute()
|
viewModel.mute()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,25 +19,25 @@ struct ReportView: View {
|
||||||
}
|
}
|
||||||
Section {
|
Section {
|
||||||
Text("report.hint")
|
Text("report.hint")
|
||||||
ZStack(alignment: .leading) {
|
}
|
||||||
if viewModel.elements.comment.isEmpty {
|
Section(header: Text("report.additional-comments")) {
|
||||||
Text("report.placeholder").foregroundColor(.secondary)
|
TextEditor(text: $viewModel.elements.comment)
|
||||||
}
|
.accessibility(label: Text("report.additional-comments"))
|
||||||
TextEditor(text: $viewModel.elements.comment)
|
}
|
||||||
}
|
if !viewModel.isLocalAccount {
|
||||||
if !viewModel.isLocalAccount {
|
Section {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("report.forward.hint")
|
Text("report.forward.hint")
|
||||||
Toggle("report.forward-\(viewModel.accountHost)", isOn: $viewModel.elements.forward)
|
Toggle("report.forward-\(viewModel.accountHost)", isOn: $viewModel.elements.forward)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Group {
|
}
|
||||||
if viewModel.loading {
|
Section {
|
||||||
ProgressView()
|
if viewModel.loading {
|
||||||
} else {
|
ProgressView()
|
||||||
Button("submit") {
|
} else {
|
||||||
viewModel.report()
|
Button("report.target-\(viewModel.accountName)") {
|
||||||
}
|
viewModel.report()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ struct ReportStatusView: UIViewRepresentable {
|
||||||
view.buttonsStackView.isHidden = true
|
view.buttonsStackView.isHidden = true
|
||||||
view.translatesAutoresizingMaskIntoConstraints = false
|
view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.isUserInteractionEnabled = false
|
view.isUserInteractionEnabled = false
|
||||||
|
view.accessibilityLabel = view.accessibilityAttributedLabel?.string
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue