Skip to content

Commit

Permalink
♻️ (LekaApp): Refactor SettingsView without Appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz committed Feb 7, 2024
1 parent c1da810 commit e34e5fb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 166 deletions.
19 changes: 7 additions & 12 deletions Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,22 @@ struct MainView: View {
CategoryLabel(category: .stories)
}

HStack {
Spacer()
VStack(spacing: 20) {
VStack(alignment: .center, spacing: 20) {
if self.rootOwnerViewModel.isCompanyConnected {
Button {
self.rootOwnerViewModel.isSettingsViewPresented = true
} label: {
SettingsLabel()
}

Text("My Leka App - Version \(Bundle.version!) (\(Bundle.buildNumber!))")
.foregroundColor(.gray)
.font(.caption2)
}
Spacer()
}

HStack {
Spacer()
Text("My Leka App - Version \(Bundle.version!) (\(Bundle.buildNumber!))")
.foregroundColor(.gray)
.font(.caption2)

LekaLogo(width: 50)
Spacer()
}
.frame(maxWidth: .infinity)
}
// TODO: (@ladislas) remove if not necessary
// .disabled(navigation.disableUICompletly)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ import LocalizationKit

extension l10n {
enum SettingsView {
enum AppearanceSection {
enum AppearanceRow {
static let title = LocalizedString("settings_view.appearance_section.appearance_row.title", value: "Dark mode", comment: "Appearance Row title")
}

enum AccentColorRow {
static let title = LocalizedString("settings_view.appearance_section.accent_color_row.title", value: "Accent Color", comment: "AccentColor Row title")
}

static let header = LocalizedString("settings_view.appearance_section.header", value: "Appearance", comment: "Appearance section header")
}

enum CredentialsSection {
enum ChangeCredentials {
static let buttonLabel = LocalizedString("settings_view.credentials_section.change_credentials.button_label", value: "Change email and password", comment: "Change credentials button label")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ struct SettingsView: View {
var body: some View {
NavigationStack {
Form {
AppearanceSection()

if self.rootOwnerViewModel.isCompanyConnected {
CredentialsSection()
AccountSection()
}
CredentialsSection()
AccountSection()
}
.navigationTitle(String(l10n.SettingsView.navigationTitle.characters))
.navigationBarTitleDisplayMode(.inline)
Expand Down

0 comments on commit e34e5fb

Please sign in to comment.