Add setting to hide translate button close #252

This commit is contained in:
Thomas Ricouard 2023-01-22 09:15:01 +01:00
parent eec5637c1c
commit 921d28a57a
9 changed files with 11 additions and 1 deletions

View file

@ -50,6 +50,7 @@ struct DisplaySettingsView: View {
.font(.scaledBody)
}
}
Toggle("settings.display.translate-button", isOn: $userPreferences.showTranslateButton)
}
.listRowBackground(theme.primaryBackgroundColor)

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "Thema";
"settings.display.status.action-buttons" = "Status Aktions-Buttons";
"settings.display.status.media-style" = "Status Medien";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "Hintergrundfarbe";
"settings.display.theme.secondary-background" = "Sekundäre Hintergrundfarbe";
"settings.display.theme.tint" = "Akzentfarbe";

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "Theme";
"settings.display.status.action-buttons" = "Status action buttons";
"settings.display.status.media-style" = "Status media style";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "Background color";
"settings.display.theme.secondary-background" = "Secondary Background color";
"settings.display.theme.tint" = "Tint color";

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "Tema";
"settings.display.status.action-buttons" = "Botones de acción";
"settings.display.status.media-style" = "Estilo del contenido multimedia";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "Color de fondo";
"settings.display.theme.secondary-background" = "Color de fondo secundario";
"settings.display.theme.tint" = "Color";

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "Tema";
"settings.display.status.action-buttons" = "Bottoni di azione";
"settings.display.status.media-style" = "Stile dei media";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "Colore di sfondo";
"settings.display.theme.secondary-background" = "Colore di sfondo secondario";
"settings.display.theme.tint" = "Colore";

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "Thema";
"settings.display.status.action-buttons" = "Actieknoppen";
"settings.display.status.media-style" = "Mediastijl";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "Achtergrondkleur";
"settings.display.theme.secondary-background" = "Secundaire achtergrondkleur";
"settings.display.theme.tint" = "Kleurtint";

View file

@ -58,6 +58,7 @@
"settings.display.section.theme" = "主题";
"settings.display.status.action-buttons" = "状态操作选项";
"settings.display.status.media-style" = "状态媒体样式";
"settings.display.translate-button" = "Show translate button";
"settings.display.theme.background" = "背景颜色";
"settings.display.theme.secondary-background" = "二级背景颜色";
"settings.display.theme.tint" = "色调";

View file

@ -14,6 +14,7 @@ public class UserPreferences: ObservableObject {
@AppStorage("preferred_browser") public var preferredBrowser: PreferredBrowser = .inAppSafari
@AppStorage("draft_posts") public var draftsPosts: [String] = []
@AppStorage("font_size_scale") public var fontSizeScale: Double = 1
@AppStorage("show_translate_button_inline") public var showTranslateButton: Bool = true
public var pushNotificationsCount: Int {
get {

View file

@ -236,7 +236,9 @@ public struct StatusRowView: View {
Spacer()
}
makeTranslateView(status: status)
if preferences.showTranslateButton {
makeTranslateView(status: status)
}
if let poll = status.poll {
StatusPollView(poll: poll, status: status)