mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-23 08:50:58 +00:00
Add a setting to disable secondary column on iPad / macOS
This commit is contained in:
parent
d7c2e65479
commit
c5e43394c8
18 changed files with 58 additions and 1 deletions
|
@ -114,7 +114,8 @@ struct IceCubesApp: App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if proxy.frame(in: .global).width > (.maxColumnWidth + .secondaryColumnWidth),
|
if proxy.frame(in: .global).width > (.maxColumnWidth + .secondaryColumnWidth),
|
||||||
appAccountsManager.currentClient.isAuth
|
appAccountsManager.currentClient.isAuth,
|
||||||
|
userPreferences.showiPadSecondaryColumn
|
||||||
{
|
{
|
||||||
Divider().edgesIgnoringSafeArea(.all)
|
Divider().edgesIgnoringSafeArea(.all)
|
||||||
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil)
|
NotificationsTab(popToRootTab: $popToRootTab, lockedType: nil)
|
||||||
|
|
|
@ -85,10 +85,19 @@ struct DisplaySettingsView: View {
|
||||||
Text("settings.display.font.scaling-\(String(format: "%.1f", userPreferences.fontSizeScale))")
|
Text("settings.display.font.scaling-\(String(format: "%.1f", userPreferences.fontSizeScale))")
|
||||||
.font(.scaledBody)
|
.font(.scaledBody)
|
||||||
}
|
}
|
||||||
|
.alignmentGuide(.listRowSeparatorLeading) { d in
|
||||||
|
d[.leading]
|
||||||
|
}
|
||||||
Toggle("settings.display.translate-button", isOn: $userPreferences.showTranslateButton)
|
Toggle("settings.display.translate-button", isOn: $userPreferences.showTranslateButton)
|
||||||
}
|
}
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
|
|
||||||
|
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||||
|
Section("settings.display.section.ipad") {
|
||||||
|
Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Button {
|
Button {
|
||||||
theme.followSystemColorScheme = true
|
theme.followSystemColorScheme = true
|
||||||
|
|
|
@ -155,6 +155,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Exploreu";
|
"tab.explore" = "Exploreu";
|
||||||
"tab.federated" = "Federat";
|
"tab.federated" = "Federat";
|
||||||
|
|
|
@ -153,6 +153,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tabauswahl";
|
"settings.haptic.tab-selection" = "Tabauswahl";
|
||||||
"settings.haptic.buttons" = "Knopfdruck";
|
"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.show" = "Alle zeigen";
|
||||||
"enum.expand-media.hide" = "Alle ausblenden";
|
"enum.expand-media.hide" = "Alle ausblenden";
|
||||||
"enum.expand-media.hide-sensitive" = "Sensible ausblenden";
|
"enum.expand-media.hide-sensitive" = "Sensible ausblenden";
|
||||||
|
|
|
@ -157,6 +157,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Explore";
|
"tab.explore" = "Explore";
|
||||||
"tab.federated" = "Federated";
|
"tab.federated" = "Federated";
|
||||||
|
|
|
@ -157,6 +157,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Explore";
|
"tab.explore" = "Explore";
|
||||||
"tab.federated" = "Federated";
|
"tab.federated" = "Federated";
|
||||||
|
|
|
@ -153,6 +153,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"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.show" = "Siempre";
|
||||||
"enum.expand-media.hide" = "Nunca";
|
"enum.expand-media.hide" = "Nunca";
|
||||||
"enum.expand-media.hide-sensitive" = "Ocultar contenido sensible";
|
"enum.expand-media.hide-sensitive" = "Ocultar contenido sensible";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Sélection d'onglet";
|
"settings.haptic.tab-selection" = "Sélection d'onglet";
|
||||||
"settings.haptic.buttons" = "Appui bouton";
|
"settings.haptic.buttons" = "Appui bouton";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Explorer";
|
"tab.explore" = "Explorer";
|
||||||
"tab.federated" = "Fédéré";
|
"tab.federated" = "Fédéré";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Selezione Tab";
|
"settings.haptic.tab-selection" = "Selezione Tab";
|
||||||
"settings.haptic.buttons" = "Pressione dei bottoni";
|
"settings.haptic.buttons" = "Pressione dei bottoni";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Esplora";
|
"tab.explore" = "Esplora";
|
||||||
"tab.federated" = "Federazione";
|
"tab.federated" = "Federazione";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "タブセレクト";
|
"settings.haptic.tab-selection" = "タブセレクト";
|
||||||
"settings.haptic.buttons" = "ボタン操作時";
|
"settings.haptic.buttons" = "ボタン操作時";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "エクスプローラー";
|
"tab.explore" = "エクスプローラー";
|
||||||
"tab.federated" = "連合";
|
"tab.federated" = "連合";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "하단 탭 바를 누를 때";
|
"settings.haptic.tab-selection" = "하단 탭 바를 누를 때";
|
||||||
"settings.haptic.buttons" = "버튼을 누를 때";
|
"settings.haptic.buttons" = "버튼을 누를 때";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "둘러보기";
|
"tab.explore" = "둘러보기";
|
||||||
"tab.federated" = "연합";
|
"tab.federated" = "연합";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Utforsk";
|
"tab.explore" = "Utforsk";
|
||||||
"tab.federated" = "Federert";
|
"tab.federated" = "Federert";
|
||||||
|
|
|
@ -153,6 +153,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tabselectie";
|
"settings.haptic.tab-selection" = "Tabselectie";
|
||||||
"settings.haptic.buttons" = "Knoppen";
|
"settings.haptic.buttons" = "Knoppen";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Ontdekken";
|
"tab.explore" = "Ontdekken";
|
||||||
"tab.federated" = "Gefedereerd";
|
"tab.federated" = "Gefedereerd";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Wybór zakładki";
|
"settings.haptic.tab-selection" = "Wybór zakładki";
|
||||||
"settings.haptic.buttons" = "Naciśnięcie przycisku";
|
"settings.haptic.buttons" = "Naciśnięcie przycisku";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Odkrywaj";
|
"tab.explore" = "Odkrywaj";
|
||||||
"tab.federated" = "Globalny";
|
"tab.federated" = "Globalny";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Explorar";
|
"tab.explore" = "Explorar";
|
||||||
"tab.federated" = "Linha global";
|
"tab.federated" = "Linha global";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.haptic.tab-selection" = "Tab Selection";
|
"settings.haptic.tab-selection" = "Tab Selection";
|
||||||
"settings.haptic.buttons" = "Button Press";
|
"settings.haptic.buttons" = "Button Press";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "Keşfet";
|
"tab.explore" = "Keşfet";
|
||||||
"tab.federated" = "Birleştirilmiş";
|
"tab.federated" = "Birleştirilmiş";
|
||||||
|
|
|
@ -156,6 +156,9 @@
|
||||||
"settings.display.font.custom" = "自定义";
|
"settings.display.font.custom" = "自定义";
|
||||||
"settings.display.font.scaling-%@" = "字体缩放:%@";
|
"settings.display.font.scaling-%@" = "字体缩放:%@";
|
||||||
|
|
||||||
|
"settings.display.section.ipad" = "iPad";
|
||||||
|
"settings.display.show-ipad-column" = "Enable secondary column";
|
||||||
|
|
||||||
// MARK: Tabs
|
// MARK: Tabs
|
||||||
"tab.explore" = "探索";
|
"tab.explore" = "探索";
|
||||||
"tab.federated" = "跨站";
|
"tab.federated" = "跨站";
|
||||||
|
|
|
@ -36,6 +36,8 @@ public class UserPreferences: ObservableObject {
|
||||||
@AppStorage("haptic_timeline") public var hapticTimelineEnabled = true
|
@AppStorage("haptic_timeline") public var hapticTimelineEnabled = true
|
||||||
@AppStorage("haptic_button_press") public var hapticButtonPressEnabled = true
|
@AppStorage("haptic_button_press") public var hapticButtonPressEnabled = true
|
||||||
|
|
||||||
|
@AppStorage("show_second_column_ipad") public var showiPadSecondaryColumn = true
|
||||||
|
|
||||||
public var postVisibility: Models.Visibility {
|
public var postVisibility: Models.Visibility {
|
||||||
if useInstanceContentSettings {
|
if useInstanceContentSettings {
|
||||||
return serverPreferences?.postVisibility ?? .pub
|
return serverPreferences?.postVisibility ?? .pub
|
||||||
|
|
Loading…
Reference in a new issue