[ios] Adjusted code for consistency

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-07-16 10:47:11 +02:00
committed by Yannik Bloscheck
parent 4fd617684b
commit 93415fe952
8 changed files with 109 additions and 109 deletions

View File

@@ -19,15 +19,15 @@ extension Settings {
var description: String {
switch self {
case .hidden:
return L("disabled")
return String(localized: "disabled")
case .help:
return L("help")
return String(localized: "help")
case .addPlace:
return L("placepage_add_place_button")
return String(localized: "placepage_add_place_button")
case .settings:
return L("settings")
return String(localized: "settings")
case .recordTrack:
return L("start_track_recording")
return String(localized: "start_track_recording")
}
}

View File

@@ -25,7 +25,7 @@ class DownloadMapsViewController: MWMViewController {
@IBOutlet var noMapsContainer: UIView!
@IBOutlet var downloadAllViewContainer: UIView!
// MARK: - Properties
// MARK: Properties
private var searchController = UISearchController(searchResultsController: nil)
var dataSource: IDownloaderDataSource!

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the routing options
struct RoutingOptionsView: View {
// MARK: - Properties
// MARK: Properties
/// The dismiss action of the environment
@Environment(\.dismiss) private var dismiss

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the OpenStreetMapp profile
struct ExistingProfileView: View {
// MARK: - Properties
// MARK: Properties
/// The open url action of the environment
@Environment(\.openURL) private var openUrl

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the OpenStreetMapp profile
struct NoExistingProfileView: View {
// MARK: - Properties
// MARK: Properties
/// The open url action of the environment
@Environment(\.openURL) private var openUrl

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the OpenStreetMap profile
struct ProfileView: View {
// MARK: - Properties
// MARK: Properties
/// The dismiss action of the environment
@Environment(\.dismiss) private var dismiss
@@ -26,7 +26,6 @@ struct ProfileView: View {
/// The actual view
var body: some View {
NavigationView {
VStack(spacing: 0) {
if isPresentedAsAlert {
Button {
@@ -53,7 +52,6 @@ struct ProfileView: View {
NoExistingProfileView()
}
}
}
.accentColor(.accent)
.navigationViewStyle(StackNavigationViewStyle())
.navigationTitle(Profile.name ?? String(localized: "osm_profile"))
@@ -64,7 +62,11 @@ struct ProfileView: View {
Profile.logout()
lastUpdated = Date.now
} label: {
if #available(iOS 16, *) {
Label("osm_profile_logout", systemImage: "rectangle.portrait.and.arrow.forward")
} else {
Label("osm_profile_logout", systemImage: "power")
}
}
}
}

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the navigation settings
struct SettingsNavigationView: View {
// MARK: - Properties
// MARK: Properties
/// If the perspective view should be used during routing
@State var hasPerspectiveViewWhileRouting: Bool = true
@@ -46,7 +46,6 @@ struct SettingsNavigationView: View {
/// The actual view
var body: some View {
NavigationView {
List {
Section {
Toggle("pref_map_3d_title", isOn: $hasPerspectiveViewWhileRouting)
@@ -125,10 +124,9 @@ struct SettingsNavigationView: View {
Text("driving_options_title")
}
}
}
.accentColor(.accent)
.navigationViewStyle(StackNavigationViewStyle())
.navigationTitle(String(localized: "prefs_group_route"))
.navigationTitle("prefs_group_route")
.onAppear {
hasPerspectiveViewWhileRouting = Settings.hasPerspectiveViewWhileRouting
hasAutoZoomWhileRouting = Settings.hasAutoZoomWhileRouting

View File

@@ -2,7 +2,7 @@ import SwiftUI
/// View for the settings
struct SettingsView: View {
// MARK: - Properties
// MARK: Properties
/// The dismiss action of the environment
@Environment(\.dismiss) private var dismiss
@@ -235,7 +235,7 @@ struct SettingsView: View {
Text("enable_logging_warning_message")
}
}
.navigationTitle(String(localized: "settings"))
.navigationTitle("settings")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .confirmationAction) {