Remove tab string from iOS app (#669)

* Remove tab string from iOS app

* Added tab string display setting

* Fixes

---------

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
This commit is contained in:
Yusuke Arakawa 2023-02-09 14:28:16 +09:00 committed by GitHub
parent b0b8bf7d1a
commit 11c5da05c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 62 additions and 2 deletions

View file

@ -146,7 +146,13 @@ struct IceCubesApp: App {
ForEach(availableTabs) { tab in ForEach(availableTabs) { tab in
tab.makeContentView(popToRootTab: $popToRootTab) tab.makeContentView(popToRootTab: $popToRootTab)
.tabItem { .tabItem {
tab.label if userPreferences.showiPhoneTabLabel {
tab.label
.labelStyle(TitleAndIconLabelStyle())
} else {
tab.label
.labelStyle(IconOnlyLabelStyle())
}
} }
.tag(tab) .tag(tab)
.badge(badgeFor(tab: tab)) .badge(badgeFor(tab: tab))

View file

@ -98,7 +98,14 @@ struct DisplaySettingsView: View {
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 == .phone {
Section("settings.display.section.phone") {
Toggle("settings.display.show-tab-label", isOn: $userPreferences.showiPhoneTabLabel)
}
.listRowBackground(theme.primaryBackgroundColor)
}
if UIDevice.current.userInterfaceIdiom == .pad { if UIDevice.current.userInterfaceIdiom == .pad {
Section("settings.display.section.ipad") { Section("settings.display.section.ipad") {
Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn) Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn)

View file

@ -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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -154,6 +154,9 @@
"settings.haptic.tab-selection" = "Tabauswahl"; "settings.haptic.tab-selection" = "Tabauswahl";
"settings.haptic.buttons" = "Knopfdruck"; "settings.haptic.buttons" = "Knopfdruck";
"settings.display.section.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Zweite Spalte aktivieren"; "settings.display.show-ipad-column" = "Zweite Spalte aktivieren";

View file

@ -160,6 +160,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -158,6 +158,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -154,6 +154,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -157,6 +157,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Activer la colonne secondaire"; "settings.display.show-ipad-column" = "Activer la colonne secondaire";

View file

@ -157,6 +157,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Attiva la seconda colonna"; "settings.display.show-ipad-column" = "Attiva la seconda colonna";

View file

@ -157,6 +157,9 @@
"settings.haptic.tab-selection" = "タブセレクト"; "settings.haptic.tab-selection" = "タブセレクト";
"settings.haptic.buttons" = "ボタン操作時"; "settings.haptic.buttons" = "ボタン操作時";
"settings.display.section.phone" = "iPhone";
"settings.display.show-tab-label" = "タブ名を表示";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "セカンドカラムを有効にする"; "settings.display.show-ipad-column" = "セカンドカラムを有効にする";

View file

@ -157,6 +157,9 @@
"settings.haptic.tab-selection" = "하단 탭 바를 누를 때"; "settings.haptic.tab-selection" = "하단 탭 바를 누를 때";
"settings.haptic.buttons" = "버튼을 누를 때"; "settings.haptic.buttons" = "버튼을 누를 때";
"settings.display.section.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -154,6 +154,9 @@
"settings.haptic.tab-selection" = "Tabselectie"; "settings.haptic.tab-selection" = "Tabselectie";
"settings.haptic.buttons" = "Knoppen"; "settings.haptic.buttons" = "Knoppen";
"settings.display.section.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Toon tweede kolom"; "settings.display.show-ipad-column" = "Toon tweede kolom";

View file

@ -157,6 +157,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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Włącz dodatkową kolumnę"; "settings.display.show-ipad-column" = "Włącz dodatkową kolumnę";

View file

@ -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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -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.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab name";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "Enable secondary column"; "settings.display.show-ipad-column" = "Enable secondary column";

View file

@ -157,6 +157,9 @@
"settings.display.font.custom" = "自定义"; "settings.display.font.custom" = "自定义";
"settings.display.font.scaling-%@" = "字体缩放:%@"; "settings.display.font.scaling-%@" = "字体缩放:%@";
"settings.display.section.phone" = "iPhone";
"settings.display.show-tab-label" = "Show tab label";
"settings.display.section.ipad" = "iPad"; "settings.display.section.ipad" = "iPad";
"settings.display.show-ipad-column" = "启用边栏"; "settings.display.show-ipad-column" = "启用边栏";

View file

@ -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_tab_label_iphone") public var showiPhoneTabLabel = true
@AppStorage("show_second_column_ipad") public var showiPadSecondaryColumn = true @AppStorage("show_second_column_ipad") public var showiPadSecondaryColumn = true
public var postVisibility: Models.Visibility { public var postVisibility: Models.Visibility {