diff --git a/Mlem.xcodeproj/project.pbxproj b/Mlem.xcodeproj/project.pbxproj index 45d56ac8c..0612f1e12 100644 --- a/Mlem.xcodeproj/project.pbxproj +++ b/Mlem.xcodeproj/project.pbxproj @@ -230,6 +230,8 @@ 03A630EF2D497143009A47A6 /* TappableLinksSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A630EE2D497143009A47A6 /* TappableLinksSettingsView.swift */; }; 03A630F12D497674009A47A6 /* ShieldsBadgeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A630F02D497674009A47A6 /* ShieldsBadgeView.swift */; }; 03A630F42D4976EB009A47A6 /* ShieldsBadgeView+Logic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A630F32D4976EB009A47A6 /* ShieldsBadgeView+Logic.swift */; }; + 03A6315E2D4D1A1B009A47A6 /* DefaultFeedSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A6315D2D4D1A1B009A47A6 /* DefaultFeedSettingsView.swift */; }; + 03A631602D4D1CBB009A47A6 /* HapticSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A6315F2D4D1CBB009A47A6 /* HapticSettingsView.swift */; }; 03A82FA12C0D1E8500D01A5C /* ApiClient+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A82FA02C0D1E8500D01A5C /* ApiClient+Extensions.swift */; }; 03A82FA32C0D1F2400D01A5C /* View+ExternalApiWarning.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A82FA22C0D1F2400D01A5C /* View+ExternalApiWarning.swift */; }; 03AB484F2CBAE33500567FF9 /* MarkdownWithLinkList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB484E2CBAE33500567FF9 /* MarkdownWithLinkList.swift */; }; @@ -726,6 +728,8 @@ 03A630EE2D497143009A47A6 /* TappableLinksSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TappableLinksSettingsView.swift; sourceTree = ""; }; 03A630F02D497674009A47A6 /* ShieldsBadgeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShieldsBadgeView.swift; sourceTree = ""; }; 03A630F32D4976EB009A47A6 /* ShieldsBadgeView+Logic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ShieldsBadgeView+Logic.swift"; sourceTree = ""; }; + 03A6315D2D4D1A1B009A47A6 /* DefaultFeedSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultFeedSettingsView.swift; sourceTree = ""; }; + 03A6315F2D4D1CBB009A47A6 /* HapticSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HapticSettingsView.swift; sourceTree = ""; }; 03A6315C2D4D15F1009A47A6 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 03A82FA02C0D1E8500D01A5C /* ApiClient+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ApiClient+Extensions.swift"; sourceTree = ""; }; 03A82FA22C0D1F2400D01A5C /* View+ExternalApiWarning.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+ExternalApiWarning.swift"; sourceTree = ""; }; @@ -1070,6 +1074,8 @@ CDEE15532D22364500EB9D7B /* ErrorLogView.swift */, CD45CB0C2D1880E3008BC729 /* FiltersSettingsView.swift */, 039F58892C7B54FE00C61658 /* GeneralSettingsView.swift */, + 03A6315F2D4D1CBB009A47A6 /* HapticSettingsView.swift */, + 03A6315D2D4D1A1B009A47A6 /* DefaultFeedSettingsView.swift */, 036FFA2E2D45197300998D8A /* PrivacySettingsView.swift */, 038188982D43E0F30073E88D /* SafetySettingsView.swift */, 03600D922D4531DF00C704CB /* PrivacyBypassImageProxySettingsView.swift */, @@ -2398,6 +2404,7 @@ 0315B1C12C74C71A006D4F82 /* CommentEditorView+Context.swift in Sources */, 03D283FE2D25EEC500A6659B /* SearchView+Views.swift in Sources */, 03AFD0DF2C3B2E000054B8AD /* PersonListRow.swift in Sources */, + 03A6315E2D4D1A1B009A47A6 /* DefaultFeedSettingsView.swift in Sources */, 0315B1CA2C767847006D4F82 /* InteractionBarTracker.swift in Sources */, 03DAEA772C64074E0064DE64 /* SubscriptionListItemView.swift in Sources */, 0324FA772C1F0AE100F6247D /* Readout.swift in Sources */, @@ -2799,6 +2806,7 @@ 0397D4642C676CA8002C6CDC /* FeedSortPicker.swift in Sources */, 0355F9462C150B2300605248 /* ExternalApiInfoView.swift in Sources */, 03D0273C2CD3BA5100984519 /* PersonContent+Extensions.swift in Sources */, + 03A631602D4D1CBB009A47A6 /* HapticSettingsView.swift in Sources */, 03F9672B2CE221220081C9A3 /* Label+Profile1.swift in Sources */, CD13CC612C5D262E001AF428 /* MediaLoadingState.swift in Sources */, 03CBD1932C61369A00E870BC /* Interactable2Providing+Extensions.swift in Sources */, @@ -3197,7 +3205,7 @@ repositoryURL = "https://github.com/mlemgroup/LemmyMarkdownUI"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 0.6.0; + minimumVersion = 0.7.0; }; }; 0392826E2BC84E480097F91A /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = { diff --git a/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 266f62f86..3868533d8 100644 --- a/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Mlem.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mlemgroup/LemmyMarkdownUI", "state" : { - "revision" : "ab579f496b1acaa3230dcc5ae16fa804f53ed504", - "version" : "0.6.0" + "revision" : "ef959bfe8f20a2ca78ced88e91073b5b5768a18d", + "version" : "0.7.0" } }, { diff --git a/Mlem/App/Configuration/Icons.swift b/Mlem/App/Configuration/Icons.swift index c5dc165f4..63f8c5a62 100644 --- a/Mlem/App/Configuration/Icons.swift +++ b/Mlem/App/Configuration/Icons.swift @@ -330,7 +330,7 @@ enum Icons { static let switchUser: String = "person.crop.circle.badge.plus" static let missing: String = "questionmark.square.dashed" static let connection: String = "antenna.radiowaves.left.and.right" - static let haptics: String = "hand.tap" + static let haptics: String = "circle.dotted.and.circle" static let transparency: String = "square.on.square.intersection.dashed" static let icon: String = "fleuron" static let banner: String = "flag" diff --git a/Mlem/App/Globals/Definitions/HapticManager/HapticPriority.swift b/Mlem/App/Globals/Definitions/HapticManager/HapticPriority.swift index 46b64a485..5b35c24e8 100644 --- a/Mlem/App/Globals/Definitions/HapticManager/HapticPriority.swift +++ b/Mlem/App/Globals/Definitions/HapticManager/HapticPriority.swift @@ -12,7 +12,9 @@ import Foundation /// - high: denotes a haptic that always plays if the user has selected any degree of haptic feedback /// - low: denotes a haptic that only plays if the user has selected "all" haptic feedback enum HapticPriority: String, CaseIterable, Comparable, Codable { - case sentinel, high, low + case low + case high + case sentinel var intValue: Int { switch self { diff --git a/Mlem/App/Utility/Extensions/ApiSortType+Extensions.swift b/Mlem/App/Utility/Extensions/ApiSortType+Extensions.swift index 4ceb8c4c4..eca926614 100644 --- a/Mlem/App/Utility/Extensions/ApiSortType+Extensions.swift +++ b/Mlem/App/Utility/Extensions/ApiSortType+Extensions.swift @@ -66,7 +66,8 @@ extension ApiSortType: @retroactive CaseIterable { case .old: .init(localized: "Old") case .topAll: - .init(localized: "All Time") + // swiftlint:disable:next void_function_in_ternary + abbreviateUnits ? .init(localized: "All") : .init(localized: "All Time") case .mostComments: .init(localized: "Most Comments") case .newComments: @@ -76,7 +77,15 @@ extension ApiSortType: @retroactive CaseIterable { case .scaled: .init(localized: "Scaled") default: - formatter(unitsStyle: abbreviateUnits ? .abbreviated : .full) + dateComponentsLabel(abbreviateUnits: abbreviateUnits) + } + } + + private func dateComponentsLabel(abbreviateUnits: Bool) -> String { + if abbreviateUnits { + formatter(unitsStyle: .abbreviated).string(for: dateComponents) ?? "" + } else { + formatter(unitsStyle: .full) .string(for: dateComponents)? .capitalized ?? "" } @@ -88,7 +97,7 @@ extension ApiSortType: @retroactive CaseIterable { case .topOnly: return String(localized: "Top") case .topAndTimescale: - return String(localized: "Top: \(basicLabel(abbreviateUnits: true))") + return String(localized: "Top: \(basicLabel(abbreviateUnits: false))") default: break } } @@ -136,7 +145,7 @@ extension ApiSortType: @retroactive CaseIterable { private func formatter(unitsStyle: DateComponentsFormatter.UnitsStyle) -> DateComponentsFormatter { let formatter = DateComponentsFormatter() - formatter.unitsStyle = .full + formatter.unitsStyle = unitsStyle formatter.maximumUnitCount = 1 return formatter } diff --git a/Mlem/App/Utility/Extensions/MarkdownConfiguration+Extensions.swift b/Mlem/App/Utility/Extensions/MarkdownConfiguration+Extensions.swift index 8d27fcea9..b7da25e09 100644 --- a/Mlem/App/Utility/Extensions/MarkdownConfiguration+Extensions.swift +++ b/Mlem/App/Utility/Extensions/MarkdownConfiguration+Extensions.swift @@ -33,7 +33,8 @@ extension MarkdownConfiguration { ) } static var dimmed: MarkdownConfiguration { .init( - inlineImageLoader: { _ in }, + imagePresentationMode: .inline, + inlineImageLoader: { _ in }, // Don't load inline images; they will remain as placeholders imageBlockView: { imageView($0, shouldBlur: false) }, wrapCodeBlockLines: Settings.main.wrapCodeBlockLines, primaryColor: Palette.main.secondary, diff --git a/Mlem/App/Views/Pages/Community/FeedSortPicker.swift b/Mlem/App/Views/Pages/Community/FeedSortPicker.swift index 2eb98a142..dba5c2b0b 100644 --- a/Mlem/App/Views/Pages/Community/FeedSortPicker.swift +++ b/Mlem/App/Views/Pages/Community/FeedSortPicker.swift @@ -12,6 +12,7 @@ import SwiftUI struct FeedSortPicker: View { @Environment(AppState.self) var appState @Environment(NavigationLayer.self) var navigation + @Environment(Palette.self) var palette @Binding var sort: ApiSortType @@ -46,7 +47,7 @@ struct FeedSortPicker: View { } var body: some View { - Menu(sort.label(topFormat: topSortTypes.count == 1 ? .topOnly : .topAndTimescale), systemImage: sort.systemImage) { + Menu { Section { ForEach(nonTopSortTypes, id: \.self) { type in Toggle( @@ -77,6 +78,26 @@ struct FeedSortPicker: View { navigation.openSheet(.advancedSorting($sort)) } } + } label: { + if ApiSortType.topCases.contains(sort) { + HStack { + Image(systemName: Icons.topSort) + .imageScale(.small) + Text(sort.label(topFormat: .timescaleAbbreviated)) + .font(.footnote) + .fontDesign(.rounded) + } + .padding(.horizontal, 10) + .padding(.vertical, 5) + .background { + Capsule() + // 1.51 is intentional - iOS doesn't render it quite right at 1.5 (iPhone 12) + .strokeBorder(palette.accent, lineWidth: 1.51) + } + .accessibilityLabel(sort.label(topFormat: .topAndTimescale)) + } else { + Label(sort.label(topFormat: topSortTypes.count == 1 ? .topOnly : .topAndTimescale), systemImage: sort.systemImage) + } } .disabled(appState.firstApi.fetchedVersion == nil) .popover(isPresented: $topSortPopupPresented) { @@ -88,4 +109,11 @@ struct FeedSortPicker: View { .presentationCompactAdaptation(.popover) } } + + var formatter: DateComponentsFormatter { + let formatter = DateComponentsFormatter() + formatter.unitsStyle = .abbreviated + formatter.maximumUnitCount = 1 + return formatter + } } diff --git a/Mlem/App/Views/Pages/Community/TopSortPicker.swift b/Mlem/App/Views/Pages/Community/TopSortPicker.swift index ca69ce843..1629a8361 100644 --- a/Mlem/App/Views/Pages/Community/TopSortPicker.swift +++ b/Mlem/App/Views/Pages/Community/TopSortPicker.swift @@ -49,7 +49,7 @@ struct TopSortPicker: View { Text("All Time") } } else { - Text(formatter.string(from: type.dateComponents ?? .init()) ?? "") + Text(type.label(topFormat: .timescaleAbbreviated)) } } .frame(maxWidth: .infinity) @@ -69,11 +69,4 @@ struct TopSortPicker: View { } .foregroundStyle(palette.primary) } - - var formatter: DateComponentsFormatter { - let formatter = DateComponentsFormatter() - formatter.unitsStyle = .abbreviated - formatter.maximumUnitCount = 1 - return formatter - } } diff --git a/Mlem/App/Views/Root/Tabs/Feeds/FeedSelection.swift b/Mlem/App/Views/Root/Tabs/Feeds/FeedSelection.swift index 588be6d71..e27ea2907 100644 --- a/Mlem/App/Views/Root/Tabs/Feeds/FeedSelection.swift +++ b/Mlem/App/Views/Root/Tabs/Feeds/FeedSelection.swift @@ -34,6 +34,10 @@ enum FeedSelection: String, CaseIterable, Codable { } } + var label: LocalizedStringResource { + description.label + } + var description: FeedDescription { switch self { case .all: .all diff --git a/Mlem/App/Views/Root/Tabs/Settings/AccessibilitySettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/AccessibilitySettingsView.swift index 38b3a5585..00340f072 100644 --- a/Mlem/App/Views/Root/Tabs/Settings/AccessibilitySettingsView.swift +++ b/Mlem/App/Views/Root/Tabs/Settings/AccessibilitySettingsView.swift @@ -8,6 +8,7 @@ import SwiftUI struct AccessibilitySettingsView: View { + @Environment(Palette.self) var palette @Environment(\.accessibilityDifferentiateWithoutColor) var differentiateWithoutColor: Bool @Setting(\.readPostIndicator) var readPostIndicator @@ -16,13 +17,22 @@ struct AccessibilitySettingsView: View { var body: some View { Form { + SettingsHeaderView( + title: "Accessibility", + description: "Customize Mlem to work best for you. Some features are tied to system-wide accessibility settings.", + systemImage: "hand.point.up.braille.fill" + ) + .tint(palette.colorfulAccent(2)) if differentiateWithoutColor { - NavigationLink( - "Post Read Indicator", - value: .init(localized: readPostIndicator.label), - fallbackValue: "", - destination: .settings(.postReadIndicator) - ) + Section { + NavigationLink( + "Post Read Indicator", + value: .init(localized: readPostIndicator.label), + fallbackValue: "", + systemImage: Icons.read, + destination: .settings(.postReadIndicator) + ) + } } Section { @@ -31,6 +41,6 @@ struct AccessibilitySettingsView: View { } } .labelStyle(.conditional) - .navigationTitle("Accessibility") + .contentMargins(.top, 16) } } diff --git a/Mlem/App/Views/Root/Tabs/Settings/CommentJumpButtonSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/CommentJumpButtonSettingsView.swift index 83d9ffade..a621760b1 100644 --- a/Mlem/App/Views/Root/Tabs/Settings/CommentJumpButtonSettingsView.swift +++ b/Mlem/App/Views/Root/Tabs/Settings/CommentJumpButtonSettingsView.swift @@ -54,6 +54,7 @@ struct CommentJumpButtonSettingsView: View { } } .labelStyle(.conditional) + .contentMargins(.top, 16) .animation(.easeOut(duration: 0.1), value: jumpButton == .none) } diff --git a/Mlem/App/Views/Root/Tabs/Settings/DefaultFeedSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/DefaultFeedSettingsView.swift new file mode 100644 index 000000000..28e3547c9 --- /dev/null +++ b/Mlem/App/Views/Root/Tabs/Settings/DefaultFeedSettingsView.swift @@ -0,0 +1,33 @@ +// +// DefaultFeedSettingsView.swift +// Mlem +// +// Created by Sjmarf on 2025-01-31. +// + +import SwiftUI + +struct DefaultFeedSettingsView: View { + @Setting(\.defaultFeed) var defaultFeed + + var body: some View { + Form { + SettingsHeaderView( + title: "Default Feed", + description: "Choose which feed is shown when the app opens." + ) {} + Picker("Default Feed", selection: $defaultFeed) { + ForEach(FeedSelection.allCases, id: \.self) { item in + Label { + Text(item.description.label) + } icon: { + FeedIconView(feedDescription: item.description, size: 30) + } + } + } + .pickerStyle(.inline) + .labelsHidden() + } + .contentMargins(.top, 16) + } +} diff --git a/Mlem/App/Views/Root/Tabs/Settings/EmbeddingSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/EmbeddingSettingsView.swift index baf8df76a..7da520d49 100644 --- a/Mlem/App/Views/Root/Tabs/Settings/EmbeddingSettingsView.swift +++ b/Mlem/App/Views/Root/Tabs/Settings/EmbeddingSettingsView.swift @@ -13,7 +13,7 @@ struct EmbeddingSettingsView: View { var body: some View { Form { SettingsHeaderView( - title: "Embeddings", + title: "Embedded Content", description: "Display linked media from supported hosts in-app rather than as a link.", systemImage: Icons.embedding ) diff --git a/Mlem/App/Views/Root/Tabs/Settings/GeneralSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/GeneralSettingsView.swift index 1e51ad53f..4a0915934 100644 --- a/Mlem/App/Views/Root/Tabs/Settings/GeneralSettingsView.swift +++ b/Mlem/App/Views/Root/Tabs/Settings/GeneralSettingsView.swift @@ -9,6 +9,8 @@ import Dependencies import SwiftUI struct GeneralSettingsView: View { + @Environment(Palette.self) var palette + // behavior @Setting(\.upvoteOnSave) var upvoteOnSave @Setting(\.markReadOnScroll) var markReadOnScroll @@ -28,29 +30,38 @@ struct GeneralSettingsView: View { var body: some View { Form { + SettingsHeaderView( + title: "General", + description: "Manage your overall setup for Mlem.", + systemImage: "gear" + ) + .tint(palette.neutralAccent) Section { - Picker("Default Feed", systemImage: Icons.feeds, selection: $defaultFeed) { - ForEach(FeedSelection.allCases, id: \.self) { item in - Text(item.rawValue.capitalized) - } - } - if UIDevice.isPad { - Toggle("Show Sidebar on App Launch", systemImage: Icons.sidebar, isOn: $sidebarVisibleByDefault) - } + NavigationLink( + "Default Feed", + value: .init(localized: defaultFeed.label), + fallbackValue: "", + systemImage: Icons.feeds, + destination: .settings(.defaultFeed) + ) + NavigationLink( + "Haptics", + value: .init(localized: hapticLevel.label), + fallbackValue: "", + systemImage: Icons.haptics, + destination: .settings(.haptics) + ) + } + Section { + Toggle("Upvote on Save", systemImage: Icons.upvoteOnSave, isOn: $upvoteOnSave) Toggle("Mark Read on Scroll", systemImage: Icons.read, isOn: $markReadOnScroll) Toggle("Infinite Scroll", systemImage: Icons.infiniteScroll, isOn: $infiniteScroll) - Toggle("Upvote on Save", systemImage: Icons.upvoteOnSave, isOn: $upvoteOnSave) - Picker("Haptic Level", systemImage: Icons.haptics, selection: $hapticLevel) { - ForEach(HapticPriority.allCases, id: \.self) { item in - Text(item.label) - } - } Toggle("Wrap Code Block Lines", systemImage: Icons.inlineCode, isOn: $wrapCodeBlockLines) - } header: { - Text("Behavior") + if UIDevice.isPad { + Toggle("Show Sidebar on App Launch", systemImage: Icons.sidebar, isOn: $sidebarVisibleByDefault) + } } - - Section("Gestures") { + Section { Toggle( "Swipe Actions", systemImage: Icons.swipeActions, @@ -79,14 +90,14 @@ struct GeneralSettingsView: View { ) } - Section("Avatars") { - Toggle("User Avatar", systemImage: Icons.personCircle, isOn: $showPersonAvatar) - Toggle("Community Avatar", systemImage: Icons.communityCircle, isOn: $showCommunityAvatar) + Section { + Toggle("User Avatar", systemImage: Icons.personCircle, isOn: $showPersonAvatar) + Toggle("Community Avatar", systemImage: Icons.communityCircle, isOn: $showCommunityAvatar) } NavigationLink("Import/Export Settings", systemImage: Icons.importSettings, destination: .settings(.importExportSettings)) } .labelStyle(.conditional) - .navigationTitle("General") + .contentMargins(.top, 16) } } diff --git a/Mlem/App/Views/Root/Tabs/Settings/HapticSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/HapticSettingsView.swift new file mode 100644 index 000000000..190ad10bd --- /dev/null +++ b/Mlem/App/Views/Root/Tabs/Settings/HapticSettingsView.swift @@ -0,0 +1,33 @@ +// +// HapticSettingsView.swift +// Mlem +// +// Created by Sjmarf on 2025-01-31. +// + +import SwiftUI + +struct HapticSettingsView: View { + @Environment(Palette.self) var palette + @Setting(\.hapticLevel) var hapticLevel + + var body: some View { + Form { + SettingsHeaderView( + title: "Haptics", + description: "Customize how often Mlem plays haptic feedback.", + systemImage: Icons.haptics + ) + .tint(palette.colorfulAccent(1)) + Picker("Haptic Level", selection: $hapticLevel) { + ForEach(HapticPriority.allCases, id: \.self) { item in + Text(item.label) + } + } + .pickerStyle(.inline) + .labelsHidden() + } + .contentMargins(.top, 16) + .labelStyle(.conditional) + } +} diff --git a/Mlem/App/Views/Root/Tabs/Settings/SortingSettingsView.swift b/Mlem/App/Views/Root/Tabs/Settings/SortingSettingsView.swift index 25dc7a1ad..36841e6bc 100644 --- a/Mlem/App/Views/Root/Tabs/Settings/SortingSettingsView.swift +++ b/Mlem/App/Views/Root/Tabs/Settings/SortingSettingsView.swift @@ -17,6 +17,12 @@ struct SortingSettingsView: View { var body: some View { Form { + SettingsHeaderView( + title: "Sorting", + description: "Choose the default sort mode for posts and comments.", + systemImage: "arrow.up.and.down.text.horizontal" + ) + .tint(palette.colorfulAccent(5)) Section { HStack { Text("Posts") @@ -60,6 +66,6 @@ struct SortingSettingsView: View { } } } - .navigationTitle("Sorting") + .contentMargins(.top, 16) } } diff --git a/Mlem/App/Views/Shared/Navigation/SettingsPage.swift b/Mlem/App/Views/Shared/Navigation/SettingsPage.swift index 683abc17c..88b9806e2 100644 --- a/Mlem/App/Views/Shared/Navigation/SettingsPage.swift +++ b/Mlem/App/Views/Shared/Navigation/SettingsPage.swift @@ -13,6 +13,7 @@ enum SettingsPage: Hashable { case accounts, account case profile, accountGeneral, accountAdvanced, accountSignIn, accountChangeEmail, accountLocal, accountChangePassword case general, privacy, safety, accessibility, sorting, filters + case defaultFeed, haptics case privacyBypassImageProxy case safetyBlurNsfw, safetyWarnings case links, embedding @@ -58,6 +59,10 @@ enum SettingsPage: Hashable { AccountListSettingsView() case .general: GeneralSettingsView() + case .defaultFeed: + DefaultFeedSettingsView() + case .haptics: + HapticSettingsView() case .privacy: PrivacySettingsView() case .privacyBypassImageProxy: diff --git a/Mlem/Localizable.xcstrings b/Mlem/Localizable.xcstrings index 7f549f5ea..bf71e89ae 100644 --- a/Mlem/Localizable.xcstrings +++ b/Mlem/Localizable.xcstrings @@ -428,9 +428,6 @@ }, "Avatar" : { - }, - "Avatars" : { - }, "Average: %@" : { @@ -468,9 +465,6 @@ }, "Banner" : { - }, - "Behavior" : { - }, "Biography" : { @@ -574,12 +568,18 @@ }, "Choose Instance..." : { + }, + "Choose the default sort mode for posts and comments." : { + }, "Choose when Not Safe For Work content should be blurred." : { }, "Choose whether to show a warning when opening a page that is likely to contain sensitive content." : { + }, + "Choose which feed is shown when the app opens." : { + }, "Choose wisely - you cannot change this later." : { @@ -751,6 +751,16 @@ } } }, + "Customize how often Mlem plays haptic feedback." : { + "localizations" : { + "en-GB" : { + "stringUnit" : { + "state" : "translated", + "value" : "Customise how often Mlem plays haptic feedback." + } + } + } + }, "Customize Interaction Bar" : { "localizations" : { "en-GB" : { @@ -761,6 +771,16 @@ } } }, + "Customize Mlem to work best for you. Some features are tied to system-wide accessibility settings." : { + "localizations" : { + "en-GB" : { + "stringUnit" : { + "state" : "translated", + "value" : "Customise Mlem to work best for you. Some features are tied to system-wide accessibility settings." + } + } + } + }, "Days:" : { }, @@ -885,9 +905,6 @@ }, "Embedded Content" : { - }, - "Embeddings" : { - }, "Enable Keyword Filters" : { @@ -1049,9 +1066,6 @@ }, "General" : { - }, - "Gestures" : { - }, "GitHub Repository" : { @@ -1076,6 +1090,9 @@ }, "Haptic Level" : { + }, + "Haptics" : { + }, "Hard" : { @@ -1280,6 +1297,9 @@ }, "Manage how Mlem interacts with Lemmy instances and other websites." : { + }, + "Manage your overall setup for Mlem." : { + }, "Mark Read" : { @@ -1389,10 +1409,10 @@ "Most Comments" : { }, - "Multiple Columns" : { + "Mozilla Observatory" : { }, - "Mozilla Observatory" : { + "Multiple Columns" : { }, "Mute Videos" : {