Add a setting to disable secondary column on iPad / macOS

This commit is contained in:
Thomas Ricouard 2023-02-06 18:53:37 +01:00
parent d7c2e65479
commit c5e43394c8
18 changed files with 58 additions and 1 deletions

View file

@ -114,7 +114,8 @@ struct IceCubesApp: App {
}
}
if proxy.frame(in: .global).width > (.maxColumnWidth + .secondaryColumnWidth),
appAccountsManager.currentClient.isAuth
appAccountsManager.currentClient.isAuth,
userPreferences.showiPadSecondaryColumn
{
Divider().edgesIgnoringSafeArea(.all)
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil)

View file

@ -85,9 +85,18 @@ struct DisplaySettingsView: View {
Text("settings.display.font.scaling-\(String(format: "%.1f", userPreferences.fontSizeScale))")
.font(.scaledBody)
}
.alignmentGuide(.listRowSeparatorLeading) { d in
d[.leading]
}
Toggle("settings.display.translate-button", isOn: $userPreferences.showTranslateButton)
}
.listRowBackground(theme.primaryBackgroundColor)
if UIDevice.current.userInterfaceIdiom == .pad {
Section("settings.display.section.ipad") {
Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn)
}
}
Section {
Button {

View file

@ -155,6 +155,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Exploreu";
"tab.federated" = "Federat";

View file

@ -153,6 +153,9 @@
"settings.haptic.tab-selection" = "Tabauswahl";
"settings.haptic.buttons" = "Knopfdruck";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
"enum.expand-media.show" = "Alle zeigen";
"enum.expand-media.hide" = "Alle ausblenden";
"enum.expand-media.hide-sensitive" = "Sensible ausblenden";

View file

@ -157,6 +157,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Explore";
"tab.federated" = "Federated";

View file

@ -157,6 +157,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Explore";
"tab.federated" = "Federated";

View file

@ -153,6 +153,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
"enum.expand-media.show" = "Siempre";
"enum.expand-media.hide" = "Nunca";
"enum.expand-media.hide-sensitive" = "Ocultar contenido sensible";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Sélection d'onglet";
"settings.haptic.buttons" = "Appui bouton";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Explorer";
"tab.federated" = "Fédéré";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Selezione Tab";
"settings.haptic.buttons" = "Pressione dei bottoni";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Esplora";
"tab.federated" = "Federazione";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "タブセレクト";
"settings.haptic.buttons" = "ボタン操作時";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "エクスプローラー";
"tab.federated" = "連合";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "하단 탭 바를 누를 때";
"settings.haptic.buttons" = "버튼을 누를 때";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "둘러보기";
"tab.federated" = "연합";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Utforsk";
"tab.federated" = "Federert";

View file

@ -153,6 +153,9 @@
"settings.haptic.tab-selection" = "Tabselectie";
"settings.haptic.buttons" = "Knoppen";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Ontdekken";
"tab.federated" = "Gefedereerd";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Wybór zakładki";
"settings.haptic.buttons" = "Naciśnięcie przycisku";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Odkrywaj";
"tab.federated" = "Globalny";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Explorar";
"tab.federated" = "Linha global";

View file

@ -156,6 +156,9 @@
"settings.haptic.tab-selection" = "Tab Selection";
"settings.haptic.buttons" = "Button Press";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "Keşfet";
"tab.federated" = "Birleştirilmiş";

View file

@ -156,6 +156,9 @@
"settings.display.font.custom" = "自定义";
"settings.display.font.scaling-%@" = "字体缩放:%@";
"settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column";
// MARK: Tabs
"tab.explore" = "探索";
"tab.federated" = "跨站";

View file

@ -35,6 +35,8 @@ public class UserPreferences: ObservableObject {
@AppStorage("haptic_tab") public var hapticTabSelectionEnabled = true
@AppStorage("haptic_timeline") public var hapticTimelineEnabled = true
@AppStorage("haptic_button_press") public var hapticButtonPressEnabled = true
@AppStorage("show_second_column_ipad") public var showiPadSecondaryColumn = true
public var postVisibility: Models.Visibility {
if useInstanceContentSettings {