Changed GameSeries Views to new core data swiftui best practices. Missing import/export yet. Deleted old store files and cleaned up some comments
This commit is contained in:
@@ -26,12 +26,8 @@
|
|||||||
B97AD2E0244CE4B4004AF00D /* Disk in Frameworks */ = {isa = PBXBuildFile; productRef = B97AD2DF244CE4B4004AF00D /* Disk */; };
|
B97AD2E0244CE4B4004AF00D /* Disk in Frameworks */ = {isa = PBXBuildFile; productRef = B97AD2DF244CE4B4004AF00D /* Disk */; };
|
||||||
B9839983233A086A002F9946 /* Overview.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9839982233A086A002F9946 /* Overview.swift */; };
|
B9839983233A086A002F9946 /* Overview.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9839982233A086A002F9946 /* Overview.swift */; };
|
||||||
B983998C233A0BC9002F9946 /* Cover+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94CB4F522D1352F0029BFAD /* Cover+CoreDataClass.swift */; };
|
B983998C233A0BC9002F9946 /* Cover+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = B94CB4F522D1352F0029BFAD /* Cover+CoreDataClass.swift */; };
|
||||||
B9839991233A0E16002F9946 /* GameSeriesCover+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9839985233A0ADB002F9946 /* GameSeriesCover+CoreDataProperties.swift */; };
|
|
||||||
B9839992233A0E19002F9946 /* GameSeriesCover+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9839984233A0ADB002F9946 /* GameSeriesCover+CoreDataClass.swift */; };
|
|
||||||
B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = B98A731722BA9E4600FB3410 /* Zockerhoehle.xcdatamodeld */; };
|
B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = B98A731722BA9E4600FB3410 /* Zockerhoehle.xcdatamodeld */; };
|
||||||
B98A736022C1738800FB3410 /* CDManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98A735F22C1738800FB3410 /* CDManager.swift */; };
|
B98A736022C1738800FB3410 /* CDManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98A735F22C1738800FB3410 /* CDManager.swift */; };
|
||||||
B98B2FAA2328DF3400606DC4 /* GameSeriesStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98B2FA92328DF3400606DC4 /* GameSeriesStore.swift */; };
|
|
||||||
B98B2FAC232C0F8C00606DC4 /* ImagePicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98B2FAB232C0F8C00606DC4 /* ImagePicker.swift */; };
|
|
||||||
B98CBBD2264E933A00B1B7AC /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B98CBBD1264E933A00B1B7AC /* CloudKit.framework */; };
|
B98CBBD2264E933A00B1B7AC /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B98CBBD1264E933A00B1B7AC /* CloudKit.framework */; };
|
||||||
B98CBBDA264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */; };
|
B98CBBDA264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */; };
|
||||||
B98CBBDB264E98DE00B1B7AC /* Console+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBD8264E98DD00B1B7AC /* Console+CoreDataProperties.swift */; };
|
B98CBBDB264E98DE00B1B7AC /* Console+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = B98CBBD8264E98DD00B1B7AC /* Console+CoreDataProperties.swift */; };
|
||||||
@@ -45,19 +41,13 @@
|
|||||||
B9BCCEB92653BDEA005F46D6 /* ICloudManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */; };
|
B9BCCEB92653BDEA005F46D6 /* ICloudManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */; };
|
||||||
B9BCCEBB2653CA8E005F46D6 /* SwiftUIBindingExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BCCEBA2653CA8E005F46D6 /* SwiftUIBindingExtension.swift */; };
|
B9BCCEBB2653CA8E005F46D6 /* SwiftUIBindingExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9BCCEBA2653CA8E005F46D6 /* SwiftUIBindingExtension.swift */; };
|
||||||
B9BCF4CA2168ACB600ECBAAC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */; };
|
B9BCF4CA2168ACB600ECBAAC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */; };
|
||||||
B9D2C6F722E98ED800797F67 /* AccessoryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9D2C6F622E98ED800797F67 /* AccessoryViewModel.swift */; };
|
|
||||||
B9E2A079233B69D400EAEB14 /* GameSeriesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A078233B69D400EAEB14 /* GameSeriesViewModel.swift */; };
|
|
||||||
B9E2A07B233B6A8F00EAEB14 /* GameSeriesEditView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A07A233B6A8F00EAEB14 /* GameSeriesEditView.swift */; };
|
B9E2A07B233B6A8F00EAEB14 /* GameSeriesEditView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A07A233B6A8F00EAEB14 /* GameSeriesEditView.swift */; };
|
||||||
B9E2A07E233B6E4F00EAEB14 /* ConsoleAllView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A07C233B6E4F00EAEB14 /* ConsoleAllView.swift */; };
|
B9E2A07E233B6E4F00EAEB14 /* ConsoleAllView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A07C233B6E4F00EAEB14 /* ConsoleAllView.swift */; };
|
||||||
B9E2A081233BA62100EAEB14 /* FeaturedStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9E2A080233BA62100EAEB14 /* FeaturedStore.swift */; };
|
|
||||||
B9EC09822383F94B004BC9AB /* LibraryExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EC09812383F94B004BC9AB /* LibraryExport.swift */; };
|
B9EC09822383F94B004BC9AB /* LibraryExport.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EC09812383F94B004BC9AB /* LibraryExport.swift */; };
|
||||||
B9EC098523854C24004BC9AB /* QGrid in Frameworks */ = {isa = PBXBuildFile; productRef = B9EC098423854C24004BC9AB /* QGrid */; };
|
B9EC098523854C24004BC9AB /* QGrid in Frameworks */ = {isa = PBXBuildFile; productRef = B9EC098423854C24004BC9AB /* QGrid */; };
|
||||||
B9EC0987238555BF004BC9AB /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EC0986238555BF004BC9AB /* SettingsView.swift */; };
|
B9EC0987238555BF004BC9AB /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9EC0986238555BF004BC9AB /* SettingsView.swift */; };
|
||||||
B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */; };
|
B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */; };
|
||||||
B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */; };
|
B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */; };
|
||||||
B9F44AE522F418F600FC6B29 /* ConsoleStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AE422F418F600FC6B29 /* ConsoleStore.swift */; };
|
|
||||||
B9F44AE722F429D300FC6B29 /* GameStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AE622F429D300FC6B29 /* GameStore.swift */; };
|
|
||||||
B9F44AE922F4655600FC6B29 /* AccessoryStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9F44AE822F4655600FC6B29 /* AccessoryStore.swift */; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@@ -107,12 +97,8 @@
|
|||||||
B94CB53522D3708F0029BFAD /* Zockerhoehle copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Zockerhoehle copy-Info.plist"; path = "/Users/julian/Entwicklung/Zockerhoehle/Zockerhoehle copy-Info.plist"; sourceTree = "<absolute>"; };
|
B94CB53522D3708F0029BFAD /* Zockerhoehle copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Zockerhoehle copy-Info.plist"; path = "/Users/julian/Entwicklung/Zockerhoehle/Zockerhoehle copy-Info.plist"; sourceTree = "<absolute>"; };
|
||||||
B94CB53622D3B3CC0029BFAD /* GameDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameDetailView.swift; sourceTree = "<group>"; };
|
B94CB53622D3B3CC0029BFAD /* GameDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameDetailView.swift; sourceTree = "<group>"; };
|
||||||
B9839982233A086A002F9946 /* Overview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Overview.swift; sourceTree = "<group>"; };
|
B9839982233A086A002F9946 /* Overview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Overview.swift; sourceTree = "<group>"; };
|
||||||
B9839984233A0ADB002F9946 /* GameSeriesCover+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GameSeriesCover+CoreDataClass.swift"; sourceTree = "<group>"; };
|
|
||||||
B9839985233A0ADB002F9946 /* GameSeriesCover+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "GameSeriesCover+CoreDataProperties.swift"; sourceTree = "<group>"; };
|
|
||||||
B98A731822BA9E4600FB3410 /* Zockerhoehle.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Zockerhoehle.xcdatamodel; sourceTree = "<group>"; };
|
B98A731822BA9E4600FB3410 /* Zockerhoehle.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Zockerhoehle.xcdatamodel; sourceTree = "<group>"; };
|
||||||
B98A735F22C1738800FB3410 /* CDManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDManager.swift; sourceTree = "<group>"; };
|
B98A735F22C1738800FB3410 /* CDManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CDManager.swift; sourceTree = "<group>"; };
|
||||||
B98B2FA92328DF3400606DC4 /* GameSeriesStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesStore.swift; sourceTree = "<group>"; };
|
|
||||||
B98B2FAB232C0F8C00606DC4 /* ImagePicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePicker.swift; sourceTree = "<group>"; };
|
|
||||||
B98CBBD0264E933400B1B7AC /* Zockerhoehle.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Zockerhoehle.entitlements; sourceTree = "<group>"; };
|
B98CBBD0264E933400B1B7AC /* Zockerhoehle.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Zockerhoehle.entitlements; sourceTree = "<group>"; };
|
||||||
B98CBBD1264E933A00B1B7AC /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
|
B98CBBD1264E933A00B1B7AC /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
|
||||||
B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "GameSeries+CoreDataProperties.swift"; sourceTree = "<group>"; };
|
B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "GameSeries+CoreDataProperties.swift"; sourceTree = "<group>"; };
|
||||||
@@ -128,18 +114,12 @@
|
|||||||
B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICloudManager.swift; sourceTree = "<group>"; };
|
B9BCCEB82653BDEA005F46D6 /* ICloudManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ICloudManager.swift; sourceTree = "<group>"; };
|
||||||
B9BCCEBA2653CA8E005F46D6 /* SwiftUIBindingExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIBindingExtension.swift; sourceTree = "<group>"; };
|
B9BCCEBA2653CA8E005F46D6 /* SwiftUIBindingExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIBindingExtension.swift; sourceTree = "<group>"; };
|
||||||
B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
B9BCF4C92168ACB600ECBAAC /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
B9D2C6F622E98ED800797F67 /* AccessoryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessoryViewModel.swift; sourceTree = "<group>"; };
|
|
||||||
B9E2A078233B69D400EAEB14 /* GameSeriesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesViewModel.swift; sourceTree = "<group>"; };
|
|
||||||
B9E2A07A233B6A8F00EAEB14 /* GameSeriesEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesEditView.swift; sourceTree = "<group>"; };
|
B9E2A07A233B6A8F00EAEB14 /* GameSeriesEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameSeriesEditView.swift; sourceTree = "<group>"; };
|
||||||
B9E2A07C233B6E4F00EAEB14 /* ConsoleAllView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsoleAllView.swift; sourceTree = "<group>"; };
|
B9E2A07C233B6E4F00EAEB14 /* ConsoleAllView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConsoleAllView.swift; sourceTree = "<group>"; };
|
||||||
B9E2A080233BA62100EAEB14 /* FeaturedStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturedStore.swift; sourceTree = "<group>"; };
|
|
||||||
B9EC09812383F94B004BC9AB /* LibraryExport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryExport.swift; sourceTree = "<group>"; };
|
B9EC09812383F94B004BC9AB /* LibraryExport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryExport.swift; sourceTree = "<group>"; };
|
||||||
B9EC0986238555BF004BC9AB /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
B9EC0986238555BF004BC9AB /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
||||||
B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleLibraryView.swift; sourceTree = "<group>"; };
|
B9F44AB922F312E600FC6B29 /* ConsoleLibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleLibraryView.swift; sourceTree = "<group>"; };
|
||||||
B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
B9F44ABD22F31DEF00FC6B29 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
||||||
B9F44AE422F418F600FC6B29 /* ConsoleStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleStore.swift; sourceTree = "<group>"; };
|
|
||||||
B9F44AE622F429D300FC6B29 /* GameStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameStore.swift; sourceTree = "<group>"; };
|
|
||||||
B9F44AE822F4655600FC6B29 /* AccessoryStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccessoryStore.swift; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -195,7 +175,6 @@
|
|||||||
children = (
|
children = (
|
||||||
B926F14621502D53004D36B7 /* CodableExtensionAny.swift */,
|
B926F14621502D53004D36B7 /* CodableExtensionAny.swift */,
|
||||||
B94112DD233A37DD00159AE4 /* DateConversion.swift */,
|
B94112DD233A37DD00159AE4 /* DateConversion.swift */,
|
||||||
B98B2FAB232C0F8C00606DC4 /* ImagePicker.swift */,
|
|
||||||
B9EC09812383F94B004BC9AB /* LibraryExport.swift */,
|
B9EC09812383F94B004BC9AB /* LibraryExport.swift */,
|
||||||
B90E03EA238557D900E79643 /* LibraryImport.swift */,
|
B90E03EA238557D900E79643 /* LibraryImport.swift */,
|
||||||
B98CBBE2265045AC00B1B7AC /* URLExtension.swift */,
|
B98CBBE2265045AC00B1B7AC /* URLExtension.swift */,
|
||||||
@@ -228,7 +207,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B98CBBD0264E933400B1B7AC /* Zockerhoehle.entitlements */,
|
B98CBBD0264E933400B1B7AC /* Zockerhoehle.entitlements */,
|
||||||
B93D60CF22E5006F00DD390F /* ViewModel */,
|
|
||||||
B98A734622BACA9C00FB3410 /* CDModel */,
|
B98A734622BACA9C00FB3410 /* CDModel */,
|
||||||
B926F13A214AF21B004D36B7 /* Utils */,
|
B926F13A214AF21B004D36B7 /* Utils */,
|
||||||
B926F136214AE2E3004D36B7 /* Views */,
|
B926F136214AE2E3004D36B7 /* Views */,
|
||||||
@@ -244,28 +222,12 @@
|
|||||||
path = Zockerhoehle;
|
path = Zockerhoehle;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
B93D60CF22E5006F00DD390F /* ViewModel */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
B9E2A078233B69D400EAEB14 /* GameSeriesViewModel.swift */,
|
|
||||||
B9D2C6F622E98ED800797F67 /* AccessoryViewModel.swift */,
|
|
||||||
B9F44AE422F418F600FC6B29 /* ConsoleStore.swift */,
|
|
||||||
B9F44AE622F429D300FC6B29 /* GameStore.swift */,
|
|
||||||
B9F44AE822F4655600FC6B29 /* AccessoryStore.swift */,
|
|
||||||
B98B2FA92328DF3400606DC4 /* GameSeriesStore.swift */,
|
|
||||||
B9E2A080233BA62100EAEB14 /* FeaturedStore.swift */,
|
|
||||||
);
|
|
||||||
path = ViewModel;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
B98A734622BACA9C00FB3410 /* CDModel */ = {
|
B98A734622BACA9C00FB3410 /* CDModel */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
B98CBBD8264E98DD00B1B7AC /* Console+CoreDataProperties.swift */,
|
B98CBBD8264E98DD00B1B7AC /* Console+CoreDataProperties.swift */,
|
||||||
B98CBBD9264E98DD00B1B7AC /* GameSeries+CoreDataClass.swift */,
|
B98CBBD9264E98DD00B1B7AC /* GameSeries+CoreDataClass.swift */,
|
||||||
B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */,
|
B98CBBD7264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift */,
|
||||||
B9839984233A0ADB002F9946 /* GameSeriesCover+CoreDataClass.swift */,
|
|
||||||
B9839985233A0ADB002F9946 /* GameSeriesCover+CoreDataProperties.swift */,
|
|
||||||
B94CB4F322D1352F0029BFAD /* Accessory+CoreDataClass.swift */,
|
B94CB4F322D1352F0029BFAD /* Accessory+CoreDataClass.swift */,
|
||||||
B94CB4F422D1352F0029BFAD /* Accessory+CoreDataProperties.swift */,
|
B94CB4F422D1352F0029BFAD /* Accessory+CoreDataProperties.swift */,
|
||||||
B94CB4F522D1352F0029BFAD /* Cover+CoreDataClass.swift */,
|
B94CB4F522D1352F0029BFAD /* Cover+CoreDataClass.swift */,
|
||||||
@@ -423,34 +385,27 @@
|
|||||||
files = (
|
files = (
|
||||||
B98CBBDD264E98F300B1B7AC /* Console+CoreDataClass.swift in Sources */,
|
B98CBBDD264E98F300B1B7AC /* Console+CoreDataClass.swift in Sources */,
|
||||||
B98CBBDB264E98DE00B1B7AC /* Console+CoreDataProperties.swift in Sources */,
|
B98CBBDB264E98DE00B1B7AC /* Console+CoreDataProperties.swift in Sources */,
|
||||||
B98B2FAA2328DF3400606DC4 /* GameSeriesStore.swift in Sources */,
|
|
||||||
B9839991233A0E16002F9946 /* GameSeriesCover+CoreDataProperties.swift in Sources */,
|
|
||||||
B983998C233A0BC9002F9946 /* Cover+CoreDataClass.swift in Sources */,
|
B983998C233A0BC9002F9946 /* Cover+CoreDataClass.swift in Sources */,
|
||||||
B98CBBE3265045AC00B1B7AC /* URLExtension.swift in Sources */,
|
B98CBBE3265045AC00B1B7AC /* URLExtension.swift in Sources */,
|
||||||
B9839992233A0E19002F9946 /* GameSeriesCover+CoreDataClass.swift in Sources */,
|
|
||||||
B94112E0233A4EF800159AE4 /* GamePickupsView.swift in Sources */,
|
B94112E0233A4EF800159AE4 /* GamePickupsView.swift in Sources */,
|
||||||
B9A0550522F8CB400054D9A0 /* GameSeriesLibraryView.swift in Sources */,
|
B9A0550522F8CB400054D9A0 /* GameSeriesLibraryView.swift in Sources */,
|
||||||
B9839983233A086A002F9946 /* Overview.swift in Sources */,
|
B9839983233A086A002F9946 /* Overview.swift in Sources */,
|
||||||
B93C1B9D21496BFD0014FD6E /* AppDelegate.swift in Sources */,
|
B93C1B9D21496BFD0014FD6E /* AppDelegate.swift in Sources */,
|
||||||
B94CB53722D3B3CC0029BFAD /* GameDetailView.swift in Sources */,
|
B94CB53722D3B3CC0029BFAD /* GameDetailView.swift in Sources */,
|
||||||
B94CB50322D1352F0029BFAD /* Game+CoreDataClass.swift in Sources */,
|
B94CB50322D1352F0029BFAD /* Game+CoreDataClass.swift in Sources */,
|
||||||
B98B2FAC232C0F8C00606DC4 /* ImagePicker.swift in Sources */,
|
|
||||||
B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */,
|
B9F44ABA22F312E600FC6B29 /* ConsoleLibraryView.swift in Sources */,
|
||||||
B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */,
|
B9F44ABE22F31DEF00FC6B29 /* SceneDelegate.swift in Sources */,
|
||||||
B9A0550322F8C2740054D9A0 /* MainView.swift in Sources */,
|
B9A0550322F8C2740054D9A0 /* MainView.swift in Sources */,
|
||||||
B9D2C6F722E98ED800797F67 /* AccessoryViewModel.swift in Sources */,
|
|
||||||
B98CBBDA264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift in Sources */,
|
B98CBBDA264E98DD00B1B7AC /* GameSeries+CoreDataProperties.swift in Sources */,
|
||||||
B94CB50A22D1352F0029BFAD /* Logo+CoreDataProperties.swift in Sources */,
|
B94CB50A22D1352F0029BFAD /* Logo+CoreDataProperties.swift in Sources */,
|
||||||
B94CB4FF22D1352F0029BFAD /* Accessory+CoreDataClass.swift in Sources */,
|
B94CB4FF22D1352F0029BFAD /* Accessory+CoreDataClass.swift in Sources */,
|
||||||
B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */,
|
B98A734D22BAD27D00FB3410 /* Zockerhoehle.xcdatamodeld in Sources */,
|
||||||
B9F44AE722F429D300FC6B29 /* GameStore.swift in Sources */,
|
|
||||||
B90E03EB238557D900E79643 /* LibraryImport.swift in Sources */,
|
B90E03EB238557D900E79643 /* LibraryImport.swift in Sources */,
|
||||||
B94CB50922D1352F0029BFAD /* Logo+CoreDataClass.swift in Sources */,
|
B94CB50922D1352F0029BFAD /* Logo+CoreDataClass.swift in Sources */,
|
||||||
B98CBBDC264E98DE00B1B7AC /* GameSeries+CoreDataClass.swift in Sources */,
|
B98CBBDC264E98DE00B1B7AC /* GameSeries+CoreDataClass.swift in Sources */,
|
||||||
B9A0550122F8C22D0054D9A0 /* GameSeriesAllView.swift in Sources */,
|
B9A0550122F8C22D0054D9A0 /* GameSeriesAllView.swift in Sources */,
|
||||||
B94112E4233B597D00159AE4 /* ConsoleEditView.swift in Sources */,
|
B94112E4233B597D00159AE4 /* ConsoleEditView.swift in Sources */,
|
||||||
B94112DE233A37DD00159AE4 /* DateConversion.swift in Sources */,
|
B94112DE233A37DD00159AE4 /* DateConversion.swift in Sources */,
|
||||||
B9E2A081233BA62100EAEB14 /* FeaturedStore.swift in Sources */,
|
|
||||||
B93D60CE22D88F5700DD390F /* AccessoryDetailView.swift in Sources */,
|
B93D60CE22D88F5700DD390F /* AccessoryDetailView.swift in Sources */,
|
||||||
B9EC09822383F94B004BC9AB /* LibraryExport.swift in Sources */,
|
B9EC09822383F94B004BC9AB /* LibraryExport.swift in Sources */,
|
||||||
B94CB50022D1352F0029BFAD /* Accessory+CoreDataProperties.swift in Sources */,
|
B94CB50022D1352F0029BFAD /* Accessory+CoreDataProperties.swift in Sources */,
|
||||||
@@ -458,14 +413,11 @@
|
|||||||
B926F14721502D53004D36B7 /* CodableExtensionAny.swift in Sources */,
|
B926F14721502D53004D36B7 /* CodableExtensionAny.swift in Sources */,
|
||||||
B94CB50422D1352F0029BFAD /* Game+CoreDataProperties.swift in Sources */,
|
B94CB50422D1352F0029BFAD /* Game+CoreDataProperties.swift in Sources */,
|
||||||
B9BCCEBB2653CA8E005F46D6 /* SwiftUIBindingExtension.swift in Sources */,
|
B9BCCEBB2653CA8E005F46D6 /* SwiftUIBindingExtension.swift in Sources */,
|
||||||
B9F44AE922F4655600FC6B29 /* AccessoryStore.swift in Sources */,
|
|
||||||
B98A736022C1738800FB3410 /* CDManager.swift in Sources */,
|
B98A736022C1738800FB3410 /* CDManager.swift in Sources */,
|
||||||
B94CB50222D1352F0029BFAD /* Cover+CoreDataProperties.swift in Sources */,
|
B94CB50222D1352F0029BFAD /* Cover+CoreDataProperties.swift in Sources */,
|
||||||
B9E2A07E233B6E4F00EAEB14 /* ConsoleAllView.swift in Sources */,
|
B9E2A07E233B6E4F00EAEB14 /* ConsoleAllView.swift in Sources */,
|
||||||
B9BCCEB92653BDEA005F46D6 /* ICloudManager.swift in Sources */,
|
B9BCCEB92653BDEA005F46D6 /* ICloudManager.swift in Sources */,
|
||||||
B9EC0987238555BF004BC9AB /* SettingsView.swift in Sources */,
|
B9EC0987238555BF004BC9AB /* SettingsView.swift in Sources */,
|
||||||
B9F44AE522F418F600FC6B29 /* ConsoleStore.swift in Sources */,
|
|
||||||
B9E2A079233B69D400EAEB14 /* GameSeriesViewModel.swift in Sources */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,33 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
print("disFinishLaunchung")
|
print("disFinishLaunchung")
|
||||||
/*let url = FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appendingPathComponent("Documents")//.appendingPathComponent("Zockerhoehle").appendingPathComponent("consoles")
|
|
||||||
|
|
||||||
if !FileManager.default.fileExists(atPath: url!.path, isDirectory: nil) {
|
|
||||||
do {
|
|
||||||
print("------------ \(url)")
|
|
||||||
try FileManager.default.createDirectory(at: url!, withIntermediateDirectories: true, attributes: nil)
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
print(error.localizedDescription)
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
let url2 = url?.appendingPathComponent("test23.txt")
|
|
||||||
FileManager.default.createFile(atPath: url2!.path, contents: nil, attributes: nil)
|
|
||||||
print("------------- \(url2)")
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
//FlockeWS.fetchEntries(for: GameCollection.consoleID)
|
|
||||||
|
|
||||||
//TODO Game Serien entfernen
|
|
||||||
/*let gameSeriesEntities = ["Assasins Creed", "Mario", "Zelda", "Pikmin", "Heroes of Might and Magic", "Gears of War"]
|
|
||||||
|
|
||||||
for series in gameSeriesEntities {
|
|
||||||
let cdSeries = GameSeries(context: CDManager.shared.viewContext)@
|
|
||||||
cdSeries.uuid = UUID()
|
|
||||||
cdSeries.name = series
|
|
||||||
}*/
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,23 +18,10 @@ public class GameSeries: NSManagedObject, Identifiable {
|
|||||||
return objectID.uriRepresentation().absoluteString
|
return objectID.uriRepresentation().absoluteString
|
||||||
}
|
}
|
||||||
|
|
||||||
var coverAsUIImage : UIImage? {
|
public override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?) {
|
||||||
get {
|
super.init(entity: entity, insertInto: context)
|
||||||
if let coverImage = self.cover?.image {
|
|
||||||
return coverImage
|
|
||||||
}
|
|
||||||
|
|
||||||
return .none
|
self.uuid = UUID()
|
||||||
}
|
|
||||||
|
|
||||||
set {
|
|
||||||
if let coverImage = newValue {
|
|
||||||
let newCover = GameSeriesCover(context: CDManager.shared.viewContext)
|
|
||||||
newCover.gameSeries = self
|
|
||||||
newCover.image = coverImage
|
|
||||||
self.cover = newCover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,12 +32,14 @@ extension GameSeries : Encodable {
|
|||||||
case name
|
case name
|
||||||
case games
|
case games
|
||||||
case cover
|
case cover
|
||||||
|
case cover_icloud_path
|
||||||
}
|
}
|
||||||
|
|
||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(uuid, forKey: .uuid)
|
try container.encode(uuid, forKey: .uuid)
|
||||||
try container.encode(name, forKey: .name)
|
try container.encode(name, forKey: .name)
|
||||||
|
try container.encode(cover_icloud_path, forKey: .cover_icloud_path)
|
||||||
|
|
||||||
var gamesList : [String] = []
|
var gamesList : [String] = []
|
||||||
for game in games {
|
for game in games {
|
||||||
@@ -60,7 +49,5 @@ extension GameSeries : Encodable {
|
|||||||
}
|
}
|
||||||
try container.encode(gamesList, forKey: .games)
|
try container.encode(gamesList, forKey: .games)
|
||||||
|
|
||||||
let coverBase64 = cover?.image?.pngData()?.base64EncodedString() ?? ""
|
|
||||||
try container.encode(coverBase64, forKey: .cover)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ extension GameSeries {
|
|||||||
return NSFetchRequest<GameSeries>(entityName: "GameSeries")
|
return NSFetchRequest<GameSeries>(entityName: "GameSeries")
|
||||||
}
|
}
|
||||||
|
|
||||||
@NSManaged public var name: String
|
@NSManaged public var name: String?
|
||||||
@NSManaged public var uuid : UUID
|
@NSManaged public var uuid : UUID
|
||||||
@NSManaged public var games: NSSet
|
@NSManaged public var games: NSSet
|
||||||
@NSManaged public var cover: GameSeriesCover?
|
@NSManaged public var cover_icloud_path : String?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
//
|
|
||||||
// GameSeriesCover+CoreDataClass.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 24.09.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
|
||||||
|
|
||||||
@objc(GameSeriesCover)
|
|
||||||
public class GameSeriesCover: NSManagedObject {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
//
|
|
||||||
// GameSeriesCover+CoreDataProperties.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 24.09.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import CoreData
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
extension GameSeriesCover {
|
|
||||||
|
|
||||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<GameSeriesCover> {
|
|
||||||
return NSFetchRequest<GameSeriesCover>(entityName: "GameSeriesCover")
|
|
||||||
}
|
|
||||||
|
|
||||||
@NSManaged public var image: UIImage?
|
|
||||||
@NSManaged public var gameSeries: GameSeries?
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -13,9 +13,6 @@ import SwiftUI
|
|||||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate, UIApplicationDelegate {
|
class SceneDelegate: UIResponder, UIWindowSceneDelegate, UIApplicationDelegate {
|
||||||
var window: UIWindow?
|
var window: UIWindow?
|
||||||
|
|
||||||
let consolesStore = ConsoleStore()
|
|
||||||
let gameSeriesStore = GameSeriesStore()
|
|
||||||
|
|
||||||
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
|
||||||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
|
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
|
||||||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
|
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
|
||||||
@@ -26,8 +23,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, UIApplicationDelegate {
|
|||||||
let window = UIWindow(windowScene: windowScene)
|
let window = UIWindow(windowScene: windowScene)
|
||||||
|
|
||||||
let contentView = MainView()
|
let contentView = MainView()
|
||||||
.environmentObject(self.gameSeriesStore)
|
|
||||||
.environmentObject(self.consolesStore)
|
|
||||||
.environment(\.managedObjectContext, CDManager.shared.viewContext)
|
.environment(\.managedObjectContext, CDManager.shared.viewContext)
|
||||||
|
|
||||||
window.rootViewController = UIHostingController(rootView: contentView)
|
window.rootViewController = UIHostingController(rootView: contentView)
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
final class ImagePicker : ObservableObject {
|
|
||||||
|
|
||||||
static let shared : ImagePicker = ImagePicker()
|
|
||||||
|
|
||||||
private init() {} //force using the singleton: ImagePicker.shared
|
|
||||||
let view = ImagePicker.View()
|
|
||||||
let coordinator = ImagePicker.Coordinator()
|
|
||||||
|
|
||||||
// Bindable Object part
|
|
||||||
let objectWillChange = PassthroughSubject<UIImage?, Never>()
|
|
||||||
|
|
||||||
var image: UIImage? = .none {
|
|
||||||
didSet {
|
|
||||||
objectWillChange.send(image)
|
|
||||||
print("ImagePicker::image Image Changed")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extension ImagePicker {
|
|
||||||
|
|
||||||
class Coordinator: NSObject, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
|
|
||||||
|
|
||||||
// UIImagePickerControllerDelegate
|
|
||||||
func imagePickerController(_ picker: UIImagePickerController,
|
|
||||||
didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
|
|
||||||
let uiImage = info[UIImagePickerController.InfoKey.originalImage] as! UIImage
|
|
||||||
ImagePicker.shared.image = uiImage
|
|
||||||
picker.dismiss(animated:true)
|
|
||||||
}
|
|
||||||
|
|
||||||
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
|
|
||||||
picker.dismiss(animated:true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct View: UIViewControllerRepresentable {
|
|
||||||
|
|
||||||
func makeCoordinator() -> Coordinator {
|
|
||||||
ImagePicker.shared.coordinator
|
|
||||||
}
|
|
||||||
|
|
||||||
func makeUIViewController(context: UIViewControllerRepresentableContext<ImagePicker.View>) -> UIImagePickerController {
|
|
||||||
let picker = UIImagePickerController()
|
|
||||||
picker.delegate = context.coordinator
|
|
||||||
|
|
||||||
return picker
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateUIViewController(_ uiViewController: UIImagePickerController,
|
|
||||||
context: UIViewControllerRepresentableContext<ImagePicker.View>) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -48,7 +48,6 @@ class LibraryImport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func resetDatabase() {
|
private func resetDatabase() {
|
||||||
print(GameSeriesStore().gameSeries)
|
|
||||||
CDManager.shared.viewContext.reset()
|
CDManager.shared.viewContext.reset()
|
||||||
CDManager.shared.viewContext.performAndWait {
|
CDManager.shared.viewContext.performAndWait {
|
||||||
let deleteRequests =
|
let deleteRequests =
|
||||||
@@ -69,7 +68,6 @@ class LibraryImport {
|
|||||||
print("LibraryImport::resetDatabase - Reset of Database failes!")
|
print("LibraryImport::resetDatabase - Reset of Database failes!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print(GameSeriesStore().gameSeries)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func makeCDGame(from game: BHLGame, _ gameDict: inout [UUID : Game], _ cdConsole: Console) {
|
private func makeCDGame(from game: BHLGame, _ gameDict: inout [UUID : Game], _ cdConsole: Console) {
|
||||||
@@ -117,11 +115,7 @@ class LibraryImport {
|
|||||||
private func makeCDGameSeries(from gameSeries: BHLGameSeries, _ gameDict: inout [UUID : Game]) {
|
private func makeCDGameSeries(from gameSeries: BHLGameSeries, _ gameDict: inout [UUID : Game]) {
|
||||||
let cdGameSeries = GameSeries(context: CDManager.shared.viewContext)
|
let cdGameSeries = GameSeries(context: CDManager.shared.viewContext)
|
||||||
cdGameSeries.name = gameSeries.name
|
cdGameSeries.name = gameSeries.name
|
||||||
|
cdGameSeries.cover_icloud_path = gameSeries.cover_icloud_path
|
||||||
let cdCover = GameSeriesCover(context: CDManager.shared.viewContext)
|
|
||||||
cdCover.image = gameSeries.cover
|
|
||||||
cdCover.gameSeries = cdGameSeries
|
|
||||||
cdGameSeries.cover = cdCover
|
|
||||||
|
|
||||||
for uuid in gameSeries.games {
|
for uuid in gameSeries.games {
|
||||||
if let game = gameDict[uuid] {
|
if let game = gameDict[uuid] {
|
||||||
@@ -248,28 +242,23 @@ struct BHLAccessory : Decodable {
|
|||||||
struct BHLGameSeries : Decodable {
|
struct BHLGameSeries : Decodable {
|
||||||
let uuid : UUID
|
let uuid : UUID
|
||||||
let name : String
|
let name : String
|
||||||
let cover : UIImage?
|
|
||||||
let games : [UUID]
|
let games : [UUID]
|
||||||
|
let cover_icloud_path : String?
|
||||||
|
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
case uuid
|
case uuid
|
||||||
case name
|
case name
|
||||||
case cover
|
case cover
|
||||||
case games
|
case games
|
||||||
|
case cover_icloud_path
|
||||||
}
|
}
|
||||||
|
|
||||||
init(from decoder: Decoder) throws {
|
init(from decoder: Decoder) throws {
|
||||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
uuid = try container.decode(UUID.self, forKey: .uuid)
|
uuid = try container.decode(UUID.self, forKey: .uuid)
|
||||||
name = try container.decode(String.self, forKey: .name)
|
name = try container.decode(String.self, forKey: .name)
|
||||||
|
cover_icloud_path = try container.decode(String.self, forKey: .cover_icloud_path)
|
||||||
games = try container.decode([UUID].self, forKey: .games)
|
games = try container.decode([UUID].self, forKey: .games)
|
||||||
|
|
||||||
if let coverBase64 = try container.decode(String?.self, forKey: .cover),
|
|
||||||
let coverData = Data(base64Encoded: coverBase64) {
|
|
||||||
cover = UIImage(data: coverData)
|
|
||||||
}else {
|
|
||||||
cover = .none
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
//
|
|
||||||
// AccessoryStore.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 02.08.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import SwiftUI
|
|
||||||
import CoreData
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
class AccessoryStore : NSObject, ObservableObject, NSFetchedResultsControllerDelegate {
|
|
||||||
var objectWillChange = ObservableObjectPublisher()
|
|
||||||
var consoleFilter : Console?
|
|
||||||
|
|
||||||
var accessories : [Accessory] {
|
|
||||||
get {
|
|
||||||
if self.fetchResultsController.fetchedObjects == nil {
|
|
||||||
do {
|
|
||||||
try fetchResultsController.performFetch()
|
|
||||||
}catch {
|
|
||||||
print("AccessoryStore::accessories Perform Fetch not possible '\(error)'")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return self.fetchResultsController.fetchedObjects ?? []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var fetchResultsController : NSFetchedResultsController<Accessory> = {
|
|
||||||
var accessoriesFetch : NSFetchRequest<Accessory> = Accessory.fetchRequest()
|
|
||||||
if let console = consoleFilter {
|
|
||||||
accessoriesFetch = Accessory.fetchRequest(console: console)
|
|
||||||
}
|
|
||||||
|
|
||||||
accessoriesFetch.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
|
||||||
|
|
||||||
let accessoriesFetchRC = NSFetchedResultsController(fetchRequest: accessoriesFetch, managedObjectContext: CDManager.shared.viewContext, sectionNameKeyPath: nil, cacheName: nil)
|
|
||||||
|
|
||||||
accessoriesFetchRC.delegate = self
|
|
||||||
|
|
||||||
return accessoriesFetchRC
|
|
||||||
}()
|
|
||||||
|
|
||||||
init(console : Console?) {
|
|
||||||
super.init()
|
|
||||||
self.consoleFilter = console
|
|
||||||
}
|
|
||||||
|
|
||||||
override init() {
|
|
||||||
super.init()
|
|
||||||
}
|
|
||||||
|
|
||||||
func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
|
|
||||||
print("GameStore::controllerDidChangeContent")
|
|
||||||
self.objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
//
|
|
||||||
// AccessoryViewModel.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 25.07.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
import Combine
|
|
||||||
import SwiftUI
|
|
||||||
import CoreData
|
|
||||||
|
|
||||||
class AccessoryViewModel : ObservableObject {
|
|
||||||
var objectWillChange = ObservableObjectPublisher()
|
|
||||||
|
|
||||||
var inWishlist : Bool {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
|
|
||||||
accessory.inWishlist = inWishlist
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var manufacturer : String? {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
|
|
||||||
accessory.manufacturer = manufacturer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var color : String? {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
|
|
||||||
accessory.color = color
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var name : String {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
|
|
||||||
accessory.name = name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var lentTo : String? {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
|
|
||||||
accessory.lentTo = lentTo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private var accessory : Accessory? {
|
|
||||||
didSet {
|
|
||||||
guard let accessory = accessory else { return }
|
|
||||||
|
|
||||||
self.name = accessory.name
|
|
||||||
self.inWishlist = accessory.inWishlist
|
|
||||||
self.color = accessory.color
|
|
||||||
self.manufacturer = accessory.manufacturer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var NSManagedObjectChangedObserver : AnyCancellable? = .none
|
|
||||||
|
|
||||||
init(accessory : Accessory) {
|
|
||||||
self.accessory = accessory
|
|
||||||
|
|
||||||
self.name = accessory.name
|
|
||||||
self.inWishlist = accessory.inWishlist
|
|
||||||
self.color = accessory.color
|
|
||||||
self.manufacturer = accessory.manufacturer
|
|
||||||
|
|
||||||
self.NSManagedObjectChangedObserver = NotificationCenter.default.publisher(for: .NSManagedObjectContextObjectsDidChange, object: CDManager.shared.viewContext).first().sink { notification in
|
|
||||||
guard let accessory = self.accessory else { return }
|
|
||||||
guard let userInfo = notification.userInfo else { return }
|
|
||||||
|
|
||||||
var managedObjectIsMatching = false
|
|
||||||
if let inserts = userInfo[NSInsertedObjectsKey] as? Set<NSManagedObject> {
|
|
||||||
if inserts.contains(accessory) { managedObjectIsMatching = true }
|
|
||||||
}
|
|
||||||
if let updates = userInfo[NSUpdatedObjectsKey] as? Set<NSManagedObject> {
|
|
||||||
if updates.contains(accessory) { managedObjectIsMatching = true }
|
|
||||||
}
|
|
||||||
if let deletes = userInfo[NSDeletedObjectsKey] as? Set<NSManagedObject> {
|
|
||||||
if deletes.contains(accessory) { managedObjectIsMatching = true }
|
|
||||||
}
|
|
||||||
|
|
||||||
if managedObjectIsMatching {
|
|
||||||
self.objectWillChange.send()
|
|
||||||
print("AccessoryViewModel::NSMangedObjectChanged MY Accessory")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
//
|
|
||||||
// ConsoleStore.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 02.08.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
|
||||||
import SwiftUI
|
|
||||||
import CoreData
|
|
||||||
|
|
||||||
class ConsoleStore : NSObject, ObservableObject, NSFetchedResultsControllerDelegate {
|
|
||||||
var objectWillChange = ObservableObjectPublisher()
|
|
||||||
|
|
||||||
var consoles : [Console] {
|
|
||||||
get {
|
|
||||||
if self.fetchResultsController.fetchedObjects == nil {
|
|
||||||
do {
|
|
||||||
try fetchResultsController.performFetch()
|
|
||||||
}catch {
|
|
||||||
print("ConsoleStore::consoles Perform Fetch not possible '\(error)'")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return self.fetchResultsController.fetchedObjects ?? []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var fetchResultsController : NSFetchedResultsController<Console> = {
|
|
||||||
let consolesFetch : NSFetchRequest<Console> = Console.fetchRequest()
|
|
||||||
|
|
||||||
consolesFetch.sortDescriptors = [NSSortDescriptor(key: "manufacturer", ascending: true), NSSortDescriptor(key: "generation", ascending: true), NSSortDescriptor(key: "name", ascending: true)]
|
|
||||||
|
|
||||||
var consolesfetchRC = NSFetchedResultsController(fetchRequest: consolesFetch, managedObjectContext: CDManager.shared.viewContext, sectionNameKeyPath: nil, cacheName: nil)
|
|
||||||
|
|
||||||
consolesfetchRC.delegate = self
|
|
||||||
|
|
||||||
return consolesfetchRC
|
|
||||||
|
|
||||||
}()
|
|
||||||
|
|
||||||
func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
|
|
||||||
print("AllConsolesViewController::controllerDidChangeContent")
|
|
||||||
self.objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
//
|
|
||||||
// FeaturedStore.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 25.09.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
class FeaturedStore : ObservableObject {
|
|
||||||
var objectWillChange = PassthroughSubject<Void, Never>()
|
|
||||||
|
|
||||||
var gameStore = GameStore(sortDescriptors: [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)], fetchLimit: 1)
|
|
||||||
|
|
||||||
|
|
||||||
var consoleStore = ConsoleStore()
|
|
||||||
|
|
||||||
var consoleStoreSubscriber : AnyCancellable?
|
|
||||||
var gameStoreSubscriber : AnyCancellable?
|
|
||||||
|
|
||||||
init() {
|
|
||||||
_ = self.consoleStore.consoles
|
|
||||||
if (self.gameStore.games.count > 0) {
|
|
||||||
self.featuredGame = self.gameStore.games.first
|
|
||||||
}
|
|
||||||
|
|
||||||
self.featuredConsole = self.featuredGame?.console
|
|
||||||
|
|
||||||
gameStoreSubscriber = self.gameStore.objectWillChange.sink { _ in
|
|
||||||
self.featuredGame = self.gameStore.games.first
|
|
||||||
self.featuredConsole = self.featuredGame?.console
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var featuredGame : Game? {
|
|
||||||
willSet {
|
|
||||||
objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var featuredAccessory : Accessory? {
|
|
||||||
willSet {
|
|
||||||
objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var featuredConsole : Console? {
|
|
||||||
willSet {
|
|
||||||
objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
//
|
|
||||||
// ConsoleStore.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 02.08.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import Combine
|
|
||||||
import SwiftUI
|
|
||||||
import CoreData
|
|
||||||
|
|
||||||
class GameSeriesStore : NSObject, ObservableObject, NSFetchedResultsControllerDelegate {
|
|
||||||
var objectWillChange = ObservableObjectPublisher()
|
|
||||||
|
|
||||||
var gameSeries : [GameSeries] {
|
|
||||||
get {
|
|
||||||
if self.fetchResultsController.fetchedObjects == nil {
|
|
||||||
do {
|
|
||||||
try fetchResultsController.performFetch()
|
|
||||||
}catch {
|
|
||||||
print("ConsoleStore::consoles Perform Fetch not possible '\(error)'")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return self.fetchResultsController.fetchedObjects ?? []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var fetchResultsController : NSFetchedResultsController<GameSeries> = {
|
|
||||||
let fetch : NSFetchRequest<GameSeries> = GameSeries.fetchRequest()
|
|
||||||
|
|
||||||
fetch.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
|
||||||
|
|
||||||
var fetchRC = NSFetchedResultsController(fetchRequest: fetch, managedObjectContext: CDManager.shared.viewContext, sectionNameKeyPath: nil, cacheName: nil)
|
|
||||||
|
|
||||||
fetchRC.delegate = self
|
|
||||||
|
|
||||||
return fetchRC
|
|
||||||
|
|
||||||
}()
|
|
||||||
|
|
||||||
func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
|
|
||||||
print("AllConsolesViewController::controllerDidChangeContent")
|
|
||||||
self.objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
//
|
|
||||||
// ConsoleViewModel.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 25.09.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
class GameSeriesViewModel : ObservableObject {
|
|
||||||
var objectWillChange = ObservableObjectPublisher()
|
|
||||||
|
|
||||||
init(_ gameSeries: GameSeries) {
|
|
||||||
self.gameSeries = gameSeries
|
|
||||||
self.name = gameSeries.name
|
|
||||||
}
|
|
||||||
|
|
||||||
private var gameSeries : GameSeries? {
|
|
||||||
didSet {
|
|
||||||
guard let gameSeries = gameSeries else { return }
|
|
||||||
|
|
||||||
self.name = gameSeries.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var name : String {
|
|
||||||
didSet {
|
|
||||||
guard let gameSeries = gameSeries else { return }
|
|
||||||
gameSeries.name = name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var cover : UIImage? {
|
|
||||||
get {
|
|
||||||
if let logoImage = self.gameSeries?.cover?.image {
|
|
||||||
return logoImage
|
|
||||||
}
|
|
||||||
|
|
||||||
return .none
|
|
||||||
}
|
|
||||||
|
|
||||||
set {
|
|
||||||
if let gameSeries = self.gameSeries {
|
|
||||||
if let image = newValue {
|
|
||||||
let newCover = GameSeriesCover(context: CDManager.shared.viewContext)
|
|
||||||
newCover.gameSeries = gameSeries
|
|
||||||
newCover.image = image
|
|
||||||
gameSeries.cover = newCover
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
//
|
|
||||||
// GameStore.swift
|
|
||||||
// Zockerhoehle
|
|
||||||
//
|
|
||||||
// Created by Julian-Steffen Müller on 02.08.19.
|
|
||||||
// Copyright © 2019 Julian-Steffen Müller. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import SwiftUI
|
|
||||||
import CoreData
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
class GameStore : NSObject, ObservableObject, NSFetchedResultsControllerDelegate {
|
|
||||||
var objectWillChange = PassthroughSubject<Void , Never>()
|
|
||||||
var consoleFilter : Console?
|
|
||||||
var gameSeriesFilter : GameSeries?
|
|
||||||
var sortDescriptors : [NSSortDescriptor] = [NSSortDescriptor(key: "name", ascending: true)]
|
|
||||||
var fetchLimit : Int = 0
|
|
||||||
|
|
||||||
var games : [Game] {
|
|
||||||
get {
|
|
||||||
if self.fetchResultsController.fetchedObjects == nil {
|
|
||||||
|
|
||||||
do {
|
|
||||||
try fetchResultsController.performFetch()
|
|
||||||
}catch {
|
|
||||||
print("GameStore::games Perform Fetch not possible '\(error)'")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let result = self.fetchResultsController.fetchedObjects ?? []
|
|
||||||
|
|
||||||
//Anscheinend ein Bug im FetchResultController das er das fetchLimit manchmal ignoriert
|
|
||||||
if self.fetchLimit > 0 && result.count > self.fetchLimit {
|
|
||||||
print("GameStore::games Fetch limit of ignored. Expected: \(self.fetchLimit) Delivered: \(result.count)")
|
|
||||||
|
|
||||||
var clampedResult : [Game] = []
|
|
||||||
for index in 0..<self.fetchLimit {
|
|
||||||
clampedResult.append(result[index])
|
|
||||||
}
|
|
||||||
|
|
||||||
return clampedResult
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var fetchResultsController : NSFetchedResultsController<Game> = {
|
|
||||||
var gamesFetch : NSFetchRequest<Game> = Game.fetchRequest()
|
|
||||||
|
|
||||||
/*if let console = consoleFilter {
|
|
||||||
gamesFetch = Game.fetchRequest(console: console)
|
|
||||||
}else if let gameSeries = gameSeriesFilter {
|
|
||||||
gamesFetch = Game.fetchRequest(gameSeries: gameSeries)
|
|
||||||
}else {
|
|
||||||
print("No filter: fetch Limit: \(self.fetchLimit)")
|
|
||||||
}*/
|
|
||||||
|
|
||||||
gamesFetch.fetchLimit = self.fetchLimit
|
|
||||||
gamesFetch.sortDescriptors = self.sortDescriptors
|
|
||||||
|
|
||||||
let gamesFetchRC = NSFetchedResultsController(fetchRequest: gamesFetch, managedObjectContext: CDManager.shared.viewContext, sectionNameKeyPath: nil, cacheName: nil)
|
|
||||||
|
|
||||||
gamesFetchRC.delegate = self
|
|
||||||
|
|
||||||
return gamesFetchRC
|
|
||||||
}()
|
|
||||||
|
|
||||||
init(console : Console?, fetchLimit : Int = 0) {
|
|
||||||
super.init()
|
|
||||||
self.consoleFilter = console
|
|
||||||
self.fetchLimit = fetchLimit
|
|
||||||
}
|
|
||||||
|
|
||||||
init(gameSeries: GameSeries?, fetchLimit : Int = 0) {
|
|
||||||
super.init()
|
|
||||||
self.gameSeriesFilter = gameSeries
|
|
||||||
self.fetchLimit = fetchLimit
|
|
||||||
}
|
|
||||||
|
|
||||||
init(sortDescriptors : [NSSortDescriptor], fetchLimit : Int = 0) {
|
|
||||||
super.init()
|
|
||||||
self.sortDescriptors = sortDescriptors
|
|
||||||
self.fetchLimit = fetchLimit
|
|
||||||
}
|
|
||||||
|
|
||||||
init(fetchLimit : Int = 0) {
|
|
||||||
super.init()
|
|
||||||
self.fetchLimit = fetchLimit
|
|
||||||
}
|
|
||||||
|
|
||||||
func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
|
|
||||||
self.objectWillChange.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,22 +9,16 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct AccessoryDetailView : View {
|
struct AccessoryDetailView : View {
|
||||||
var accessory : Accessory?
|
@ObservedObject var accessory : Accessory
|
||||||
|
|
||||||
@ObservedObject var accessoryVM : AccessoryViewModel
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
TextField("Accessory name", text: $accessoryVM.name)
|
TextField("Accessory name", text: $accessory.name)
|
||||||
|
|
||||||
|
|
||||||
Toggle(isOn: $accessoryVM.inWishlist, label: {
|
Toggle(isOn: $accessory.inWishlist, label: {
|
||||||
Text("In Wunschliste")
|
Text("In Wunschliste")
|
||||||
})
|
})
|
||||||
}.navigationBarTitle(Text("\(accessoryVM.name)"), displayMode: .automatic)
|
}.navigationBarTitle(Text("\(accessory.name ?? "n/a")"), displayMode: .automatic)
|
||||||
}
|
|
||||||
|
|
||||||
init(accessoryVM : AccessoryViewModel?) {
|
|
||||||
self.accessoryVM = accessoryVM!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ struct ConsoleLibraryView : View {
|
|||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
List(accessories.filter({$0.inWishlist == self.showWishlist})) {accessory in
|
List(accessories.filter({$0.inWishlist == self.showWishlist})) {accessory in
|
||||||
NavigationLink(destination: AccessoryDetailView(accessoryVM: AccessoryViewModel(accessory: accessory))) {
|
NavigationLink(destination: AccessoryDetailView(accessory: accessory)) {
|
||||||
Text("\(accessory.name)")
|
Text("\(accessory.name)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ struct GameDetailView : View {
|
|||||||
@State var hasFinishedDate : Bool = false
|
@State var hasFinishedDate : Bool = false
|
||||||
@State var playthroughDate : Date = Date()
|
@State var playthroughDate : Date = Date()
|
||||||
|
|
||||||
@EnvironmentObject var gameSeriesStore : GameSeriesStore
|
|
||||||
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
|
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
|
||||||
|
|
||||||
@State var isImportingCover : Bool = false
|
@State var isImportingCover : Bool = false
|
||||||
|
|||||||
@@ -7,12 +7,22 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import CoreData
|
||||||
|
|
||||||
struct GamePickupsView: View {
|
struct GamePickupsView: View {
|
||||||
@ObservedObject var gameStore = GameStore(sortDescriptors: [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)], fetchLimit: 50)
|
@Environment(\.managedObjectContext) private var viewContext
|
||||||
|
@FetchRequest var games: FetchedResults<Game>
|
||||||
|
//@ObservedObject var gameStore = GameStore(sortDescriptors: [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)], fetchLimit: 50)
|
||||||
|
|
||||||
|
init() {
|
||||||
|
let gamesFR = NSFetchRequest<Game>(entityName: "Game")
|
||||||
|
gamesFR.sortDescriptors = [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)]
|
||||||
|
gamesFR.fetchLimit = 50;
|
||||||
|
_games = FetchRequest(fetchRequest: gamesFR)
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List(gameStore.games) { game in
|
List(games) { game in
|
||||||
NavigationLink(destination: GameDetailView(game: game)) {
|
NavigationLink(destination: GameDetailView(game: game)) {
|
||||||
Text("\(game.name!)")
|
Text("\(game.name!)")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,67 +8,84 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct GameSeriesAllView: View {
|
struct ModalAddGameSeries : View {
|
||||||
@EnvironmentObject var gameSeriesStore : GameSeriesStore
|
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
|
||||||
|
|
||||||
@State var modalVisible : Bool = false
|
|
||||||
@State var modalAddName : String = ""
|
@State var modalAddName : String = ""
|
||||||
|
@State var modalGameSeriesCover : String?
|
||||||
|
|
||||||
@State var showingPicker : Bool = false
|
let defaultImage = UIImage()
|
||||||
|
|
||||||
@State var image : UIImage?
|
@State var isImportingCover = false
|
||||||
|
|
||||||
var modalAddGameSeries: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
Form {
|
Form {
|
||||||
TextField("Name", text: $modalAddName)
|
TextField("Name", text: $modalAddName)
|
||||||
self.image.map { Image(uiImage: $0).resizable().frame(width: 100, height: 100)}
|
Image(uiImage: ICloudManager.imageFrom(path: self.modalGameSeriesCover) ?? defaultImage)
|
||||||
|
.resizable()
|
||||||
|
.frame(width:100, height: 100)
|
||||||
|
|
||||||
Button(action: { self.showingPicker = true}, label: { Text("Wähle Bild") })
|
Button(action: { self.isImportingCover = true}, label: { Text("Wähle Bild") })
|
||||||
}
|
}
|
||||||
.navigationBarTitle(Text("New Game Series"))
|
.navigationBarTitle(Text("New Game Series"))
|
||||||
.navigationBarItems(leading: Button(action: {self.modalVisible = false }, label: {Text("Cancel")})
|
.navigationBarItems(leading: Button(action: { self.presentationMode.wrappedValue.dismiss() }, label: {Text("Abbrechen")})
|
||||||
//Add Button is disabled if no name is entered
|
//Add Button is disabled if no name is entered
|
||||||
, trailing: Button(action: {
|
, trailing: Button(action: {
|
||||||
let gameSeries = GameSeries(context: CDManager.shared.viewContext)
|
let gameSeries = GameSeries(context: CDManager.shared.viewContext)
|
||||||
gameSeries.name = self.modalAddName
|
gameSeries.name = self.modalAddName
|
||||||
if let image = self.image {
|
gameSeries.cover_icloud_path = self.modalGameSeriesCover
|
||||||
let cover = GameSeriesCover(context: CDManager.shared.viewContext)
|
|
||||||
cover.image = image
|
|
||||||
cover.gameSeries = gameSeries
|
|
||||||
gameSeries.cover = cover
|
|
||||||
}
|
|
||||||
self.modalVisible = false
|
|
||||||
}) { Text("Add") }.disabled(self.modalAddName.trimmingCharacters(in: .whitespacesAndNewlines) == "" ))
|
|
||||||
.sheet(isPresented: $showingPicker,
|
|
||||||
onDismiss: {
|
|
||||||
|
|
||||||
}, content: {
|
self.presentationMode.wrappedValue.dismiss()
|
||||||
ImagePicker.shared.view
|
}) { Text("Fertig") }.disabled(self.modalAddName.trimmingCharacters(in: .whitespacesAndNewlines) == "" ))
|
||||||
})
|
.fileImporter(
|
||||||
|
isPresented: $isImportingCover,
|
||||||
|
allowedContentTypes: [.jpeg, .png],
|
||||||
|
allowsMultipleSelection: false
|
||||||
|
) { result in
|
||||||
|
do {
|
||||||
|
let selectedFile : URL = try result.get().first!
|
||||||
|
|
||||||
|
//It seems that isUbiquitousItem checks if the file is contained in the Apps iCloud folder
|
||||||
|
if (FileManager.default.isUbiquitousItem(at: selectedFile)) {
|
||||||
|
self.modalGameSeriesCover = ICloudManager.relativePathFrom(url: selectedFile)
|
||||||
|
|
||||||
|
print("Selected Image in iCloud Path \(self.modalGameSeriesCover ?? "n/a")")
|
||||||
|
}else{
|
||||||
|
Alert(title: Text("Falscher Ordner"))
|
||||||
|
print("Außerhalb \(selectedFile.relativeString)")
|
||||||
|
}
|
||||||
|
}catch{
|
||||||
|
print("GameSeriesEditView::body Error getting result '\(result)'")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func resetModalVariables() {
|
|
||||||
self.modalAddName = ""
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct GameSeriesAllView: View {
|
||||||
|
@FetchRequest(entity: GameSeries.entity(), sortDescriptors: [NSSortDescriptor(key: "name", ascending: true)])
|
||||||
|
var gameSeries: FetchedResults<GameSeries>
|
||||||
|
|
||||||
|
@State var showAddGameSeriesModal : Bool = false
|
||||||
|
|
||||||
|
let defaultImage = UIImage()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List(gameSeriesStore.gameSeries) { gameSeries in
|
List(gameSeries) { game_series in
|
||||||
NavigationLink(destination: GameSeriesLibraryView(gameSeries: gameSeries)) {
|
NavigationLink(destination: GameSeriesLibraryView(gameSeries: game_series)) {
|
||||||
HStack {
|
HStack {
|
||||||
gameSeries.cover?.image.map {
|
Image(uiImage: ICloudManager.imageFrom(path: game_series.cover_icloud_path) ?? defaultImage)
|
||||||
Image(uiImage: $0)
|
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.frame(width:100, height: 75)
|
||||||
.frame(height: 50)
|
|
||||||
}
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(gameSeries.name)
|
Text(game_series.name ?? "n/a")
|
||||||
//Sonst wird der TExt kurioser Weise abgeschnitten wenn ein Bild davor ist. Hier nochmal später rein
|
//Sonst wird der TExt kurioser Weise abgeschnitten wenn ein Bild davor ist. Hier nochmal später rein
|
||||||
//schauen
|
//schauen
|
||||||
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .leading)
|
.frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity, alignment: .leading)
|
||||||
Text("Spiele: \(gameSeries.games.filter({!($0 as! Game).inWishlist}).count ?? 0)/\(gameSeries.games.count ?? 0)").font(.caption)
|
Text("Spiele: \(game_series.games.filter({!($0 as! Game).inWishlist}).count ?? 0)/\(game_series.games.count ?? 0)").font(.caption)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -78,12 +95,12 @@ struct GameSeriesAllView: View {
|
|||||||
.navigationBarTitle(Text("Videospielserien"))
|
.navigationBarTitle(Text("Videospielserien"))
|
||||||
.navigationBarItems(trailing:
|
.navigationBarItems(trailing:
|
||||||
Button(action: {
|
Button(action: {
|
||||||
self.modalVisible = true
|
self.showAddGameSeriesModal = true
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
})
|
})
|
||||||
.sheet(isPresented: $modalVisible, onDismiss: {}, content: {
|
.sheet(isPresented: $showAddGameSeriesModal) {
|
||||||
self.modalAddGameSeries
|
ModalAddGameSeries()
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,34 +9,44 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct GameSeriesEditView: View {
|
struct GameSeriesEditView: View {
|
||||||
@ObservedObject var gameSeriesViewModel : GameSeriesViewModel
|
@ObservedObject var gameSeries : GameSeries
|
||||||
|
|
||||||
@State var showCoverImagePicker = false
|
@State var isImportingLogo : Bool = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
TextField("Name der Konsole", text: $gameSeriesViewModel.name)
|
TextField("Name der Konsole", text: $gameSeries.name ?? "")
|
||||||
|
|
||||||
gameSeriesViewModel.cover.map {
|
//TODO Image
|
||||||
|
/*gameSeriesViewModel.cover.map {
|
||||||
Image (uiImage: $0)
|
Image (uiImage: $0)
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width:100, height: 100)
|
.frame(width:100, height: 100)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Button(action: { self.showCoverImagePicker = true }, label: { Text("Pick Image") })
|
Button(action: { self.isImportingLogo = true }, label: { Text("Pick Image") })
|
||||||
}
|
}
|
||||||
.navigationBarTitle("Editiere Spieleserie")
|
.navigationBarTitle("Editiere Spieleserie")
|
||||||
.sheet(isPresented: $showCoverImagePicker) {
|
.fileImporter(
|
||||||
ImagePicker.shared.view
|
isPresented: $isImportingLogo,
|
||||||
}
|
allowedContentTypes: [.jpeg, .png],
|
||||||
.onReceive(ImagePicker.shared.objectWillChange, perform: { image in
|
allowsMultipleSelection: false
|
||||||
if let image = image {
|
) { result in
|
||||||
self.gameSeriesViewModel.cover = image
|
do {
|
||||||
}
|
let selectedFile : URL = try result.get().first!
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
init(_ gameSeries : GameSeries) {
|
//It seems that isUbiquitousItem checks if the file is contained in the Apps iCloud folder
|
||||||
self.gameSeriesViewModel = GameSeriesViewModel(gameSeries)
|
if (FileManager.default.isUbiquitousItem(at: selectedFile)) {
|
||||||
|
gameSeries.cover_icloud_path = ICloudManager.relativePathFrom(url: selectedFile)
|
||||||
|
|
||||||
|
print("Selected Image in iCloud Path \(gameSeries.cover_icloud_path ?? "n/a")")
|
||||||
|
}else{
|
||||||
|
Alert(title: Text("Falscher Ordner"))
|
||||||
|
print("Außerhalb \(selectedFile.relativeString)")
|
||||||
|
}
|
||||||
|
}catch{
|
||||||
|
print("GameSeriesEditView::body Error getting result '\(result)'")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,28 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import CoreData
|
||||||
|
|
||||||
struct GameSeriesLibraryView: View {
|
struct GameSeriesLibraryView: View {
|
||||||
@ObservedObject var gameStore : GameStore
|
@Environment(\.managedObjectContext) private var viewContext
|
||||||
|
@FetchRequest var games: FetchedResults<Game>
|
||||||
|
|
||||||
|
@ObservedObject var gameSeries : GameSeries
|
||||||
|
|
||||||
@State var isDetailActivated : Bool = false
|
@State var isDetailActivated : Bool = false
|
||||||
|
|
||||||
var gameSeries : GameSeries?
|
init(gameSeries : GameSeries) {
|
||||||
|
self.gameSeries = gameSeries
|
||||||
|
|
||||||
|
let gamesFR = NSFetchRequest<Game>(entityName: "Game")
|
||||||
|
gamesFR.sortDescriptors = [NSSortDescriptor(key: "name", ascending: true)]
|
||||||
|
gamesFR.predicate = NSPredicate(format: "series == %@", gameSeries)
|
||||||
|
|
||||||
|
_games = FetchRequest(fetchRequest: gamesFR)
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List(gameStore.games) { game in
|
List(games) { game in
|
||||||
NavigationLink(destination: GameDetailView(game: game)) {
|
NavigationLink(destination: GameDetailView(game: game)) {
|
||||||
Text("\(game.name!)")
|
Text("\(game.name!)")
|
||||||
|
|
||||||
@@ -34,17 +47,12 @@ struct GameSeriesLibraryView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationBarTitle(Text(self.gameSeries?.name ?? "n/a"))
|
.navigationBarTitle(Text(self.gameSeries.name ?? "n/a"))
|
||||||
.navigationBarItems(trailing:
|
.navigationBarItems(trailing:
|
||||||
NavigationLink(destination: GameSeriesEditView(self.gameSeries!)) {
|
NavigationLink(destination: GameSeriesEditView(gameSeries: self.gameSeries)) {
|
||||||
Image(systemName: "pencil.and.ellipsis.rectangle")
|
Image(systemName: "pencil.and.ellipsis.rectangle")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
|
||||||
init(gameSeries: GameSeries?) {
|
|
||||||
self.gameSeries = gameSeries
|
|
||||||
gameStore = GameStore(gameSeries: gameSeries)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import CoreData
|
||||||
|
|
||||||
struct OverviewHeader<Destination : View> : View {
|
struct OverviewHeader<Destination : View> : View {
|
||||||
private var destination : Destination
|
private var destination : Destination
|
||||||
@@ -51,24 +52,32 @@ struct EmptyCategory : View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct Overview: View {
|
struct Overview: View {
|
||||||
@EnvironmentObject var consoleStore : ConsoleStore
|
@Environment(\.managedObjectContext) private var viewContext
|
||||||
@ObservedObject var gameStore : GameStore = GameStore(sortDescriptors: [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)], fetchLimit: 10)
|
|
||||||
@EnvironmentObject var gameSeriesStore : GameSeriesStore
|
|
||||||
@ObservedObject var featuredStore = FeaturedStore()
|
|
||||||
|
|
||||||
|
@FetchRequest(entity: Game.entity(), sortDescriptors: [NSSortDescriptor(key: "createdAt", ascending: false), NSSortDescriptor(key: "name", ascending: true)])
|
||||||
|
var games: FetchedResults<Game>
|
||||||
|
|
||||||
|
@FetchRequest(entity: Console.entity(), sortDescriptors: [NSSortDescriptor(key: "name", ascending: true)])
|
||||||
|
var consoles: FetchedResults<Console>
|
||||||
|
|
||||||
|
@FetchRequest(entity: GameSeries.entity(), sortDescriptors: [NSSortDescriptor(key: "name", ascending: true)])
|
||||||
|
var gameSeries: FetchedResults<GameSeries>
|
||||||
|
|
||||||
let defaultImage = UIImage()
|
let defaultImage = UIImage()
|
||||||
|
|
||||||
|
let active_console_limt = 10;
|
||||||
|
let last_picksups_limit = 10;
|
||||||
|
|
||||||
var ConsolesOverview : some View {
|
var ConsolesOverview : some View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
OverviewHeader(title: "Aktivste Konsolen", destination: ConsolesListView())
|
OverviewHeader(title: "Aktivste Konsolen", destination: ConsolesListView())
|
||||||
|
|
||||||
if consoleStore.consoles.count == 0 {
|
if consoles.count == 0 {
|
||||||
EmptyCategory("Keine Konsolen in der Zockerhöhle!")
|
EmptyCategory("Keine Konsolen in der Zockerhöhle!")
|
||||||
}else{
|
}else{
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(alignment: .top, spacing: 0) {
|
HStack(alignment: .top, spacing: 0) {
|
||||||
ForEach(consoleStore.consoles.sorted(by: { Console.compareConsolesByNewestGame(consoleA: $0, consoleB: $1)})) { console in
|
ForEach(consoles.sorted(by: { Console.compareConsolesByNewestGame(consoleA: $0, consoleB: $1)}).prefix(active_console_limt)) { console in
|
||||||
NavigationLink(destination: ConsoleLibraryView(console: console)) {
|
NavigationLink(destination: ConsoleLibraryView(console: console)) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Group {
|
Group {
|
||||||
@@ -99,12 +108,12 @@ struct Overview: View {
|
|||||||
//TODO
|
//TODO
|
||||||
OverviewHeader(title: "Zuletzt gehortete Spiele", destination: GamePickupsView())
|
OverviewHeader(title: "Zuletzt gehortete Spiele", destination: GamePickupsView())
|
||||||
|
|
||||||
if gameStore.games.count == 0 {
|
if games.count == 0 {
|
||||||
EmptyCategory("Keine Spiele in der Zockerhöhle")
|
EmptyCategory("Keine Spiele in der Zockerhöhle")
|
||||||
}else {
|
}else {
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(alignment: .top, spacing: 0) {
|
HStack(alignment: .top, spacing: 0) {
|
||||||
ForEach(gameStore.games) { game in
|
ForEach(games.prefix(last_picksups_limit)) { game in
|
||||||
NavigationLink(destination: GameDetailView(game: game)) {
|
NavigationLink(destination: GameDetailView(game: game)) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Group {
|
Group {
|
||||||
@@ -114,7 +123,7 @@ struct Overview: View {
|
|||||||
.padding(10)
|
.padding(10)
|
||||||
.cornerRadius(5)
|
.cornerRadius(5)
|
||||||
}*/
|
}*/
|
||||||
Text("\(self.gameStore.fetchLimit)")
|
Text("\("Fetch Limit")")
|
||||||
}
|
}
|
||||||
.frame(width: 100, height: 100)
|
.frame(width: 100, height: 100)
|
||||||
.background(Color(UIColor.lightGray))
|
.background(Color(UIColor.lightGray))
|
||||||
@@ -137,13 +146,13 @@ struct Overview: View {
|
|||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
OverviewHeader(title: "Spielserien", destination: GameSeriesAllView())
|
OverviewHeader(title: "Spielserien", destination: GameSeriesAllView())
|
||||||
|
|
||||||
if gameSeriesStore.gameSeries.count == 0 {
|
if gameSeries.count == 0 {
|
||||||
EmptyCategory("Keine Spieleserie angelegt!")
|
EmptyCategory("Keine Spieleserie angelegt!")
|
||||||
}else{
|
}else{
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(alignment: .top, spacing: 0) {
|
HStack(alignment: .top, spacing: 0) {
|
||||||
ForEach(gameSeriesStore.gameSeries) { gameSeries in
|
ForEach(gameSeries) { game_series in
|
||||||
NavigationLink(destination: GameSeriesLibraryView(gameSeries: gameSeries)) {
|
NavigationLink(destination: GameSeriesLibraryView(gameSeries: game_series)) {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Group {
|
Group {
|
||||||
/*game.cover?.image.map {
|
/*game.cover?.image.map {
|
||||||
@@ -158,7 +167,7 @@ struct Overview: View {
|
|||||||
.background(Color(UIColor.lightGray))
|
.background(Color(UIColor.lightGray))
|
||||||
.cornerRadius(5)
|
.cornerRadius(5)
|
||||||
|
|
||||||
Text("\(gameSeries.name)")
|
Text("\(game_series.name ?? "n/a")")
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.frame(width: 100)
|
.frame(width: 100)
|
||||||
|
|
||||||
@@ -171,7 +180,7 @@ struct Overview: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var featured : some View {
|
/*var featured : some View {
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Gerade Aktuell")
|
Text("Gerade Aktuell")
|
||||||
@@ -201,13 +210,14 @@ struct Overview: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
ScrollView(.vertical, showsIndicators: true) {
|
ScrollView(.vertical, showsIndicators: true) {
|
||||||
VStack {
|
VStack {
|
||||||
featured
|
//featured
|
||||||
|
Text("TODO FEATURED")
|
||||||
Divider()
|
Divider()
|
||||||
ConsolesOverview
|
ConsolesOverview
|
||||||
Divider()
|
Divider()
|
||||||
|
|||||||
@@ -42,14 +42,13 @@
|
|||||||
</fetchedProperty>
|
</fetchedProperty>
|
||||||
</entity>
|
</entity>
|
||||||
<entity name="GameSeries" representedClassName="GameSeries" syncable="YES">
|
<entity name="GameSeries" representedClassName="GameSeries" syncable="YES">
|
||||||
|
<attribute name="cover_icloud_path" optional="YES" attributeType="String"/>
|
||||||
<attribute name="name" attributeType="String" defaultValueString=""/>
|
<attribute name="name" attributeType="String" defaultValueString=""/>
|
||||||
<attribute name="uuid" optional="YES" attributeType="UUID" defaultValueString="00000000-0000-0000-0000-000000000000" usesScalarValueType="NO"/>
|
<attribute name="uuid" optional="YES" attributeType="UUID" defaultValueString="00000000-0000-0000-0000-000000000000" usesScalarValueType="NO"/>
|
||||||
<relationship name="cover" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="GameSeriesCover" inverseName="gameSeries" inverseEntity="GameSeriesCover"/>
|
|
||||||
<relationship name="games" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Game" inverseName="series" inverseEntity="Game"/>
|
<relationship name="games" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Game" inverseName="series" inverseEntity="Game"/>
|
||||||
</entity>
|
</entity>
|
||||||
<entity name="GameSeriesCover" representedClassName="GameSeriesCover" syncable="YES">
|
<entity name="GameSeriesCover" representedClassName="GameSeriesCover" syncable="YES">
|
||||||
<attribute name="image" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData"/>
|
<attribute name="image" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData"/>
|
||||||
<relationship name="gameSeries" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="GameSeries" inverseName="cover" inverseEntity="GameSeries"/>
|
|
||||||
</entity>
|
</entity>
|
||||||
<entity name="Logo" representedClassName="Logo" syncable="YES">
|
<entity name="Logo" representedClassName="Logo" syncable="YES">
|
||||||
<attribute name="image" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData"/>
|
<attribute name="image" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData"/>
|
||||||
@@ -60,7 +59,7 @@
|
|||||||
<element name="Cover" positionX="-66.69921875" positionY="223.48046875" width="128" height="44"/>
|
<element name="Cover" positionX="-66.69921875" positionY="223.48046875" width="128" height="44"/>
|
||||||
<element name="Game" positionX="-288.828125" positionY="276.7421875" width="128" height="230"/>
|
<element name="Game" positionX="-288.828125" positionY="276.7421875" width="128" height="230"/>
|
||||||
<element name="GameSeries" positionX="-686.828125" positionY="359.20703125" width="128" height="89"/>
|
<element name="GameSeries" positionX="-686.828125" positionY="359.20703125" width="128" height="89"/>
|
||||||
<element name="GameSeriesCover" positionX="-477" positionY="180" width="128" height="59"/>
|
<element name="GameSeriesCover" positionX="-477" positionY="180" width="128" height="44"/>
|
||||||
<element name="Logo" positionX="-66.7109375" positionY="110.9765625" width="128" height="44"/>
|
<element name="Logo" positionX="-66.7109375" positionY="110.9765625" width="128" height="44"/>
|
||||||
</elements>
|
</elements>
|
||||||
</model>
|
</model>
|
||||||
Reference in New Issue
Block a user