ajkl;dfs;asfjl;laskdjf;ajsf
@@ -37,20 +37,20 @@
|
||||
A979F6102D270AF90094C0B3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A979F60F2D270AF80094C0B3 /* Assets.xcassets */; };
|
||||
A979F6142D270AF90094C0B3 /* NearFutureWidgetsExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = A979F6022D270AF00094C0B3 /* NearFutureWidgetsExtension.appex */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
A979F6182D2714310094C0B3 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C28B2D24011400E4F9B1 /* Item.swift */; };
|
||||
A99BF5462DD51522007FBC80 /* Blue.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53A2DD51522007FBC80 /* Blue.png */; };
|
||||
A99BF5472DD51522007FBC80 /* PurpleDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5412DD51522007FBC80 /* PurpleDark.png */; };
|
||||
A99BF5482DD51522007FBC80 /* Green.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53C2DD51522007FBC80 /* Green.png */; };
|
||||
A99BF5492DD51522007FBC80 /* Bloo.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5382DD51522007FBC80 /* Bloo.png */; };
|
||||
A99BF54A2DD51522007FBC80 /* BlueDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53B2DD51522007FBC80 /* BlueDark.png */; };
|
||||
A99BF54B2DD51522007FBC80 /* Pink.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53E2DD51522007FBC80 /* Pink.png */; };
|
||||
A99BF54C2DD51522007FBC80 /* PinkDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53F2DD51522007FBC80 /* PinkDark.png */; };
|
||||
A99BF54D2DD51522007FBC80 /* Red.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5422DD51522007FBC80 /* Red.png */; };
|
||||
A99BF54E2DD51522007FBC80 /* RedDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5432DD51522007FBC80 /* RedDark.png */; };
|
||||
A99BF54F2DD51522007FBC80 /* Purple.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5402DD51522007FBC80 /* Purple.png */; };
|
||||
A99BF5502DD51522007FBC80 /* GreenDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53D2DD51522007FBC80 /* GreenDark.png */; };
|
||||
A99BF5512DD51522007FBC80 /* YellowDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5452DD51522007FBC80 /* YellowDark.png */; };
|
||||
A99BF5522DD51522007FBC80 /* BlooDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5392DD51522007FBC80 /* BlooDark.png */; };
|
||||
A99BF5532DD51522007FBC80 /* Yellow.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5442DD51522007FBC80 /* Yellow.png */; };
|
||||
A99BF5462DD51522007FBC80 /* blue.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53A2DD51522007FBC80 /* blue.png */; };
|
||||
A99BF5472DD51522007FBC80 /* purpleDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5412DD51522007FBC80 /* purpleDark.png */; };
|
||||
A99BF5482DD51522007FBC80 /* green.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53C2DD51522007FBC80 /* green.png */; };
|
||||
A99BF5492DD51522007FBC80 /* bloo.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5382DD51522007FBC80 /* bloo.png */; };
|
||||
A99BF54A2DD51522007FBC80 /* blueDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53B2DD51522007FBC80 /* blueDark.png */; };
|
||||
A99BF54B2DD51522007FBC80 /* pink.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53E2DD51522007FBC80 /* pink.png */; };
|
||||
A99BF54C2DD51522007FBC80 /* pinkDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53F2DD51522007FBC80 /* pinkDark.png */; };
|
||||
A99BF54D2DD51522007FBC80 /* red.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5422DD51522007FBC80 /* red.png */; };
|
||||
A99BF54E2DD51522007FBC80 /* redDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5432DD51522007FBC80 /* redDark.png */; };
|
||||
A99BF54F2DD51522007FBC80 /* purple.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5402DD51522007FBC80 /* purple.png */; };
|
||||
A99BF5502DD51522007FBC80 /* greenDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF53D2DD51522007FBC80 /* greenDark.png */; };
|
||||
A99BF5512DD51522007FBC80 /* yellowDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5452DD51522007FBC80 /* yellowDark.png */; };
|
||||
A99BF5522DD51522007FBC80 /* blooDark.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5392DD51522007FBC80 /* blooDark.png */; };
|
||||
A99BF5532DD51522007FBC80 /* yellow.png in Resources */ = {isa = PBXBuildFile; fileRef = A99BF5442DD51522007FBC80 /* yellow.png */; };
|
||||
A9FC7EEA2D2823920020D75B /* NearFutureWidgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9FC7EE92D28238A0020D75B /* NearFutureWidgets.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -128,20 +128,20 @@
|
||||
A979F6112D270AF90094C0B3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A980FC302D920097006A778F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A980FC372D93FB2B006A778F /* NearFutureTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NearFutureTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A99BF5382DD51522007FBC80 /* Bloo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Bloo.png; path = ../Assets.xcassets/IconVariants/Bloo.appiconset/Bloo.png; sourceTree = "<group>"; };
|
||||
A99BF5392DD51522007FBC80 /* BlooDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BlooDark.png; path = ../Assets.xcassets/IconVariants/Bloo.appiconset/BlooDark.png; sourceTree = "<group>"; };
|
||||
A99BF53A2DD51522007FBC80 /* Blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Blue.png; path = ../Assets.xcassets/IconVariants/Blue.appiconset/Blue.png; sourceTree = "<group>"; };
|
||||
A99BF53B2DD51522007FBC80 /* BlueDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BlueDark.png; path = ../Assets.xcassets/IconVariants/Blue.appiconset/BlueDark.png; sourceTree = "<group>"; };
|
||||
A99BF53C2DD51522007FBC80 /* Green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Green.png; path = ../Assets.xcassets/IconVariants/Green.appiconset/Green.png; sourceTree = "<group>"; };
|
||||
A99BF53D2DD51522007FBC80 /* GreenDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = GreenDark.png; path = ../Assets.xcassets/IconVariants/Green.appiconset/GreenDark.png; sourceTree = "<group>"; };
|
||||
A99BF53E2DD51522007FBC80 /* Pink.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Pink.png; path = ../Assets.xcassets/IconVariants/Pink.appiconset/Pink.png; sourceTree = "<group>"; };
|
||||
A99BF53F2DD51522007FBC80 /* PinkDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PinkDark.png; path = ../Assets.xcassets/IconVariants/Pink.appiconset/PinkDark.png; sourceTree = "<group>"; };
|
||||
A99BF5402DD51522007FBC80 /* Purple.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Purple.png; path = ../Assets.xcassets/IconVariants/Purple.appiconset/Purple.png; sourceTree = "<group>"; };
|
||||
A99BF5412DD51522007FBC80 /* PurpleDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = PurpleDark.png; path = ../Assets.xcassets/IconVariants/Purple.appiconset/PurpleDark.png; sourceTree = "<group>"; };
|
||||
A99BF5422DD51522007FBC80 /* Red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Red.png; path = ../Assets.xcassets/IconVariants/Red.appiconset/Red.png; sourceTree = "<group>"; };
|
||||
A99BF5432DD51522007FBC80 /* RedDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = RedDark.png; path = ../Assets.xcassets/IconVariants/Red.appiconset/RedDark.png; sourceTree = "<group>"; };
|
||||
A99BF5442DD51522007FBC80 /* Yellow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Yellow.png; path = ../Assets.xcassets/IconVariants/Yellow.appiconset/Yellow.png; sourceTree = "<group>"; };
|
||||
A99BF5452DD51522007FBC80 /* YellowDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = YellowDark.png; path = ../Assets.xcassets/IconVariants/Yellow.appiconset/YellowDark.png; sourceTree = "<group>"; };
|
||||
A99BF5382DD51522007FBC80 /* bloo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = bloo.png; path = ../Assets.xcassets/IconVariants/Bloo.appiconset/bloo.png; sourceTree = "<group>"; };
|
||||
A99BF5392DD51522007FBC80 /* blooDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blooDark.png; path = ../Assets.xcassets/IconVariants/Bloo.appiconset/blooDark.png; sourceTree = "<group>"; };
|
||||
A99BF53A2DD51522007FBC80 /* blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blue.png; path = ../Assets.xcassets/IconVariants/Blue.appiconset/blue.png; sourceTree = "<group>"; };
|
||||
A99BF53B2DD51522007FBC80 /* blueDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blueDark.png; path = ../Assets.xcassets/IconVariants/Blue.appiconset/blueDark.png; sourceTree = "<group>"; };
|
||||
A99BF53C2DD51522007FBC80 /* green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = green.png; path = ../Assets.xcassets/IconVariants/Green.appiconset/green.png; sourceTree = "<group>"; };
|
||||
A99BF53D2DD51522007FBC80 /* greenDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = greenDark.png; path = ../Assets.xcassets/IconVariants/Green.appiconset/greenDark.png; sourceTree = "<group>"; };
|
||||
A99BF53E2DD51522007FBC80 /* pink.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pink.png; path = ../Assets.xcassets/IconVariants/Pink.appiconset/pink.png; sourceTree = "<group>"; };
|
||||
A99BF53F2DD51522007FBC80 /* pinkDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = pinkDark.png; path = ../Assets.xcassets/IconVariants/Pink.appiconset/pinkDark.png; sourceTree = "<group>"; };
|
||||
A99BF5402DD51522007FBC80 /* purple.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = purple.png; path = ../Assets.xcassets/IconVariants/Purple.appiconset/purple.png; sourceTree = "<group>"; };
|
||||
A99BF5412DD51522007FBC80 /* purpleDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = purpleDark.png; path = ../Assets.xcassets/IconVariants/Purple.appiconset/purpleDark.png; sourceTree = "<group>"; };
|
||||
A99BF5422DD51522007FBC80 /* red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = red.png; path = ../Assets.xcassets/IconVariants/Red.appiconset/red.png; sourceTree = "<group>"; };
|
||||
A99BF5432DD51522007FBC80 /* redDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = redDark.png; path = ../Assets.xcassets/IconVariants/Red.appiconset/redDark.png; sourceTree = "<group>"; };
|
||||
A99BF5442DD51522007FBC80 /* yellow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = yellow.png; path = ../Assets.xcassets/IconVariants/Yellow.appiconset/yellow.png; sourceTree = "<group>"; };
|
||||
A99BF5452DD51522007FBC80 /* yellowDark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = yellowDark.png; path = ../Assets.xcassets/IconVariants/Yellow.appiconset/yellowDark.png; sourceTree = "<group>"; };
|
||||
A9C05E412D2805D7007DC497 /* NearFutureWidgetsExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NearFutureWidgetsExtension.entitlements; sourceTree = "<group>"; };
|
||||
A9FC7EE92D28238A0020D75B /* NearFutureWidgets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureWidgets.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -348,20 +348,20 @@
|
||||
A99BF5542DD51525007FBC80 /* Variants */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A99BF5382DD51522007FBC80 /* Bloo.png */,
|
||||
A99BF5392DD51522007FBC80 /* BlooDark.png */,
|
||||
A99BF53A2DD51522007FBC80 /* Blue.png */,
|
||||
A99BF53B2DD51522007FBC80 /* BlueDark.png */,
|
||||
A99BF53C2DD51522007FBC80 /* Green.png */,
|
||||
A99BF53D2DD51522007FBC80 /* GreenDark.png */,
|
||||
A99BF53E2DD51522007FBC80 /* Pink.png */,
|
||||
A99BF53F2DD51522007FBC80 /* PinkDark.png */,
|
||||
A99BF5402DD51522007FBC80 /* Purple.png */,
|
||||
A99BF5412DD51522007FBC80 /* PurpleDark.png */,
|
||||
A99BF5422DD51522007FBC80 /* Red.png */,
|
||||
A99BF5432DD51522007FBC80 /* RedDark.png */,
|
||||
A99BF5442DD51522007FBC80 /* Yellow.png */,
|
||||
A99BF5452DD51522007FBC80 /* YellowDark.png */,
|
||||
A99BF5382DD51522007FBC80 /* bloo.png */,
|
||||
A99BF5392DD51522007FBC80 /* blooDark.png */,
|
||||
A99BF53A2DD51522007FBC80 /* blue.png */,
|
||||
A99BF53B2DD51522007FBC80 /* blueDark.png */,
|
||||
A99BF53C2DD51522007FBC80 /* green.png */,
|
||||
A99BF53D2DD51522007FBC80 /* greenDark.png */,
|
||||
A99BF53E2DD51522007FBC80 /* pink.png */,
|
||||
A99BF53F2DD51522007FBC80 /* pinkDark.png */,
|
||||
A99BF5402DD51522007FBC80 /* purple.png */,
|
||||
A99BF5412DD51522007FBC80 /* purpleDark.png */,
|
||||
A99BF5422DD51522007FBC80 /* red.png */,
|
||||
A99BF5432DD51522007FBC80 /* redDark.png */,
|
||||
A99BF5442DD51522007FBC80 /* yellow.png */,
|
||||
A99BF5452DD51522007FBC80 /* yellowDark.png */,
|
||||
);
|
||||
path = Variants;
|
||||
sourceTree = "<group>";
|
||||
@@ -478,20 +478,20 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A99BF5462DD51522007FBC80 /* Blue.png in Resources */,
|
||||
A99BF5472DD51522007FBC80 /* PurpleDark.png in Resources */,
|
||||
A99BF5482DD51522007FBC80 /* Green.png in Resources */,
|
||||
A99BF5492DD51522007FBC80 /* Bloo.png in Resources */,
|
||||
A99BF54A2DD51522007FBC80 /* BlueDark.png in Resources */,
|
||||
A99BF54B2DD51522007FBC80 /* Pink.png in Resources */,
|
||||
A99BF54C2DD51522007FBC80 /* PinkDark.png in Resources */,
|
||||
A99BF54D2DD51522007FBC80 /* Red.png in Resources */,
|
||||
A99BF54E2DD51522007FBC80 /* RedDark.png in Resources */,
|
||||
A99BF54F2DD51522007FBC80 /* Purple.png in Resources */,
|
||||
A99BF5502DD51522007FBC80 /* GreenDark.png in Resources */,
|
||||
A99BF5512DD51522007FBC80 /* YellowDark.png in Resources */,
|
||||
A99BF5522DD51522007FBC80 /* BlooDark.png in Resources */,
|
||||
A99BF5532DD51522007FBC80 /* Yellow.png in Resources */,
|
||||
A99BF5462DD51522007FBC80 /* blue.png in Resources */,
|
||||
A99BF5472DD51522007FBC80 /* purpleDark.png in Resources */,
|
||||
A99BF5482DD51522007FBC80 /* green.png in Resources */,
|
||||
A99BF5492DD51522007FBC80 /* bloo.png in Resources */,
|
||||
A99BF54A2DD51522007FBC80 /* blueDark.png in Resources */,
|
||||
A99BF54B2DD51522007FBC80 /* pink.png in Resources */,
|
||||
A99BF54C2DD51522007FBC80 /* pinkDark.png in Resources */,
|
||||
A99BF54D2DD51522007FBC80 /* red.png in Resources */,
|
||||
A99BF54E2DD51522007FBC80 /* redDark.png in Resources */,
|
||||
A99BF54F2DD51522007FBC80 /* purple.png in Resources */,
|
||||
A99BF5502DD51522007FBC80 /* greenDark.png in Resources */,
|
||||
A99BF5512DD51522007FBC80 /* yellowDark.png in Resources */,
|
||||
A99BF5522DD51522007FBC80 /* blooDark.png in Resources */,
|
||||
A99BF5532DD51522007FBC80 /* yellow.png in Resources */,
|
||||
A920C2922D24011A00E4F9B1 /* Preview Assets.xcassets in Resources */,
|
||||
A949F8322DCAAA8A0064DCA0 /* NearFutureIcon.png in Resources */,
|
||||
A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */,
|
||||
|
||||
@@ -111,16 +111,22 @@ struct Settings: Codable, Equatable {
|
||||
var prevAppVersion: String
|
||||
}
|
||||
|
||||
struct AccentIcon {
|
||||
var icon: UIImage
|
||||
var color: Color
|
||||
var name: String
|
||||
init(_ colorName: String) {
|
||||
if colorName == "orange" {
|
||||
self.icon = UIImage(named: "AppIcon")!
|
||||
} else {
|
||||
self.icon = UIImage(named: colorName)!
|
||||
}
|
||||
self.color = Color(uiColor: UIColor(named: "uiColors/\(colorName)")!)
|
||||
self.name = colorName
|
||||
}
|
||||
}
|
||||
|
||||
class SettingsViewModel: ObservableObject {
|
||||
@Published var iconChoices = [
|
||||
"Bloo",
|
||||
"Blue",
|
||||
"Green",
|
||||
"Pink",
|
||||
"Purple",
|
||||
"Red",
|
||||
"Yellow"
|
||||
]
|
||||
@Published var settings: Settings = Settings(
|
||||
showCompletedInHome: false,
|
||||
tint: ColorCodable(uiColor: UIColor(named: "AccentColor")!),
|
||||
@@ -129,13 +135,17 @@ class SettingsViewModel: ObservableObject {
|
||||
)
|
||||
@Published var notifsGranted: Bool = false
|
||||
|
||||
@Published var accentChoices: [Color] = [
|
||||
Color(UIColor(named: "uiColors/red")!),
|
||||
Color(UIColor(named: "uiColors/orange")!),
|
||||
Color(UIColor(named: "uiColors/yellow")!),
|
||||
Color(UIColor(named: "uiColors/green")!),
|
||||
Color(UIColor(named: "uiColors/blue")!),
|
||||
Color(UIColor(named: "uiColors/indigo")!)
|
||||
@Published var colorChoices: [AccentIcon] = []
|
||||
|
||||
let accentChoices: [String] = [
|
||||
"bloo",
|
||||
"blue",
|
||||
"green",
|
||||
"orange",
|
||||
"pink",
|
||||
"purple",
|
||||
"red",
|
||||
"yellow"
|
||||
]
|
||||
|
||||
@Published var device: (sf: String, label: String)
|
||||
@@ -170,6 +180,11 @@ class SettingsViewModel: ObservableObject {
|
||||
if self.settings.prevAppVersion != getVersion()+getBuildID() {
|
||||
self.settings.showWhatsNew = true
|
||||
}
|
||||
|
||||
//
|
||||
for color in accentChoices {
|
||||
self.colorChoices.append(AccentIcon(color))
|
||||
}
|
||||
}
|
||||
|
||||
func saveSettings() {
|
||||
@@ -181,6 +196,10 @@ class SettingsViewModel: ObservableObject {
|
||||
loadSettings()
|
||||
}
|
||||
}
|
||||
|
||||
func changeAccent(to color: AccentIcon) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class EventViewModel: ObservableObject {
|
||||
|
||||
@@ -70,15 +70,15 @@ struct HomeView: View {
|
||||
if filteredEvents.isEmpty && !searchInput.isEmpty {
|
||||
HelpView(searchInput: $searchInput, focusedField: focusedField)
|
||||
} else {
|
||||
ForEach(settingsModel.iconChoices, id: \.self) { image in
|
||||
Image(uiImage: UIImage(named: darkMode ? image+"Dark" : image)!)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 50)
|
||||
.onTapGesture {
|
||||
|
||||
}
|
||||
}
|
||||
// ForEach(settingsModel.iconChoices, id: \.self) { image in
|
||||
// Image(uiImage: UIImage(named: darkMode ? image+"Dark" : image)!)
|
||||
// .resizable()
|
||||
// .scaledToFit()
|
||||
// .frame(width: 50)
|
||||
// .onTapGesture {
|
||||
// settingsModel.changeAccent(to: image)
|
||||
// }
|
||||
// }
|
||||
ScrollView {
|
||||
ForEach(filteredEvents) { event in
|
||||
EventListView(viewModel: viewModel, event: event)
|
||||
@@ -137,3 +137,9 @@ struct HomeView: View {
|
||||
)
|
||||
}
|
||||
|
||||
func changeIcon(to iconName: String?) {
|
||||
guard UIApplication.shared.supportsAlternateIcons else { return }
|
||||
UIApplication.shared.setAlternateIconName(iconName) {error in
|
||||
print(error as Any)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,24 +47,42 @@ struct SettingsView: View {
|
||||
List {
|
||||
ScrollView(.horizontal) {
|
||||
HStack {
|
||||
ForEach(settingsModel.accentChoices, id: \.self) { color in
|
||||
ForEach(settingsModel.accentChoices, id: \.self) { choice in
|
||||
ZStack {
|
||||
Button() {
|
||||
settingsModel.settings.tint.colorBind = color
|
||||
settingsModel.saveSettings()
|
||||
settingsModel.changeAccent(to: choice)
|
||||
} label: {
|
||||
Circle()
|
||||
.foregroundStyle(color)
|
||||
.foregroundStyle(choice.color)
|
||||
.frame(width: 30)
|
||||
}
|
||||
if ColorCodable(color) == settingsModel.settings.tint {
|
||||
let needContrast: Bool = ColorCodable(color) == settingsModel.settings.tint
|
||||
if ColorCodable(choice.color) == settingsModel.settings.tint {
|
||||
let needContrast: Bool = ColorCodable(choice.color) == settingsModel.settings.tint
|
||||
Circle()
|
||||
.foregroundStyle(needContrast ? .two : .one)
|
||||
.frame(width: 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ForEach(settingsModel.accentChoices, id: \.self) { color in
|
||||
// ZStack {
|
||||
// Button() {
|
||||
//
|
||||
// } label: {
|
||||
// Circle()
|
||||
// .foregroundStyle(color)
|
||||
// .frame(width: 30)
|
||||
// }
|
||||
// if ColorCodable(color) == settingsModel.settings.tint {
|
||||
// let needContrast: Bool = ColorCodable(color) == settingsModel.settings.tint
|
||||
// Circle()
|
||||
// .foregroundStyle(needContrast ? .two : .one)
|
||||
// .frame(width: 10)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
Toggle("Show completed Events in Home", isOn: $settingsModel.settings.showCompletedInHome)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Bloo.png",
|
||||
"filename" : "bloo.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "BlooDark.png",
|
||||
"filename" : "blooDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 712 KiB After Width: | Height: | Size: 712 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Blue.png",
|
||||
"filename" : "blue.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "BlueDark.png",
|
||||
"filename" : "blueDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 734 KiB After Width: | Height: | Size: 734 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Pink.png",
|
||||
"filename" : "pink.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "PinkDark.png",
|
||||
"filename" : "pinkDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 728 KiB After Width: | Height: | Size: 728 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Purple.png",
|
||||
"filename" : "purple.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "PurpleDark.png",
|
||||
"filename" : "purpleDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 746 KiB After Width: | Height: | Size: 746 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Red.png",
|
||||
"filename" : "red.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "RedDark.png",
|
||||
"filename" : "redDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 751 KiB After Width: | Height: | Size: 751 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Yellow.png",
|
||||
"filename" : "yellow.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "YellowDark.png",
|
||||
"filename" : "yellowDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 743 KiB After Width: | Height: | Size: 743 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Green.png",
|
||||
"filename" : "green.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
@@ -13,7 +13,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "GreenDark.png",
|
||||
"filename" : "greenDark.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
|
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 632 KiB |
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "display-p3",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0.341",
|
||||
"green" : "0.286",
|
||||
"red" : "0.114"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||