mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +00:00
Settings: Add a button to hide OpenAI button in the composer
This commit is contained in:
parent
7664b97a31
commit
8fe6eddead
9 changed files with 28 additions and 3 deletions
|
@ -27,6 +27,7 @@ struct SettingsTabs: View {
|
|||
appSection
|
||||
accountsSection
|
||||
generalSection
|
||||
otherSections
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
.background(theme.secondaryBackgroundColor)
|
||||
|
@ -91,6 +92,12 @@ struct SettingsTabs: View {
|
|||
NavigationLink(destination: remoteLocalTimelinesView) {
|
||||
Label("settings.general.remote-timelines", systemImage: "dot.radiowaves.right")
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
}
|
||||
|
||||
private var otherSections: some View {
|
||||
Section("settings.section.other") {
|
||||
if !ProcessInfo.processInfo.isiOSAppOnMac {
|
||||
Picker(selection: $preferences.preferredBrowser) {
|
||||
ForEach(PreferredBrowser.allCases, id: \.rawValue) { browser in
|
||||
|
@ -105,6 +112,9 @@ struct SettingsTabs: View {
|
|||
Label("settings.general.browser", systemImage: "network")
|
||||
}
|
||||
}
|
||||
Toggle(isOn: $preferences.isOpenAIEnabled) {
|
||||
Label("settings.other.hide-openai", systemImage: "faxmachine")
|
||||
}
|
||||
}
|
||||
.listRowBackground(theme.primaryBackgroundColor)
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.timeline.add" = "Lokale Timeline hinzufügen";
|
||||
"settings.title" = "Einstellungen";
|
||||
"settings.rate" = "Bewerte Ice Cubes";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "Entdecken";
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.timeline.add" = "Add a local timeline";
|
||||
"settings.title" = "Settings";
|
||||
"settings.rate" = "Rate Ice Cubes";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "Explore";
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.timeline.add" = "Añadir cronología local";
|
||||
"settings.title" = "Ajustes";
|
||||
"settings.rate" = "Valora Ice Cubes";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "Explorar";
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.timeline.add" = "Aggiungi una timeline locale";
|
||||
"settings.title" = "Impostazioni";
|
||||
"settings.rate" = "Valuta Ice Cubes";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "Esplora";
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.support.four.subtitle" = "Daarmee kan Ice Cubes nog een tijdje vooruit!";
|
||||
"settings.timeline.add" = "Een lokale tijdlijn toevoegen";
|
||||
"settings.title" = "Instellingen";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "Ontdekken";
|
||||
|
|
|
@ -100,6 +100,8 @@
|
|||
"settings.timeline.add" = "添加远程时间线";
|
||||
"settings.title" = "设置";
|
||||
"settings.rate" = "给 Ice Cubes 评分";
|
||||
"settings.section.other" = "Other";
|
||||
"settings.other.hide-openai" = "Enable 🤖 helper";
|
||||
|
||||
// MARK: Tabs
|
||||
"tab.explore" = "探索";
|
||||
|
|
|
@ -15,6 +15,7 @@ public class UserPreferences: ObservableObject {
|
|||
@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
|
||||
@AppStorage("is_open_ai_enabled") public var isOpenAIEnabled: Bool = true
|
||||
|
||||
public var pushNotificationsCount: Int {
|
||||
get {
|
||||
|
|
|
@ -100,9 +100,11 @@ public struct StatusEditorView: View {
|
|||
Text(viewModel.postingError ?? "")
|
||||
})
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
AIMenu
|
||||
.disabled(!viewModel.canPost)
|
||||
if preferences.isOpenAIEnabled {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
AIMenu
|
||||
.disabled(!viewModel.canPost)
|
||||
}
|
||||
}
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
Button {
|
||||
|
|
Loading…
Reference in a new issue