-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize file structure and cleanup project
- Loading branch information
1 parent
914f760
commit 7b29ba2
Showing
74 changed files
with
292 additions
and
387 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/WatchHomePage.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/PTS12HStepStyle2.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.36 KB
...niLink/Assets.xcassets/watchface/PTS12HStepStyle2.imageset/PTS12HStepStyle2.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/PTS24HStepStyle1.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.61 KB
...niLink/Assets.xcassets/watchface/PTS24HStepStyle1.imageset/PTS24HStepStyle1.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/PTS24HStepStyle2.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.27 KB
...niLink/Assets.xcassets/watchface/PTS24HStepStyle2.imageset/PTS24HStepStyle2.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/analog.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/digital12H.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-2.23 KB
InfiniLink/Assets.xcassets/watchface/digital12H.imageset/digital12H.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/digital24H.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-2.35 KB
InfiniLink/Assets.xcassets/watchface/digital24H.imageset/digital24H.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/infineat12H.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-11 MB
InfiniLink/Assets.xcassets/watchface/infineat12H.imageset/WatchHomePage.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/terminal12H.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.52 KB
InfiniLink/Assets.xcassets/watchface/terminal12H.imageset/terminal12H.png
Binary file not shown.
21 changes: 0 additions & 21 deletions
21
InfiniLink/Assets.xcassets/watchface/terminal24H.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.48 KB
InfiniLink/Assets.xcassets/watchface/terminal24H.imageset/terminal24H.png
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 16 additions & 18 deletions
34
InfiniLink/Settings/SettingsFunctions.swift → ...e/Home/Battery/BatteryNotifications.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,33 @@ | ||
// | ||
// SettingsFunctions.swift | ||
// BatteryNotifications.swift | ||
// InfiniLink | ||
// | ||
// Created by Alex Emry on 8/15/21. | ||
// | ||
// Created by Liam Willey on 3/4/24. | ||
// | ||
|
||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
class BatteryNotifications: ObservableObject { | ||
@ObservedObject var notificationManager = NotificationManager() | ||
@Published var twenty: Bool = false | ||
@Published var ten: Bool = false | ||
@Published var twenty: Bool = false | ||
@Published var ten: Bool = false | ||
|
||
func notify(bat: Int, bleManager: BLEManager) { | ||
let bleWriteManger = BLEWriteManager() | ||
if UserDefaults.standard.object(forKey: "batteryNotification") as! Bool? == true{ | ||
if bat > 20 { | ||
twenty = false | ||
ten = false | ||
func notify(bat: Int, bleManager: BLEManager) { | ||
let bleWriteManger = BLEWriteManager() | ||
if UserDefaults.standard.object(forKey: "batteryNotification") as! Bool? == true{ | ||
if bat > 20 { | ||
twenty = false | ||
ten = false | ||
} else if (bat <= 20 && bat > 10) && twenty == false { | ||
notificationManager.sendLowBatteryNotification(bat: bat) | ||
bleWriteManger.sendNotification(title: NSLocalizedString("battery_low", comment: ""), body: "\(bat)% " + NSLocalizedString("battery_low_message", comment: "")) | ||
twenty = true | ||
} else if (bat <= 10 && bat > 5) && ten == false { | ||
twenty = true | ||
} else if (bat <= 10 && bat > 5) && ten == false { | ||
notificationManager.sendLowBatteryNotification(bat: bat) | ||
bleWriteManger.sendNotification(title: NSLocalizedString("battery_low", comment: ""), body: "\(bat)% " + NSLocalizedString("battery_low_message", comment: "")) | ||
ten = true | ||
} | ||
} | ||
} | ||
ten = true | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// HeartChartView.swift | ||
// InfiniLink | ||
// | ||
// Created by Liam Willey on 3/4/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct HeartChartView: View { | ||
@ObservedObject var bleManagerVal = BLEManagerVal.shared | ||
@Environment(\.colorScheme) var scheme | ||
var body: some View { | ||
NavigationLink(destination: HeartView()) { | ||
VStack { | ||
HStack { | ||
Image(systemName: "heart.fill") | ||
.foregroundColor(.red) | ||
Text(NSLocalizedString("heart_rate", comment: "")) | ||
.foregroundColor(.red) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
} | ||
Spacer(minLength: 24) | ||
HStack(alignment: .bottom) { | ||
Text(String(Int(bleManagerVal.heartBPM))) | ||
.foregroundColor(scheme == .dark ? .white : .black) | ||
.font(.system(size: 28)) | ||
.bold() | ||
Text(NSLocalizedString("bpm", comment: "")) | ||
.foregroundColor(.gray) | ||
.bold() | ||
.font(.system(size: 14)) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
} | ||
} | ||
.padding(5) | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
HeartChartView() | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.