Skip to content

Commit

Permalink
Develop (#17)
Browse files Browse the repository at this point in the history
* Add new router

* Add routing draft

* Add router

* Upd CI push develop

* Test fix

* Fix tvOS errors

* Fix tvOS support

* Fix tvOS

* Add wathOS example

* Fix ci

* Up

* Upd

* Remove build macOS

* Fix support iPad

* Up router

* Fix iPhone 15 version

* Add iPhone 14 Pro build

* Add macOS build

* Fix ci

* Delete macOS build

* Update routing, onboarding and up to Swift6

* Fix #major

* Fix ci

* Update CI

* Fix EventKit and Contacts

* Format code

* Fix example

* Fix macOS

* Update CI

* Format and small refactor

* Add new router

* Add routing draft

* Add router

* Add wathOS example

* Update routing, onboarding and up to Swift6

* Fix example

* Format and small refactor

* Fix

* Fix tvOS
  • Loading branch information
aromanov91 authored Dec 25, 2024
1 parent d8e2eab commit 825a896
Show file tree
Hide file tree
Showing 67 changed files with 3,090 additions and 2,842 deletions.
5 changes: 3 additions & 2 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--swiftversion 5.8
--disable preferKeyPath
--swiftversion 6.0
--disable preferKeyPath
--ifdef no-indent
12 changes: 6 additions & 6 deletions AppExample/Example/Router/Alerts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ enum RootAlert: Identifiable {
var id: String {
switch self {
case .dismiss:
return "dismiss"
"dismiss"
case .delete:
return "delete"
"delete"
case .appError:
return "appError"
"appError"
}
}

var alert: Alert {
switch self {
case let .dismiss(action):
return Alert(
Alert(
title: Text("Are you sure you want to dismiss?"),
primaryButton: .destructive(Text("Dismiss"), action: action),
secondaryButton: .cancel()
)
case let .delete(action):
return Alert(
Alert(
title: Text("Are you sure you want to delete?"),
primaryButton: .destructive(Text("\(L10n.Button.delete)"), action: action),
secondaryButton: .cancel()
)
case let .appError(error: error):
return Alert(
Alert(
title: Text(error.title),
message: Text(error.subtitle.valueOrEmpty),
dismissButton: .cancel()
Expand Down
4 changes: 2 additions & 2 deletions AppExample/Example/Router/Router.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ extension Router {
extension Screen: Hashable, Equatable {
static func == (lhs: Screen, rhs: Screen) -> Bool {
if lhs.id == rhs.id {
return true
true
} else {
return false
false
}
}

Expand Down
4 changes: 2 additions & 2 deletions AppExample/Example/Router/Screens.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ extension Screen: Identifiable {
var id: String {
switch self {
case .settings:
return "settings"
"settings"
case .premium:
return "premium"
"premium"
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions AppExample/Example/Router/Tabs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,45 @@ public enum RootTab: String {
var id: String {
switch self {
case .main:
return "home"
"home"
case .secondary:
return "secondary"
"secondary"
case .tertiary:
return "tertiary"
"tertiary"
case .quaternary:
return "quaternary"
"quaternary"
case .settings:
return "settings"
"settings"
}
}

var title: String {
switch self {
case .main:
return "Home"
"Home"
case .secondary:
return "Secondary"
"Secondary"
case .tertiary:
return "Tertiary"
"Tertiary"
case .quaternary:
return "Quaternary"
"Quaternary"
case .settings:
return "Settings"
"Settings"
}
}

var image: Image {
switch self {
case .main:
return Image(systemName: "")
Image(systemName: "")
case .secondary:
return Image(systemName: "")
Image(systemName: "")
case .tertiary:
return Image(systemName: "")
Image(systemName: "")
case .quaternary:
return Image(systemName: "")
Image(systemName: "")
case .settings:
return Image(systemName: "")
Image(systemName: "")
}
}
}
Loading

0 comments on commit 825a896

Please sign in to comment.