diff --git a/Infini-iOS.xcodeproj/project.pbxproj b/Infini-iOS.xcodeproj/project.pbxproj index d296d3b..4ca61cd 100644 --- a/Infini-iOS.xcodeproj/project.pbxproj +++ b/Infini-iOS.xcodeproj/project.pbxproj @@ -83,6 +83,7 @@ 264BFE7726BCAAC00050A223 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 264DB80A26C62ED600E812C3 /* SideMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenu.swift; sourceTree = ""; }; 264DB80C26C633CF00E812C3 /* PageSwitcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageSwitcher.swift; sourceTree = ""; }; + 2656FD9A26D1B30C001EF20C /* PrivacyPolicy.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PrivacyPolicy.md; sourceTree = ""; }; 26A6314C26BEFD2C005AE404 /* MusicController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MusicController.swift; sourceTree = ""; }; 26A6315126BF45E0005AE404 /* BLEMusic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BLEMusic.swift; sourceTree = ""; }; 26A6315426C0297A005AE404 /* Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = ""; }; @@ -149,6 +150,7 @@ isa = PBXGroup; children = ( 264BFE7726BCAAC00050A223 /* README.md */, + 2656FD9A26D1B30C001EF20C /* PrivacyPolicy.md */, 264BFE4026BC51CE0050A223 /* Infini-iOS */, 264BFE5726BC51CF0050A223 /* Infini-iOSTests */, 264BFE6226BC51CF0050A223 /* Infini-iOSUITests */, @@ -611,7 +613,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"Infini-iOS/Preview Content\""; - DEVELOPMENT_TEAM = T2VD6LADUL; + DEVELOPMENT_TEAM = 99BHY6DC82; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "Infini-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -619,8 +621,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.0.1; - PRODUCT_BUNDLE_IDENTIFIER = "com.xan-m.Infini-iOS"; + MARKETING_VERSION = 0.8; + PRODUCT_BUNDLE_IDENTIFIER = "com.alexemry.Infini-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -634,7 +636,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"Infini-iOS/Preview Content\""; - DEVELOPMENT_TEAM = T2VD6LADUL; + DEVELOPMENT_TEAM = 99BHY6DC82; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = "Infini-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -642,8 +644,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.0.1; - PRODUCT_BUNDLE_IDENTIFIER = "com.xan-m.Infini-iOS"; + MARKETING_VERSION = 0.8; + PRODUCT_BUNDLE_IDENTIFIER = "com.alexemry.Infini-iOS"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png index c0acb6a..6616f5e 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png index a7eed4b..cc835c7 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-120.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png index a7eed4b..cc835c7 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-121.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png index 0387983..8f52203 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-152.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png index 3a151b7..9b4d964 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-167.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png index 971d9a6..2702ff8 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-180.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png index 7c1985b..a287779 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-20.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png index 4af2f60..64d0921 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-29.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png index 97318f1..2f7bb40 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-40.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png index 97318f1..2f7bb40 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-41.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png index 97318f1..2f7bb40 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-42.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png index 4c13906..186e726 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-58.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png index 4c13906..186e726 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-59.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png index 003e7e7..5690317 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-60.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png index d73675f..118c237 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-76.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png index 3ccd714..2e3e6f8 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-80.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png index 3ccd714..2e3e6f8 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-81.png differ diff --git a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png index 578d22c..34a6bf4 100644 Binary files a/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png and b/Infini-iOS/Assets.xcassets/AppIcon.appiconset/Icon-87.png differ diff --git a/Infini-iOS/BLE/BLEDelegates.swift b/Infini-iOS/BLE/BLEDelegates.swift index b44558a..6ad2a15 100644 --- a/Infini-iOS/BLE/BLEDelegates.swift +++ b/Infini-iOS/BLE/BLEDelegates.swift @@ -2,7 +2,7 @@ // BLEDelegates.swift // Infini-iOS // -// Created by xan-m on 8/15/21. +// Created by Alex Emry on 8/15/21. // // diff --git a/Infini-iOS/BLE/BLEManager.swift b/Infini-iOS/BLE/BLEManager.swift index 15b4f95..ed1f2c4 100644 --- a/Infini-iOS/BLE/BLEManager.swift +++ b/Infini-iOS/BLE/BLEManager.swift @@ -2,7 +2,7 @@ // BLEManager.swift // Infini-iOS // -// Created by xan-m on 8/3/21. +// Created by Alex Emry on 8/3/21. // import Foundation diff --git a/Infini-iOS/BLE/BLEManagerExtensions.swift b/Infini-iOS/BLE/BLEManagerExtensions.swift index 5f5ecf5..6763504 100644 --- a/Infini-iOS/BLE/BLEManagerExtensions.swift +++ b/Infini-iOS/BLE/BLEManagerExtensions.swift @@ -2,7 +2,7 @@ // BLEManagerExtensions.swift // Infini-iOS // -// Created by xan-m on 8/15/21. +// Created by Alex Emry on 8/15/21. // // diff --git a/Infini-iOS/ContentView.swift b/Infini-iOS/ContentView.swift index af35bd8..2b310cb 100644 --- a/Infini-iOS/ContentView.swift +++ b/Infini-iOS/ContentView.swift @@ -2,7 +2,7 @@ // ContentView.swift // Infini-iOS // -// Created by xan-m on 8/5/21. +// Created by Alex Emry on 8/5/21. // import SwiftUI @@ -13,9 +13,12 @@ struct ContentView: View { @EnvironmentObject var pageSwitcher: PageSwitcher @EnvironmentObject var bleManager: BLEManager + @ObservedObject var batteryNotifications = BatteryNotifications() @AppStorage("autoconnect") var autoconnect: Bool = false @AppStorage("autoconnectUUID") var autoconnectUUID: String = "" + @AppStorage("batteryNotification") var batteryNotification: Bool = false + init() { UINavigationBar.appearance().setBackgroundImage(UIImage(), for: UIBarMetrics.default) @@ -39,8 +42,7 @@ struct ContentView: View { } } } - // let timer = Timer.publish(every: 60, on: .main, in: .common).autoconnect() - + return NavigationView { GeometryReader { geometry in ZStack(alignment: .leading) { @@ -49,6 +51,9 @@ struct ContentView: View { // pop-up menu to connect to a device Connect().environmentObject(self.bleManager) }) + .onChange(of: bleManager.batteryLevel) { bat in + batteryNotifications.notify(bat: Int(bat), bleManager: bleManager) + } .frame(width: geometry.size.width, height: geometry.size.height) .offset(x: self.pageSwitcher.showMenu ? geometry.size.width/2 : 0) .disabled(self.pageSwitcher.showMenu ? true : false) @@ -64,12 +69,7 @@ struct ContentView: View { } } }) - // TODO: decide if this matters? I want the graph to show up because I spent a lot of time on it, but is it important enough to pollute it with a ton of data at the expense of the phone's processing power? - // P.S. don't forget timer above the navigation view - // - //.onReceive(timer) { _ in - // bleManager.batChartDataPoints.append(bleManager.updateChartInfo(data: bleManager.batteryLevel, heart: false)) - //} + .onAppear(){ // if autoconnect is set, start scan ASAP, but give bleManager half a second to start up DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { @@ -139,4 +139,3 @@ struct ContentView_Previews: PreviewProvider { .environmentObject(BLEManager()) } } - diff --git a/Infini-iOS/DFU/DFU.swift b/Infini-iOS/DFU/DFU.swift index 45b19e1..ad24561 100644 --- a/Infini-iOS/DFU/DFU.swift +++ b/Infini-iOS/DFU/DFU.swift @@ -2,7 +2,7 @@ // DFU.swift // Infini-iOS // -// Created by xan-m on 8/11/21. +// Created by Alex Emry on 8/11/21. // import Foundation @@ -15,9 +15,9 @@ class DFU_Updater: ObservableObject, DFUServiceDelegate, DFUProgressDelegate, Lo var deviceToUpgrade: BLEManager.Peripheral! var dfuController: DFUServiceController! - //@Published var dfuState: DFUState = DFUState.starting + @Published var dfuState: String = "" @Published var transferFailed = false - @Published var percentComplete: Double! + @Published var percentComplete: Double = 0 func prepare(location: URL, device: BLEManager) { @@ -50,8 +50,7 @@ class DFU_Updater: ObservableObject, DFUServiceDelegate, DFUProgressDelegate, Lo // stubs added automatically. func dfuStateDidChange(to state: DFUState) { - print(state.description()) - + dfuState = state.description() } func dfuError(_ error: DFUError, didOccurWithMessage message: String) { diff --git a/Infini-iOS/Infini_iOSApp.swift b/Infini-iOS/Infini_iOSApp.swift index e156d4f..525828c 100644 --- a/Infini-iOS/Infini_iOSApp.swift +++ b/Infini-iOS/Infini_iOSApp.swift @@ -2,7 +2,7 @@ // Infini_iOSApp.swift // Infini-iOS // -// Created by xan-m on 8/5/21. +// Created by Alex Emry on 8/5/21. // import SwiftUI diff --git a/Infini-iOS/Music/BLEMusic.swift b/Infini-iOS/Music/BLEMusic.swift index 2675fed..33e8e1f 100644 --- a/Infini-iOS/Music/BLEMusic.swift +++ b/Infini-iOS/Music/BLEMusic.swift @@ -2,7 +2,7 @@ // BLEMusic.swift // Infini-iOS // -// Created by xan-m on 8/7/21. +// Created by Alex Emry on 8/7/21. // import Foundation diff --git a/Infini-iOS/Music/MusicController.swift b/Infini-iOS/Music/MusicController.swift index fc250ac..00ab338 100644 --- a/Infini-iOS/Music/MusicController.swift +++ b/Infini-iOS/Music/MusicController.swift @@ -2,7 +2,7 @@ // MusicController.swift // Infini-iOS // -// Created by xan-m on 8/7/21. +// Created by Alex Emry on 8/7/21. // import Foundation diff --git a/Infini-iOS/Notifications/Notifications.swift b/Infini-iOS/Notifications/Notifications.swift index f0a5090..3a52722 100644 --- a/Infini-iOS/Notifications/Notifications.swift +++ b/Infini-iOS/Notifications/Notifications.swift @@ -2,7 +2,7 @@ // Notifications.swift // Infini-iOS // -// Created by xan-m on 8/8/21. +// Created by Alex Emry on 8/8/21. // import Foundation diff --git a/Infini-iOS/Persistence.swift b/Infini-iOS/Persistence.swift index 713cfda..87aacc2 100644 --- a/Infini-iOS/Persistence.swift +++ b/Infini-iOS/Persistence.swift @@ -2,7 +2,7 @@ // Persistence.swift // Infini-iOS // -// Created by xan-m on 8/5/21. +// Created by Alex Emry on 8/5/21. // import CoreData diff --git a/Infini-iOS/Settings/Notification Settings/PhoneNotificationsView.swift b/Infini-iOS/Settings/Notification Settings/PhoneNotificationsView.swift index 4111171..a87a2fb 100644 --- a/Infini-iOS/Settings/Notification Settings/PhoneNotificationsView.swift +++ b/Infini-iOS/Settings/Notification Settings/PhoneNotificationsView.swift @@ -2,7 +2,7 @@ // PhoneNotificationsView.swift // Infini-iOS // -// Created by xan-m on 8/16/21. +// Created by Alex Emry on 8/16/21. // // diff --git a/Infini-iOS/Settings/Notification Settings/WatchNotificationsView.swift b/Infini-iOS/Settings/Notification Settings/WatchNotificationsView.swift index 57e10b2..b078de0 100644 --- a/Infini-iOS/Settings/Notification Settings/WatchNotificationsView.swift +++ b/Infini-iOS/Settings/Notification Settings/WatchNotificationsView.swift @@ -2,7 +2,7 @@ // WatchNotificationsView.swift // Infini-iOS // -// Created by xan-m on 8/16/21. +// Created by Alex Emry on 8/16/21. // // diff --git a/Infini-iOS/Settings/SettingsFunctions.swift b/Infini-iOS/Settings/SettingsFunctions.swift index ed12947..74fec37 100644 --- a/Infini-iOS/Settings/SettingsFunctions.swift +++ b/Infini-iOS/Settings/SettingsFunctions.swift @@ -2,18 +2,30 @@ // SettingsFunctions.swift // Infini-iOS // -// Created by xan-m on 8/15/21. +// Created by Alex Emry on 8/15/21. // // import Foundation -class SettingsFunctions { - func batteryNotification(bat: Int, bleManager: BLEManager) { - if bat == 20 { - print("test") - bleManager.sendNotification(notification: "Battery at 20%") +class BatteryNotifications: ObservableObject { + + @Published var twenty: Bool = false + @Published var ten: Bool = false + + func notify(bat: Int, bleManager: BLEManager) { + if UserDefaults.standard.object(forKey: "batteryNotifications") as! Bool? == true{ + if bat > 20 { + twenty = false + ten = false + } else if (bat <= 20 && bat > 10) && twenty == false { + bleManager.sendNotification(notification: "Battery Low") + twenty = true + } else if (bat <= 10 && bat > 5) && ten == false { + bleManager.sendNotification(notification: "Battery Low") + ten = true + } } } } diff --git a/Infini-iOS/Utilities/ColorPalette.swift b/Infini-iOS/Utilities/ColorPalette.swift index d05e1b1..e87b8c9 100644 --- a/Infini-iOS/Utilities/ColorPalette.swift +++ b/Infini-iOS/Utilities/ColorPalette.swift @@ -2,7 +2,7 @@ // ColorPalette.swift // Infini-iOS // -// Created by xan-m on 8/16/21. +// Created by Alex Emry on 8/16/21. // // diff --git a/Infini-iOS/Utilities/HexStringToData.swift b/Infini-iOS/Utilities/HexStringToData.swift index a7e5fac..e9fc8fa 100644 --- a/Infini-iOS/Utilities/HexStringToData.swift +++ b/Infini-iOS/Utilities/HexStringToData.swift @@ -2,7 +2,7 @@ // HexStringToData.swift // Infini-iOS // -// Cloned by xan-m on 8/4/21 (with many thanks) from https://gist.github.com/gamako/94c8cb8873cabb97291b5a839ead50ca +// Cloned by Alex Emry on 8/4/21 (with many thanks) from https://gist.github.com/gamako/94c8cb8873cabb97291b5a839ead50ca // // extends String to add .hex and .hexData conversions to make my life a million times easier when writing to PineTime // diff --git a/Infini-iOS/View Components/BLEConnectView.swift b/Infini-iOS/View Components/BLEConnectView.swift index 31357fa..a3f7320 100644 --- a/Infini-iOS/View Components/BLEConnectView.swift +++ b/Infini-iOS/View Components/BLEConnectView.swift @@ -2,7 +2,7 @@ // BLEView.swift // Infini-iOS // -// Created by xan-m on 8/11/21. +// Created by Alex Emry on 8/11/21. // import Foundation diff --git a/Infini-iOS/View Components/BLEStatusView.swift b/Infini-iOS/View Components/BLEStatusView.swift index 3a53e28..1170b35 100644 --- a/Infini-iOS/View Components/BLEStatusView.swift +++ b/Infini-iOS/View Components/BLEStatusView.swift @@ -2,7 +2,7 @@ // BLEStatusView.swift // Infini-iOS // -// Created by xan-m on 8/13/21. +// Created by Alex Emry on 8/13/21. // import Foundation @@ -43,7 +43,7 @@ struct StatusView: View { .padding(.vertical, 7) .frame(maxWidth: .infinity, alignment: .center) .background(colorScheme == .dark ? Color.gray : Color.lightGray) - .foregroundColor(colorScheme == .dark ? Color.gray : Color.white) + .foregroundColor(Color.white) .cornerRadius(10) .padding(.horizontal, 20) .padding(.bottom) diff --git a/Infini-iOS/View Components/DFU/DFUProgressBar.swift b/Infini-iOS/View Components/DFU/DFUProgressBar.swift index c57f56e..7cebc68 100644 --- a/Infini-iOS/View Components/DFU/DFUProgressBar.swift +++ b/Infini-iOS/View Components/DFU/DFUProgressBar.swift @@ -2,7 +2,7 @@ // DFUProgressBar.swift // Infini-iOS // -// Created by xan-m on 8/19/21. +// Created by Alex Emry on 8/19/21. // // @@ -16,6 +16,9 @@ struct DFUProgressBar: View { @EnvironmentObject var dfuUpdater: DFU_Updater var body: some View { + VStack { + Text("DFU Status: " + dfuUpdater.dfuState) + Text("Progress:") ZStack { GeometryReader { geometry in Capsule() @@ -23,11 +26,12 @@ struct DFUProgressBar: View { .foregroundColor(colorScheme == .dark ? Color.darkGray : Color.gray) .padding(.horizontal) Capsule() - .frame(width: (geometry.size.width * CGFloat((dfuUpdater.percentComplete ?? 0.0)/100)) * 0.9, height: 10) + .frame(width: (geometry.size.width * CGFloat((dfuUpdater.percentComplete)/100)) * 0.9, height: 10) .foregroundColor(colorScheme == .dark ? Color.white : Color.black) .padding(.horizontal) .animation(.easeIn) } + } } } } diff --git a/Infini-iOS/View Components/DFU/DFUView.swift b/Infini-iOS/View Components/DFU/DFUView.swift index 0bdbaeb..11490de 100644 --- a/Infini-iOS/View Components/DFU/DFUView.swift +++ b/Infini-iOS/View Components/DFU/DFUView.swift @@ -2,7 +2,7 @@ // DFUView.swift // Infini-iOS // -// Created by xan-m on 8/11/21. +// Created by Alex Emry on 8/11/21. // import Foundation @@ -45,11 +45,8 @@ struct DFUView: View { Spacer() if updateStarted { - Text("Progress:") - .frame(maxWidth: .infinity, alignment: .center) - .padding(.horizontal) DFUProgressBar().environmentObject(dfuUpdater) - .frame(height: 20 ,alignment: .center) + .frame(height: 40 ,alignment: .center) .padding() } @@ -60,7 +57,7 @@ struct DFUView: View { .padding() .padding(.vertical, 7) .frame(maxWidth: .infinity, alignment: .center) - .background(Color.gray) + .background(colorScheme == .dark ? Color.darkGray : Color.gray) .foregroundColor(Color.white) .cornerRadius(10) .padding(.horizontal, 20) diff --git a/Infini-iOS/View Components/PageSwitcher.swift b/Infini-iOS/View Components/PageSwitcher.swift index 24d6191..65d8b55 100644 --- a/Infini-iOS/View Components/PageSwitcher.swift +++ b/Infini-iOS/View Components/PageSwitcher.swift @@ -2,7 +2,7 @@ // PageSwitcher.swift // Infini-iOS // -// Created by xan-m on 8/12/21. +// Created by Alex Emry on 8/12/21. // import Foundation diff --git a/Infini-iOS/View Components/SettingsView.swift b/Infini-iOS/View Components/SettingsView.swift index b9923dd..503cb3b 100644 --- a/Infini-iOS/View Components/SettingsView.swift +++ b/Infini-iOS/View Components/SettingsView.swift @@ -2,7 +2,7 @@ // SettingsView.swift // Infini-iOS // -// Created by xan-m on 8/15/21. +// Created by Alex Emry on 8/15/21. // // diff --git a/Infini-iOS/View Components/SideMenu.swift b/Infini-iOS/View Components/SideMenu.swift index ac58b04..f16b38f 100644 --- a/Infini-iOS/View Components/SideMenu.swift +++ b/Infini-iOS/View Components/SideMenu.swift @@ -2,7 +2,7 @@ // SideMenu.swift // Infini-iOS // -// Created by xan-m on 8/12/21. +// Created by Alex Emry on 8/12/21. // import SwiftUI diff --git a/Infini-iOS/View Components/Status View Components/BatteryChart.swift b/Infini-iOS/View Components/Status View Components/BatteryChart.swift index 30b1ad4..2413417 100644 --- a/Infini-iOS/View Components/Status View Components/BatteryChart.swift +++ b/Infini-iOS/View Components/Status View Components/BatteryChart.swift @@ -2,7 +2,7 @@ // File.swift // Infini-iOS // -// Created by xan-m on 8/18/21. +// Created by Alex Emry on 8/18/21. // // diff --git a/Infini-iOS/View Components/Status View Components/HeartChart.swift b/Infini-iOS/View Components/Status View Components/HeartChart.swift index 55e8221..b80974c 100644 --- a/Infini-iOS/View Components/Status View Components/HeartChart.swift +++ b/Infini-iOS/View Components/Status View Components/HeartChart.swift @@ -2,7 +2,7 @@ // File.swift // Infini-iOS // -// Created by xan-m on 8/18/21. +// Created by Alex Emry on 8/18/21. // // diff --git a/Infini-iOS/View Components/Status View Components/StatusViewTabs.swift b/Infini-iOS/View Components/Status View Components/StatusViewTabs.swift index 79b3f77..510366b 100644 --- a/Infini-iOS/View Components/Status View Components/StatusViewTabs.swift +++ b/Infini-iOS/View Components/Status View Components/StatusViewTabs.swift @@ -2,7 +2,7 @@ // StatusViewTabs.swift // Infini-iOS // -// Created by xan-m on 8/18/21. +// Created by Alex Emry on 8/18/21. // // diff --git a/Infini-iOSTests/Infini_iOSTests.swift b/Infini-iOSTests/Infini_iOSTests.swift index 3075db2..a29c723 100644 --- a/Infini-iOSTests/Infini_iOSTests.swift +++ b/Infini-iOSTests/Infini_iOSTests.swift @@ -2,7 +2,7 @@ // Infini_iOSTests.swift // Infini-iOSTests // -// Created by xan-m on 8/5/21. +// Created by Alex Emry on 8/5/21. // import XCTest diff --git a/Infini-iOSUITests/Infini_iOSUITests.swift b/Infini-iOSUITests/Infini_iOSUITests.swift index 9cf2d7b..8e9ca70 100644 --- a/Infini-iOSUITests/Infini_iOSUITests.swift +++ b/Infini-iOSUITests/Infini_iOSUITests.swift @@ -2,7 +2,7 @@ // Infini_iOSUITests.swift // Infini-iOSUITests // -// Created by xan-m on 8/5/21. +// Created by Alex Emry on 8/5/21. // import XCTest diff --git a/PrivacyPolicy.md b/PrivacyPolicy.md new file mode 100644 index 0000000..9296281 --- /dev/null +++ b/PrivacyPolicy.md @@ -0,0 +1,4 @@ +# Privacy Policy + +Your privacy is important to me. That's why I don't collect any personal information whatsoever. +