diff --git a/.DS_Store b/.DS_Store index d19c6ba2..217e08ce 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/AnimeGen.xcodeproj/project.pbxproj b/AnimeGen.xcodeproj/project.pbxproj index c1691617..8fe141e4 100644 --- a/AnimeGen.xcodeproj/project.pbxproj +++ b/AnimeGen.xcodeproj/project.pbxproj @@ -7,272 +7,253 @@ objects = { /* Begin PBXBuildFile section */ - 130A80532B78C02E0028985F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130A80522B78C02E0028985F /* AppDelegate.swift */; }; - 130A80552B78C02E0028985F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130A80542B78C02E0028985F /* SceneDelegate.swift */; }; - 130A80572B78C02E0028985F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 130A80562B78C02E0028985F /* ViewController.swift */; }; - 130A805A2B78C02E0028985F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 130A80582B78C02E0028985F /* Main.storyboard */; }; - 130A805C2B78C0300028985F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 130A805B2B78C0300028985F /* Assets.xcassets */; }; - 130A805F2B78C0300028985F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 130A805D2B78C0300028985F /* LaunchScreen.storyboard */; }; - 1312CFE72BE143B0003E135F /* History.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1312CFE62BE143B0003E135F /* History.swift */; }; - 1315156B2BAB268900A1C770 /* HearthButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1315156A2BAB268900A1C770 /* HearthButton.swift */; }; - 1315156D2BAB274F00A1C770 /* Rewind-Settings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1315156C2BAB274F00A1C770 /* Rewind-Settings.swift */; }; - 1315156F2BAB27D600A1C770 /* Web-Share.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1315156E2BAB27D600A1C770 /* Web-Share.swift */; }; - 131515712BAB284A00A1C770 /* Refresh-API-Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131515702BAB284A00A1C770 /* Refresh-API-Button.swift */; }; - 131515742BAB28C900A1C770 /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = 131515732BAB28C900A1C770 /* SDWebImage */; }; - 134C3A862BD404C5001C3C22 /* Main-onboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 134C3A852BD404C5001C3C22 /* Main-onboard.swift */; }; - 135DA6512BD501FD0083235B /* popup-Banner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135DA6502BD501FD0083235B /* popup-Banner.swift */; }; - 1365E8202BB0112D005E0548 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1365E81F2BB0112D005E0548 /* HistoryView.swift */; }; - 1365E8222BB011F6005E0548 /* ImageHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1365E8212BB011F6005E0548 /* ImageHistory.swift */; }; - 1365E8242BB01236005E0548 /* History-Butt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1365E8232BB01236005E0548 /* History-Butt.swift */; }; - 1375B3EA2BB813DA00E3D128 /* Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1375B3E92BB813DA00E3D128 /* Activity.swift */; }; - 138661252B8136DC0062AC91 /* nekosapi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138661242B8136DC0062AC91 /* nekosapi.swift */; }; - 13877B192B82001800251A60 /* SettingsPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13877B182B82001800251A60 /* SettingsPage.swift */; }; - 13877B1E2B82024A00251A60 /* AboutPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13877B1D2B82024A00251A60 /* AboutPage.swift */; }; - 138C92642BE11887008E37F8 /* API-Pref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138C92632BE11887008E37F8 /* API-Pref.swift */; }; - 138C92672BE11CE7008E37F8 /* Features.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138C92662BE11CE7008E37F8 /* Features.swift */; }; - 138C92692BE1202D008E37F8 /* Content.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138C92682BE1202D008E37F8 /* Content.swift */; }; - 138C926B2BE120E3008E37F8 /* Developer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 138C926A2BE120E3008E37F8 /* Developer.swift */; }; - 13910EBE2B80D380009BF17E /* ImageExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910EBD2B80D380009BF17E /* ImageExtensions.swift */; }; - 13910EC02B80D396009BF17E /* UIExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910EBF2B80D396009BF17E /* UIExtensions.swift */; }; - 13910EC52B80D5A6009BF17E /* pic-re.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910EC42B80D5A6009BF17E /* pic-re.swift */; }; - 13910EC72B80D5B9009BF17E /* waifu-im.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910EC62B80D5B9009BF17E /* waifu-im.swift */; }; - 13910EC92B80D5C2009BF17E /* nekos-best.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910EC82B80D5C2009BF17E /* nekos-best.swift */; }; - 13910ECB2B80D5C8009BF17E /* waifu-pics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13910ECA2B80D5C8009BF17E /* waifu-pics.swift */; }; - 139A2E0A2BA4D642003F2598 /* kyoko.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139A2E092BA4D642003F2598 /* kyoko.swift */; }; - 13A2B7902BD1615600B79DF7 /* Hmtai-pref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A2B78F2BD1615600B79DF7 /* Hmtai-pref.swift */; }; - 13A325922B94D8A100F1C357 /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A325912B94D8A100F1C357 /* Secrets.swift */; }; - 13BE98C02B828B8000379AB7 /* nekosmoe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BE98BF2B828B8000379AB7 /* nekosmoe.swift */; }; - 13C6CA732BD990E30046923C /* waifu-it.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C6CA722BD990E30046923C /* waifu-it.swift */; }; - 13C6CA752BDA2FDF0046923C /* waifu-it-pref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C6CA742BDA2FDF0046923C /* waifu-it-pref.swift */; }; - 13C6CA782BDA409A0046923C /* nekosbot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C6CA772BDA409A0046923C /* nekosbot.swift */; }; - 13C8011D2B94C5E900BFD198 /* HmtaiSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C8011C2B94C5E900BFD198 /* HmtaiSender.swift */; }; - 13C8011F2B94CAD900BFD198 /* HmtaiReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C8011E2B94CAD900BFD198 /* HmtaiReader.swift */; }; - 13CC95082B8BA40100B5705E /* ApiPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13CC95072B8BA40100B5705E /* ApiPage.swift */; }; - 13CC950A2B8BA43600B5705E /* API.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13CC95092B8BA43600B5705E /* API.xcassets */; }; - 13D936BF2BD6C6BF00D506E6 /* Gradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D936BE2BD6C6BF00D506E6 /* Gradient.swift */; }; - 13E2DC842BA5D2CF00320E2F /* purr.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13E2DC832BA5D2CF00320E2F /* purr.swift */; }; - 13FBE78C2BDD447B00FF0F3E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13FBE78B2BDD447B00FF0F3E /* PrivacyInfo.xcprivacy */; }; + 133C4C872BE67CAB00258EDD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133C4C862BE67CAB00258EDD /* AppDelegate.swift */; }; + 133C4C892BE67CAB00258EDD /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133C4C882BE67CAB00258EDD /* SceneDelegate.swift */; }; + 133C4C8B2BE67CAB00258EDD /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 133C4C8A2BE67CAB00258EDD /* ViewController.swift */; }; + 133C4C902BE67CAD00258EDD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 133C4C8F2BE67CAD00258EDD /* Assets.xcassets */; }; + 136BD7DB2BE7CA6F00ED23AE /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7D92BE7CA6F00ED23AE /* HistoryView.swift */; }; + 136BD7DC2BE7CA6F00ED23AE /* ImageHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7DA2BE7CA6F00ED23AE /* ImageHistory.swift */; }; + 136BD7DE2BE7CAA300ED23AE /* HistoryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7DD2BE7CAA300ED23AE /* HistoryButton.swift */; }; + 136BD7E02BE7CB4D00ED23AE /* RewindButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7DF2BE7CB4D00ED23AE /* RewindButton.swift */; }; + 136BD7E22BE7CCC400ED23AE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 136BD7E12BE7CCC400ED23AE /* PrivacyInfo.xcprivacy */; }; + 136BD7E42BE7DFEE00ED23AE /* AppPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7E32BE7DFEE00ED23AE /* AppPref.swift */; }; + 136BD7E62BE7E1B300ED23AE /* Contents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7E52BE7E1B300ED23AE /* Contents.swift */; }; + 136BD7E82BE7E24100ED23AE /* Developer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 136BD7E72BE7E24100ED23AE /* Developer.swift */; }; + 13AB1D2A2BE93E3D009132CB /* Historyy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13AB1D292BE93E3D009132CB /* Historyy.swift */; }; + 13C1E03C2BE9068600A27DEE /* AboutPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C1E03B2BE9068600A27DEE /* AboutPage.swift */; }; + 13C1E03E2BE9183400A27DEE /* API.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13C1E03D2BE9183400A27DEE /* API.xcassets */; }; + 13C1E0402BE92BB300A27DEE /* APIsCredits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13C1E03F2BE92BB300A27DEE /* APIsCredits.swift */; }; + 13D4FBE02BE7661A00BC3D1C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 13D4FBDF2BE7661A00BC3D1C /* Main.storyboard */; }; + 13D4FBE62BE7689500BC3D1C /* Tags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBE52BE7689400BC3D1C /* Tags.swift */; }; + 13D4FBE92BE768C100BC3D1C /* HeartButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBE82BE768C100BC3D1C /* HeartButton.swift */; }; + 13D4FBEB2BE76D0600BC3D1C /* ImageExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBEA2BE76D0600BC3D1C /* ImageExtensions.swift */; }; + 13D4FBEE2BE76D1F00BC3D1C /* SDWebImage in Frameworks */ = {isa = PBXBuildFile; productRef = 13D4FBED2BE76D1F00BC3D1C /* SDWebImage */; }; + 13D4FBF02BE76D4000BC3D1C /* popup-Banner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBEF2BE76D4000BC3D1C /* popup-Banner.swift */; }; + 13D4FBF22BE76DCA00BC3D1C /* Web-Share.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBF12BE76DCA00BC3D1C /* Web-Share.swift */; }; + 13D4FBF42BE76FC000BC3D1C /* Activity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBF32BE76FC000BC3D1C /* Activity.swift */; }; + 13D4FBF62BE76FF600BC3D1C /* Gradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBF52BE76FF600BC3D1C /* Gradient.swift */; }; + 13D4FBF82BE7706D00BC3D1C /* Refresh-API-Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FBF72BE7706D00BC3D1C /* Refresh-API-Button.swift */; }; + 13D4FC1C2BE770EC00BC3D1C /* purr.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC112BE770EB00BC3D1C /* purr.swift */; }; + 13D4FC1D2BE770EC00BC3D1C /* waifu-it.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC122BE770EB00BC3D1C /* waifu-it.swift */; }; + 13D4FC1E2BE770EC00BC3D1C /* waifu-im.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC132BE770EC00BC3D1C /* waifu-im.swift */; }; + 13D4FC202BE770EC00BC3D1C /* waifu-pics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC152BE770EC00BC3D1C /* waifu-pics.swift */; }; + 13D4FC212BE770EC00BC3D1C /* kyoko.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC162BE770EC00BC3D1C /* kyoko.swift */; }; + 13D4FC222BE770EC00BC3D1C /* nekosmoe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC172BE770EC00BC3D1C /* nekosmoe.swift */; }; + 13D4FC232BE770EC00BC3D1C /* nekosbot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC182BE770EC00BC3D1C /* nekosbot.swift */; }; + 13D4FC242BE770EC00BC3D1C /* pic-re.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC192BE770EC00BC3D1C /* pic-re.swift */; }; + 13D4FC252BE770EC00BC3D1C /* nekosapi.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC1A2BE770EC00BC3D1C /* nekosapi.swift */; }; + 13D4FC262BE770EC00BC3D1C /* nekos-best.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC1B2BE770EC00BC3D1C /* nekos-best.swift */; }; + 13D4FC292BE7710500BC3D1C /* HmtaiReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC272BE7710400BC3D1C /* HmtaiReader.swift */; }; + 13D4FC2A2BE7710500BC3D1C /* HmtaiSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC282BE7710400BC3D1C /* HmtaiSender.swift */; }; + 13D4FC2D2BE7719700BC3D1C /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC2C2BE7719700BC3D1C /* Secrets.swift */; }; + 13D4FC2F2BE779A200BC3D1C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 13D4FC2E2BE779A200BC3D1C /* LaunchScreen.storyboard */; }; + 13D4FC372BE780C900BC3D1C /* FeaturesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D4FC362BE780C900BC3D1C /* FeaturesApp.swift */; }; + 13DD19DA2BEA58B00034B014 /* SettingsMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD19D92BEA58B00034B014 /* SettingsMain.swift */; }; + 13DD19DD2BEA64620034B014 /* waifu-it-pref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD19DC2BEA64620034B014 /* waifu-it-pref.swift */; }; + 13DD19DF2BEA64650034B014 /* Hmtai-pref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD19DE2BEA64650034B014 /* Hmtai-pref.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 130A804F2B78C02E0028985F /* AnimeGen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnimeGen.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 130A80522B78C02E0028985F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 130A80542B78C02E0028985F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 130A80562B78C02E0028985F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 130A80592B78C02E0028985F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 130A805B2B78C0300028985F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 130A805E2B78C0300028985F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 130A80602B78C0300028985F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1312CFE62BE143B0003E135F /* History.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = History.swift; sourceTree = ""; }; - 1315156A2BAB268900A1C770 /* HearthButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HearthButton.swift; sourceTree = ""; }; - 1315156C2BAB274F00A1C770 /* Rewind-Settings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Rewind-Settings.swift"; sourceTree = ""; }; - 1315156E2BAB27D600A1C770 /* Web-Share.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web-Share.swift"; sourceTree = ""; }; - 131515702BAB284A00A1C770 /* Refresh-API-Button.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Refresh-API-Button.swift"; sourceTree = ""; }; - 134C3A852BD404C5001C3C22 /* Main-onboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Main-onboard.swift"; sourceTree = ""; }; - 135DA6502BD501FD0083235B /* popup-Banner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "popup-Banner.swift"; sourceTree = ""; }; - 1365E81F2BB0112D005E0548 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; - 1365E8212BB011F6005E0548 /* ImageHistory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageHistory.swift; sourceTree = ""; }; - 1365E8232BB01236005E0548 /* History-Butt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "History-Butt.swift"; sourceTree = ""; }; - 1375B3E92BB813DA00E3D128 /* Activity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Activity.swift; sourceTree = ""; }; - 138661242B8136DC0062AC91 /* nekosapi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nekosapi.swift; sourceTree = ""; }; - 13877B182B82001800251A60 /* SettingsPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsPage.swift; sourceTree = ""; }; - 13877B1D2B82024A00251A60 /* AboutPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutPage.swift; sourceTree = ""; }; - 138C92632BE11887008E37F8 /* API-Pref.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "API-Pref.swift"; sourceTree = ""; }; - 138C92662BE11CE7008E37F8 /* Features.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Features.swift; sourceTree = ""; }; - 138C92682BE1202D008E37F8 /* Content.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Content.swift; sourceTree = ""; }; - 138C926A2BE120E3008E37F8 /* Developer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Developer.swift; sourceTree = ""; }; - 13910EBD2B80D380009BF17E /* ImageExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageExtensions.swift; sourceTree = ""; }; - 13910EBF2B80D396009BF17E /* UIExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIExtensions.swift; sourceTree = ""; }; - 13910EC42B80D5A6009BF17E /* pic-re.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "pic-re.swift"; sourceTree = ""; }; - 13910EC62B80D5B9009BF17E /* waifu-im.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "waifu-im.swift"; sourceTree = ""; }; - 13910EC82B80D5C2009BF17E /* nekos-best.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "nekos-best.swift"; sourceTree = ""; }; - 13910ECA2B80D5C8009BF17E /* waifu-pics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "waifu-pics.swift"; sourceTree = ""; }; - 139A2E092BA4D642003F2598 /* kyoko.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = kyoko.swift; sourceTree = ""; }; - 13A2B78F2BD1615600B79DF7 /* Hmtai-pref.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Hmtai-pref.swift"; sourceTree = ""; }; - 13A325912B94D8A100F1C357 /* Secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = ""; }; - 13BE98BF2B828B8000379AB7 /* nekosmoe.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nekosmoe.swift; sourceTree = ""; }; - 13C6CA722BD990E30046923C /* waifu-it.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "waifu-it.swift"; sourceTree = ""; }; - 13C6CA742BDA2FDF0046923C /* waifu-it-pref.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "waifu-it-pref.swift"; sourceTree = ""; }; - 13C6CA772BDA409A0046923C /* nekosbot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nekosbot.swift; sourceTree = ""; }; - 13C8011C2B94C5E900BFD198 /* HmtaiSender.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HmtaiSender.swift; sourceTree = ""; }; - 13C8011E2B94CAD900BFD198 /* HmtaiReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HmtaiReader.swift; sourceTree = ""; }; - 13CC95072B8BA40100B5705E /* ApiPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiPage.swift; sourceTree = ""; }; - 13CC95092B8BA43600B5705E /* API.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = API.xcassets; sourceTree = ""; }; - 13D936BE2BD6C6BF00D506E6 /* Gradient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Gradient.swift; sourceTree = ""; }; - 13E2DC832BA5D2CF00320E2F /* purr.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = purr.swift; sourceTree = ""; }; - 13FBE78B2BDD447B00FF0F3E /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 133C4C832BE67CAB00258EDD /* AnimeGen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnimeGen.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 133C4C862BE67CAB00258EDD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 133C4C882BE67CAB00258EDD /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 133C4C8A2BE67CAB00258EDD /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 133C4C8F2BE67CAD00258EDD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 133C4C942BE67CAD00258EDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 136BD7D92BE7CA6F00ED23AE /* HistoryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; + 136BD7DA2BE7CA6F00ED23AE /* ImageHistory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageHistory.swift; sourceTree = ""; }; + 136BD7DD2BE7CAA300ED23AE /* HistoryButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryButton.swift; sourceTree = ""; }; + 136BD7DF2BE7CB4D00ED23AE /* RewindButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RewindButton.swift; sourceTree = ""; }; + 136BD7E12BE7CCC400ED23AE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 136BD7E32BE7DFEE00ED23AE /* AppPref.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPref.swift; sourceTree = ""; }; + 136BD7E52BE7E1B300ED23AE /* Contents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Contents.swift; sourceTree = ""; }; + 136BD7E72BE7E24100ED23AE /* Developer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Developer.swift; sourceTree = ""; }; + 13AB1D292BE93E3D009132CB /* Historyy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Historyy.swift; sourceTree = ""; }; + 13C1E03B2BE9068600A27DEE /* AboutPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutPage.swift; sourceTree = ""; }; + 13C1E03D2BE9183400A27DEE /* API.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = API.xcassets; sourceTree = ""; }; + 13C1E03F2BE92BB300A27DEE /* APIsCredits.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIsCredits.swift; sourceTree = ""; }; + 13D4FBDF2BE7661A00BC3D1C /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; + 13D4FBE52BE7689400BC3D1C /* Tags.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tags.swift; sourceTree = ""; }; + 13D4FBE82BE768C100BC3D1C /* HeartButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeartButton.swift; sourceTree = ""; }; + 13D4FBEA2BE76D0600BC3D1C /* ImageExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageExtensions.swift; sourceTree = ""; }; + 13D4FBEF2BE76D4000BC3D1C /* popup-Banner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "popup-Banner.swift"; sourceTree = ""; }; + 13D4FBF12BE76DCA00BC3D1C /* Web-Share.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web-Share.swift"; sourceTree = ""; }; + 13D4FBF32BE76FC000BC3D1C /* Activity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Activity.swift; sourceTree = ""; }; + 13D4FBF52BE76FF600BC3D1C /* Gradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Gradient.swift; sourceTree = ""; }; + 13D4FBF72BE7706D00BC3D1C /* Refresh-API-Button.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Refresh-API-Button.swift"; sourceTree = ""; }; + 13D4FC112BE770EB00BC3D1C /* purr.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = purr.swift; sourceTree = ""; }; + 13D4FC122BE770EB00BC3D1C /* waifu-it.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "waifu-it.swift"; sourceTree = ""; }; + 13D4FC132BE770EC00BC3D1C /* waifu-im.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "waifu-im.swift"; sourceTree = ""; }; + 13D4FC152BE770EC00BC3D1C /* waifu-pics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "waifu-pics.swift"; sourceTree = ""; }; + 13D4FC162BE770EC00BC3D1C /* kyoko.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = kyoko.swift; sourceTree = ""; }; + 13D4FC172BE770EC00BC3D1C /* nekosmoe.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = nekosmoe.swift; sourceTree = ""; }; + 13D4FC182BE770EC00BC3D1C /* nekosbot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = nekosbot.swift; sourceTree = ""; }; + 13D4FC192BE770EC00BC3D1C /* pic-re.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "pic-re.swift"; sourceTree = ""; }; + 13D4FC1A2BE770EC00BC3D1C /* nekosapi.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = nekosapi.swift; sourceTree = ""; }; + 13D4FC1B2BE770EC00BC3D1C /* nekos-best.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "nekos-best.swift"; sourceTree = ""; }; + 13D4FC272BE7710400BC3D1C /* HmtaiReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HmtaiReader.swift; sourceTree = ""; }; + 13D4FC282BE7710400BC3D1C /* HmtaiSender.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HmtaiSender.swift; sourceTree = ""; }; + 13D4FC2C2BE7719700BC3D1C /* Secrets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = ""; }; + 13D4FC2E2BE779A200BC3D1C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + 13D4FC362BE780C900BC3D1C /* FeaturesApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturesApp.swift; sourceTree = ""; }; + 13DD19D92BEA58B00034B014 /* SettingsMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsMain.swift; sourceTree = ""; }; + 13DD19DC2BEA64620034B014 /* waifu-it-pref.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "waifu-it-pref.swift"; sourceTree = ""; }; + 13DD19DE2BEA64650034B014 /* Hmtai-pref.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Hmtai-pref.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 130A804C2B78C02E0028985F /* Frameworks */ = { + 133C4C802BE67CAB00258EDD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 131515742BAB28C900A1C770 /* SDWebImage in Frameworks */, + 13D4FBEE2BE76D1F00BC3D1C /* SDWebImage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 130A80462B78C02E0028985F = { + 133C4C7A2BE67CAB00258EDD = { isa = PBXGroup; children = ( - 130A80512B78C02E0028985F /* AnimeGen */, - 130A80502B78C02E0028985F /* Products */, + 133C4C852BE67CAB00258EDD /* AnimeGen */, + 133C4C842BE67CAB00258EDD /* Products */, ); sourceTree = ""; }; - 130A80502B78C02E0028985F /* Products */ = { + 133C4C842BE67CAB00258EDD /* Products */ = { isa = PBXGroup; children = ( - 130A804F2B78C02E0028985F /* AnimeGen.app */, + 133C4C832BE67CAB00258EDD /* AnimeGen.app */, ); name = Products; sourceTree = ""; }; - 130A80512B78C02E0028985F /* AnimeGen */ = { + 133C4C852BE67CAB00258EDD /* AnimeGen */ = { isa = PBXGroup; children = ( - 134C3A842BD404B9001C3C22 /* Boarding */, - 13910EC32B80D595009BF17E /* APIs */, - 13910ECC2B80D61F009BF17E /* Extensions */, - 1365E81E2BB01123005E0548 /* History */, - 13877B1A2B82017A00251A60 /* Settings */, - 131515692BAB267100A1C770 /* Buttons */, - 130A80522B78C02E0028985F /* AppDelegate.swift */, - 13A325912B94D8A100F1C357 /* Secrets.swift */, - 130A80542B78C02E0028985F /* SceneDelegate.swift */, - 130A80562B78C02E0028985F /* ViewController.swift */, - 130A805B2B78C0300028985F /* Assets.xcassets */, - 130A80582B78C02E0028985F /* Main.storyboard */, - 130A805D2B78C0300028985F /* LaunchScreen.storyboard */, - 130A80602B78C0300028985F /* Info.plist */, - 13FBE78B2BDD447B00FF0F3E /* PrivacyInfo.xcprivacy */, + 136BD7D82BE7CA6300ED23AE /* History */, + 13D4FBE72BE768B400BC3D1C /* Buttons func */, + 13D4FBE42BE7688700BC3D1C /* Extension */, + 13D4FBE12BE7683D00BC3D1C /* APIs Requests */, + 13D4FC352BE780BE00BC3D1C /* Settings */, + 133C4C882BE67CAB00258EDD /* SceneDelegate.swift */, + 133C4C862BE67CAB00258EDD /* AppDelegate.swift */, + 133C4C8A2BE67CAB00258EDD /* ViewController.swift */, + 13D4FC2C2BE7719700BC3D1C /* Secrets.swift */, + 133C4C8F2BE67CAD00258EDD /* Assets.xcassets */, + 13D4FBDF2BE7661A00BC3D1C /* Main.storyboard */, + 13D4FC2E2BE779A200BC3D1C /* LaunchScreen.storyboard */, + 133C4C942BE67CAD00258EDD /* Info.plist */, + 136BD7E12BE7CCC400ED23AE /* PrivacyInfo.xcprivacy */, ); path = AnimeGen; sourceTree = ""; }; - 131515692BAB267100A1C770 /* Buttons */ = { + 136BD7D82BE7CA6300ED23AE /* History */ = { isa = PBXGroup; children = ( - 1315156A2BAB268900A1C770 /* HearthButton.swift */, - 1315156C2BAB274F00A1C770 /* Rewind-Settings.swift */, - 1315156E2BAB27D600A1C770 /* Web-Share.swift */, - 131515702BAB284A00A1C770 /* Refresh-API-Button.swift */, - 1365E8232BB01236005E0548 /* History-Butt.swift */, - 1375B3E92BB813DA00E3D128 /* Activity.swift */, + 136BD7D92BE7CA6F00ED23AE /* HistoryView.swift */, + 136BD7DA2BE7CA6F00ED23AE /* ImageHistory.swift */, ); - path = Buttons; - sourceTree = ""; - }; - 1317D4B22B9479CD00675214 /* Hmtai */ = { - isa = PBXGroup; - children = ( - 13C8011C2B94C5E900BFD198 /* HmtaiSender.swift */, - 13C8011E2B94CAD900BFD198 /* HmtaiReader.swift */, - ); - path = Hmtai; + path = History; sourceTree = ""; }; - 134C3A842BD404B9001C3C22 /* Boarding */ = { + 13C1E03A2BE9067700A27DEE /* About-Credits */ = { isa = PBXGroup; children = ( - 134C3A852BD404C5001C3C22 /* Main-onboard.swift */, + 13C1E03D2BE9183400A27DEE /* API.xcassets */, + 13C1E03B2BE9068600A27DEE /* AboutPage.swift */, + 13C1E03F2BE92BB300A27DEE /* APIsCredits.swift */, ); - path = Boarding; + path = "About-Credits"; sourceTree = ""; }; - 1365E81E2BB01123005E0548 /* History */ = { + 13D4FBE12BE7683D00BC3D1C /* APIs Requests */ = { isa = PBXGroup; children = ( - 1365E81F2BB0112D005E0548 /* HistoryView.swift */, - 1365E8212BB011F6005E0548 /* ImageHistory.swift */, + 13D4FC2B2BE7710C00BC3D1C /* Hmtai */, + 13D4FC162BE770EC00BC3D1C /* kyoko.swift */, + 13D4FC1B2BE770EC00BC3D1C /* nekos-best.swift */, + 13D4FC1A2BE770EC00BC3D1C /* nekosapi.swift */, + 13D4FC182BE770EC00BC3D1C /* nekosbot.swift */, + 13D4FC172BE770EC00BC3D1C /* nekosmoe.swift */, + 13D4FC192BE770EC00BC3D1C /* pic-re.swift */, + 13D4FC112BE770EB00BC3D1C /* purr.swift */, + 13D4FC132BE770EC00BC3D1C /* waifu-im.swift */, + 13D4FC122BE770EB00BC3D1C /* waifu-it.swift */, + 13D4FC152BE770EC00BC3D1C /* waifu-pics.swift */, ); - path = History; + path = "APIs Requests"; sourceTree = ""; }; - 13877B1A2B82017A00251A60 /* Settings */ = { + 13D4FBE42BE7688700BC3D1C /* Extension */ = { isa = PBXGroup; children = ( - 138C92652BE11CA7008E37F8 /* About-Credits */, - 138C92622BE1186E008E37F8 /* App Settings */, - 13877B182B82001800251A60 /* SettingsPage.swift */, - 13CC95092B8BA43600B5705E /* API.xcassets */, + 13D4FBE52BE7689400BC3D1C /* Tags.swift */, + 13D4FBEA2BE76D0600BC3D1C /* ImageExtensions.swift */, + 13D4FBEF2BE76D4000BC3D1C /* popup-Banner.swift */, + 13D4FBF32BE76FC000BC3D1C /* Activity.swift */, + 13D4FBF52BE76FF600BC3D1C /* Gradient.swift */, ); - path = Settings; + path = Extension; sourceTree = ""; }; - 138C92622BE1186E008E37F8 /* App Settings */ = { + 13D4FBE72BE768B400BC3D1C /* Buttons func */ = { isa = PBXGroup; children = ( - 138C92632BE11887008E37F8 /* API-Pref.swift */, - 138C92662BE11CE7008E37F8 /* Features.swift */, - 138C92682BE1202D008E37F8 /* Content.swift */, - 1312CFE62BE143B0003E135F /* History.swift */, - 138C926A2BE120E3008E37F8 /* Developer.swift */, - 13C6CA762BDA3ABC0046923C /* Developer-Pref */, + 13D4FBE82BE768C100BC3D1C /* HeartButton.swift */, + 13D4FBF12BE76DCA00BC3D1C /* Web-Share.swift */, + 13D4FBF72BE7706D00BC3D1C /* Refresh-API-Button.swift */, + 136BD7DD2BE7CAA300ED23AE /* HistoryButton.swift */, + 136BD7DF2BE7CB4D00ED23AE /* RewindButton.swift */, ); - path = "App Settings"; + path = "Buttons func"; sourceTree = ""; }; - 138C92652BE11CA7008E37F8 /* About-Credits */ = { + 13D4FC2B2BE7710C00BC3D1C /* Hmtai */ = { isa = PBXGroup; children = ( - 13877B1D2B82024A00251A60 /* AboutPage.swift */, - 13CC95072B8BA40100B5705E /* ApiPage.swift */, + 13D4FC272BE7710400BC3D1C /* HmtaiReader.swift */, + 13D4FC282BE7710400BC3D1C /* HmtaiSender.swift */, ); - path = "About-Credits"; - sourceTree = ""; - }; - 13910EC32B80D595009BF17E /* APIs */ = { - isa = PBXGroup; - children = ( - 1317D4B22B9479CD00675214 /* Hmtai */, - 13910EC42B80D5A6009BF17E /* pic-re.swift */, - 13910EC62B80D5B9009BF17E /* waifu-im.swift */, - 13910ECA2B80D5C8009BF17E /* waifu-pics.swift */, - 13910EC82B80D5C2009BF17E /* nekos-best.swift */, - 138661242B8136DC0062AC91 /* nekosapi.swift */, - 13BE98BF2B828B8000379AB7 /* nekosmoe.swift */, - 139A2E092BA4D642003F2598 /* kyoko.swift */, - 13E2DC832BA5D2CF00320E2F /* purr.swift */, - 13C6CA722BD990E30046923C /* waifu-it.swift */, - 13C6CA772BDA409A0046923C /* nekosbot.swift */, - ); - path = APIs; + path = Hmtai; sourceTree = ""; }; - 13910ECC2B80D61F009BF17E /* Extensions */ = { + 13D4FC352BE780BE00BC3D1C /* Settings */ = { isa = PBXGroup; children = ( - 13910EBD2B80D380009BF17E /* ImageExtensions.swift */, - 13910EBF2B80D396009BF17E /* UIExtensions.swift */, - 135DA6502BD501FD0083235B /* popup-Banner.swift */, - 13D936BE2BD6C6BF00D506E6 /* Gradient.swift */, + 13DD19DB2BEA64590034B014 /* Developer */, + 13C1E03A2BE9067700A27DEE /* About-Credits */, + 13D4FC362BE780C900BC3D1C /* FeaturesApp.swift */, + 136BD7E32BE7DFEE00ED23AE /* AppPref.swift */, + 136BD7E52BE7E1B300ED23AE /* Contents.swift */, + 136BD7E72BE7E24100ED23AE /* Developer.swift */, + 13AB1D292BE93E3D009132CB /* Historyy.swift */, + 13DD19D92BEA58B00034B014 /* SettingsMain.swift */, ); - path = Extensions; + path = Settings; sourceTree = ""; }; - 13C6CA762BDA3ABC0046923C /* Developer-Pref */ = { + 13DD19DB2BEA64590034B014 /* Developer */ = { isa = PBXGroup; children = ( - 13A2B78F2BD1615600B79DF7 /* Hmtai-pref.swift */, - 13C6CA742BDA2FDF0046923C /* waifu-it-pref.swift */, + 13DD19DE2BEA64650034B014 /* Hmtai-pref.swift */, + 13DD19DC2BEA64620034B014 /* waifu-it-pref.swift */, ); - path = "Developer-Pref"; + path = Developer; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 130A804E2B78C02E0028985F /* AnimeGen */ = { + 133C4C822BE67CAB00258EDD /* AnimeGen */ = { isa = PBXNativeTarget; - buildConfigurationList = 130A80632B78C0300028985F /* Build configuration list for PBXNativeTarget "AnimeGen" */; + buildConfigurationList = 133C4C972BE67CAD00258EDD /* Build configuration list for PBXNativeTarget "AnimeGen" */; buildPhases = ( - 130A804B2B78C02E0028985F /* Sources */, - 130A804C2B78C02E0028985F /* Frameworks */, - 130A804D2B78C02E0028985F /* Resources */, + 133C4C7F2BE67CAB00258EDD /* Sources */, + 133C4C802BE67CAB00258EDD /* Frameworks */, + 133C4C812BE67CAB00258EDD /* Resources */, ); buildRules = ( ); @@ -280,28 +261,28 @@ ); name = AnimeGen; packageProductDependencies = ( - 131515732BAB28C900A1C770 /* SDWebImage */, + 13D4FBED2BE76D1F00BC3D1C /* SDWebImage */, ); productName = AnimeGen; - productReference = 130A804F2B78C02E0028985F /* AnimeGen.app */; + productReference = 133C4C832BE67CAB00258EDD /* AnimeGen.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 130A80472B78C02E0028985F /* Project object */ = { + 133C4C7B2BE67CAB00258EDD /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1320; LastUpgradeCheck = 1320; TargetAttributes = { - 130A804E2B78C02E0028985F = { + 133C4C822BE67CAB00258EDD = { CreatedOnToolsVersion = 13.2.1; }; }; }; - buildConfigurationList = 130A804A2B78C02E0028985F /* Build configuration list for PBXProject "AnimeGen" */; + buildConfigurationList = 133C4C7E2BE67CAB00258EDD /* Build configuration list for PBXProject "AnimeGen" */; compatibilityVersion = "Xcode 13.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -309,104 +290,84 @@ en, Base, ); - mainGroup = 130A80462B78C02E0028985F; + mainGroup = 133C4C7A2BE67CAB00258EDD; packageReferences = ( - 131515722BAB28C900A1C770 /* XCRemoteSwiftPackageReference "SDWebImage" */, + 13D4FBEC2BE76D1F00BC3D1C /* XCRemoteSwiftPackageReference "SDWebImage" */, ); - productRefGroup = 130A80502B78C02E0028985F /* Products */; + productRefGroup = 133C4C842BE67CAB00258EDD /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 130A804E2B78C02E0028985F /* AnimeGen */, + 133C4C822BE67CAB00258EDD /* AnimeGen */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 130A804D2B78C02E0028985F /* Resources */ = { + 133C4C812BE67CAB00258EDD /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 130A805F2B78C0300028985F /* LaunchScreen.storyboard in Resources */, - 130A805C2B78C0300028985F /* Assets.xcassets in Resources */, - 13CC950A2B8BA43600B5705E /* API.xcassets in Resources */, - 13FBE78C2BDD447B00FF0F3E /* PrivacyInfo.xcprivacy in Resources */, - 130A805A2B78C02E0028985F /* Main.storyboard in Resources */, + 13D4FC2F2BE779A200BC3D1C /* LaunchScreen.storyboard in Resources */, + 13C1E03E2BE9183400A27DEE /* API.xcassets in Resources */, + 133C4C902BE67CAD00258EDD /* Assets.xcassets in Resources */, + 136BD7E22BE7CCC400ED23AE /* PrivacyInfo.xcprivacy in Resources */, + 13D4FBE02BE7661A00BC3D1C /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 130A804B2B78C02E0028985F /* Sources */ = { + 133C4C7F2BE67CAB00258EDD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1315156B2BAB268900A1C770 /* HearthButton.swift in Sources */, - 13A325922B94D8A100F1C357 /* Secrets.swift in Sources */, - 1375B3EA2BB813DA00E3D128 /* Activity.swift in Sources */, - 139A2E0A2BA4D642003F2598 /* kyoko.swift in Sources */, - 13E2DC842BA5D2CF00320E2F /* purr.swift in Sources */, - 13C6CA752BDA2FDF0046923C /* waifu-it-pref.swift in Sources */, - 138C92672BE11CE7008E37F8 /* Features.swift in Sources */, - 13910EC72B80D5B9009BF17E /* waifu-im.swift in Sources */, - 13877B192B82001800251A60 /* SettingsPage.swift in Sources */, - 13BE98C02B828B8000379AB7 /* nekosmoe.swift in Sources */, - 134C3A862BD404C5001C3C22 /* Main-onboard.swift in Sources */, - 13D936BF2BD6C6BF00D506E6 /* Gradient.swift in Sources */, - 130A80572B78C02E0028985F /* ViewController.swift in Sources */, - 130A80532B78C02E0028985F /* AppDelegate.swift in Sources */, - 130A80552B78C02E0028985F /* SceneDelegate.swift in Sources */, - 13910ECB2B80D5C8009BF17E /* waifu-pics.swift in Sources */, - 13877B1E2B82024A00251A60 /* AboutPage.swift in Sources */, - 13C6CA732BD990E30046923C /* waifu-it.swift in Sources */, - 13910EC52B80D5A6009BF17E /* pic-re.swift in Sources */, - 13C6CA782BDA409A0046923C /* nekosbot.swift in Sources */, - 138C926B2BE120E3008E37F8 /* Developer.swift in Sources */, - 138C92642BE11887008E37F8 /* API-Pref.swift in Sources */, - 1365E8202BB0112D005E0548 /* HistoryView.swift in Sources */, - 13A2B7902BD1615600B79DF7 /* Hmtai-pref.swift in Sources */, - 1365E8222BB011F6005E0548 /* ImageHistory.swift in Sources */, - 138C92692BE1202D008E37F8 /* Content.swift in Sources */, - 13C8011D2B94C5E900BFD198 /* HmtaiSender.swift in Sources */, - 131515712BAB284A00A1C770 /* Refresh-API-Button.swift in Sources */, - 1365E8242BB01236005E0548 /* History-Butt.swift in Sources */, - 13C8011F2B94CAD900BFD198 /* HmtaiReader.swift in Sources */, - 135DA6512BD501FD0083235B /* popup-Banner.swift in Sources */, - 13910EC02B80D396009BF17E /* UIExtensions.swift in Sources */, - 138661252B8136DC0062AC91 /* nekosapi.swift in Sources */, - 13910EC92B80D5C2009BF17E /* nekos-best.swift in Sources */, - 13910EBE2B80D380009BF17E /* ImageExtensions.swift in Sources */, - 1315156D2BAB274F00A1C770 /* Rewind-Settings.swift in Sources */, - 1312CFE72BE143B0003E135F /* History.swift in Sources */, - 1315156F2BAB27D600A1C770 /* Web-Share.swift in Sources */, - 13CC95082B8BA40100B5705E /* ApiPage.swift in Sources */, + 13DD19DA2BEA58B00034B014 /* SettingsMain.swift in Sources */, + 13D4FBF42BE76FC000BC3D1C /* Activity.swift in Sources */, + 13D4FC2D2BE7719700BC3D1C /* Secrets.swift in Sources */, + 136BD7E42BE7DFEE00ED23AE /* AppPref.swift in Sources */, + 13D4FBEB2BE76D0600BC3D1C /* ImageExtensions.swift in Sources */, + 13D4FBE92BE768C100BC3D1C /* HeartButton.swift in Sources */, + 13D4FC212BE770EC00BC3D1C /* kyoko.swift in Sources */, + 13D4FBF22BE76DCA00BC3D1C /* Web-Share.swift in Sources */, + 13D4FC242BE770EC00BC3D1C /* pic-re.swift in Sources */, + 133C4C8B2BE67CAB00258EDD /* ViewController.swift in Sources */, + 13C1E0402BE92BB300A27DEE /* APIsCredits.swift in Sources */, + 136BD7DE2BE7CAA300ED23AE /* HistoryButton.swift in Sources */, + 13DD19DD2BEA64620034B014 /* waifu-it-pref.swift in Sources */, + 13D4FC202BE770EC00BC3D1C /* waifu-pics.swift in Sources */, + 13D4FBF82BE7706D00BC3D1C /* Refresh-API-Button.swift in Sources */, + 13D4FC1E2BE770EC00BC3D1C /* waifu-im.swift in Sources */, + 13D4FC1D2BE770EC00BC3D1C /* waifu-it.swift in Sources */, + 13D4FC1C2BE770EC00BC3D1C /* purr.swift in Sources */, + 13D4FC292BE7710500BC3D1C /* HmtaiReader.swift in Sources */, + 136BD7E82BE7E24100ED23AE /* Developer.swift in Sources */, + 136BD7DC2BE7CA6F00ED23AE /* ImageHistory.swift in Sources */, + 13D4FBF02BE76D4000BC3D1C /* popup-Banner.swift in Sources */, + 13D4FC2A2BE7710500BC3D1C /* HmtaiSender.swift in Sources */, + 13D4FC262BE770EC00BC3D1C /* nekos-best.swift in Sources */, + 136BD7DB2BE7CA6F00ED23AE /* HistoryView.swift in Sources */, + 13D4FC232BE770EC00BC3D1C /* nekosbot.swift in Sources */, + 13D4FC222BE770EC00BC3D1C /* nekosmoe.swift in Sources */, + 13D4FC252BE770EC00BC3D1C /* nekosapi.swift in Sources */, + 136BD7E02BE7CB4D00ED23AE /* RewindButton.swift in Sources */, + 13D4FC372BE780C900BC3D1C /* FeaturesApp.swift in Sources */, + 13D4FBE62BE7689500BC3D1C /* Tags.swift in Sources */, + 13D4FBF62BE76FF600BC3D1C /* Gradient.swift in Sources */, + 13DD19DF2BEA64650034B014 /* Hmtai-pref.swift in Sources */, + 133C4C872BE67CAB00258EDD /* AppDelegate.swift in Sources */, + 13AB1D2A2BE93E3D009132CB /* Historyy.swift in Sources */, + 133C4C892BE67CAB00258EDD /* SceneDelegate.swift in Sources */, + 136BD7E62BE7E1B300ED23AE /* Contents.swift in Sources */, + 13C1E03C2BE9068600A27DEE /* AboutPage.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXVariantGroup section */ - 130A80582B78C02E0028985F /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 130A80592B78C02E0028985F /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 130A805D2B78C0300028985F /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 130A805E2B78C0300028985F /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ - 130A80612B78C0300028985F /* Debug */ = { + 133C4C952BE67CAD00258EDD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -467,7 +428,7 @@ }; name = Debug; }; - 130A80622B78C0300028985F /* Release */ = { + 133C4C962BE67CAD00258EDD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -522,18 +483,16 @@ }; name = Release; }; - 130A80642B78C0300028985F /* Debug */ = { + 133C4C982BE67CAD00258EDD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = AnimeGen/AnimeGen.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 38; + CURRENT_PROJECT_VERSION = 41; DEVELOPMENT_TEAM = 399LMK6Q2Y; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AnimeGen/Info.plist; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "The photo Library Addition is required to save images."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -546,29 +505,25 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7; + MARKETING_VERSION = 1.8; PRODUCT_BUNDLE_IDENTIFIER = me.cranci.AnimeGen; PRODUCT_NAME = "$(TARGET_NAME)"; - SUPPORTS_MACCATALYST = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 130A80652B78C0300028985F /* Release */ = { + 133C4C992BE67CAD00258EDD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = AnimeGen/AnimeGen.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 38; + CURRENT_PROJECT_VERSION = 41; DEVELOPMENT_TEAM = 399LMK6Q2Y; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = AnimeGen/Info.plist; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment"; INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "The photo Library Addition is required to save images."; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -581,11 +536,9 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7; + MARKETING_VERSION = 1.8; PRODUCT_BUNDLE_IDENTIFIER = me.cranci.AnimeGen; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SUPPORTS_MACCATALYST = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -595,20 +548,20 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 130A804A2B78C02E0028985F /* Build configuration list for PBXProject "AnimeGen" */ = { + 133C4C7E2BE67CAB00258EDD /* Build configuration list for PBXProject "AnimeGen" */ = { isa = XCConfigurationList; buildConfigurations = ( - 130A80612B78C0300028985F /* Debug */, - 130A80622B78C0300028985F /* Release */, + 133C4C952BE67CAD00258EDD /* Debug */, + 133C4C962BE67CAD00258EDD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 130A80632B78C0300028985F /* Build configuration list for PBXNativeTarget "AnimeGen" */ = { + 133C4C972BE67CAD00258EDD /* Build configuration list for PBXNativeTarget "AnimeGen" */ = { isa = XCConfigurationList; buildConfigurations = ( - 130A80642B78C0300028985F /* Debug */, - 130A80652B78C0300028985F /* Release */, + 133C4C982BE67CAD00258EDD /* Debug */, + 133C4C992BE67CAD00258EDD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -616,7 +569,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 131515722BAB28C900A1C770 /* XCRemoteSwiftPackageReference "SDWebImage" */ = { + 13D4FBEC2BE76D1F00BC3D1C /* XCRemoteSwiftPackageReference "SDWebImage" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SDWebImage/SDWebImage"; requirement = { @@ -627,12 +580,12 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 131515732BAB28C900A1C770 /* SDWebImage */ = { + 13D4FBED2BE76D1F00BC3D1C /* SDWebImage */ = { isa = XCSwiftPackageProductDependency; - package = 131515722BAB28C900A1C770 /* XCRemoteSwiftPackageReference "SDWebImage" */; + package = 13D4FBEC2BE76D1F00BC3D1C /* XCRemoteSwiftPackageReference "SDWebImage" */; productName = SDWebImage; }; /* End XCSwiftPackageProductDependency section */ }; - rootObject = 130A80472B78C02E0028985F /* Project object */; + rootObject = 133C4C7B2BE67CAB00258EDD /* Project object */; } diff --git a/AnimeGen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/AnimeGen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 05069156..da452422 100644 --- a/AnimeGen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/AnimeGen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/SDWebImage/SDWebImage", "state": { "branch": "master", - "revision": "80c8b2023a5efb4415a2c615acfec075e5c243d2", + "revision": "e55cb041d05fc20a8b32c56249ab7e4b907c1dcb", "version": null } } diff --git a/AnimeGen.xcodeproj/project.xcworkspace/xcuserdata/Francesco.xcuserdatad/UserInterfaceState.xcuserstate b/AnimeGen.xcodeproj/project.xcworkspace/xcuserdata/Francesco.xcuserdatad/UserInterfaceState.xcuserstate index 96ee1220..a4078020 100644 Binary files a/AnimeGen.xcodeproj/project.xcworkspace/xcuserdata/Francesco.xcuserdatad/UserInterfaceState.xcuserstate and b/AnimeGen.xcodeproj/project.xcworkspace/xcuserdata/Francesco.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AnimeGen.xcodeproj/xcuserdata/Francesco.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/AnimeGen.xcodeproj/xcuserdata/Francesco.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index c11cc927..8f760b50 100644 --- a/AnimeGen.xcodeproj/xcuserdata/Francesco.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/AnimeGen.xcodeproj/xcuserdata/Francesco.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -1,6 +1,6 @@ diff --git a/AnimeGen/.DS_Store b/AnimeGen/.DS_Store index a5653a4c..7837b5a0 100644 Binary files a/AnimeGen/.DS_Store and b/AnimeGen/.DS_Store differ diff --git a/AnimeGen/APIs/Hmtai/HmtaiReader.swift b/AnimeGen/APIs Requests/Hmtai/HmtaiReader.swift similarity index 100% rename from AnimeGen/APIs/Hmtai/HmtaiReader.swift rename to AnimeGen/APIs Requests/Hmtai/HmtaiReader.swift diff --git a/AnimeGen/APIs/Hmtai/HmtaiSender.swift b/AnimeGen/APIs Requests/Hmtai/HmtaiSender.swift similarity index 100% rename from AnimeGen/APIs/Hmtai/HmtaiSender.swift rename to AnimeGen/APIs Requests/Hmtai/HmtaiSender.swift diff --git a/AnimeGen/APIs/kyoko.swift b/AnimeGen/APIs Requests/kyoko.swift similarity index 100% rename from AnimeGen/APIs/kyoko.swift rename to AnimeGen/APIs Requests/kyoko.swift index c1c54449..84a6c168 100644 --- a/AnimeGen/APIs/kyoko.swift +++ b/AnimeGen/APIs Requests/kyoko.swift @@ -66,8 +66,8 @@ extension ViewController { } else { if let newImage = UIImage(data: imageData) { self.imageView.image = newImage - self.animateImageChange(with: newImage) self.addToHistory(image: newImage) + self.animateImageChange(with: newImage) } else { print("Failed to load image data.") } diff --git a/AnimeGen/APIs/nekos-best.swift b/AnimeGen/APIs Requests/nekos-best.swift similarity index 100% rename from AnimeGen/APIs/nekos-best.swift rename to AnimeGen/APIs Requests/nekos-best.swift diff --git a/AnimeGen/APIs/nekosapi.swift b/AnimeGen/APIs Requests/nekosapi.swift similarity index 100% rename from AnimeGen/APIs/nekosapi.swift rename to AnimeGen/APIs Requests/nekosapi.swift index 97924ea5..7ffcb964 100644 --- a/AnimeGen/APIs/nekosapi.swift +++ b/AnimeGen/APIs Requests/nekosapi.swift @@ -67,8 +67,8 @@ extension ViewController { if let data = try? Data(contentsOf: imageUrl), let newImage = UIImage(data: data) { self.imageView.image = newImage self.animateImageChange(with: newImage) - self.tagsLabel.isHidden = false self.addToHistory(image: newImage) + self.tagsLabel.isHidden = false self.updateUIWithTags(tags) self.stopLoadingIndicator() } else { diff --git a/AnimeGen/APIs/nekosbot.swift b/AnimeGen/APIs Requests/nekosbot.swift similarity index 100% rename from AnimeGen/APIs/nekosbot.swift rename to AnimeGen/APIs Requests/nekosbot.swift diff --git a/AnimeGen/APIs/nekosmoe.swift b/AnimeGen/APIs Requests/nekosmoe.swift similarity index 93% rename from AnimeGen/APIs/nekosmoe.swift rename to AnimeGen/APIs Requests/nekosmoe.swift index b366ba78..a6ba660e 100644 --- a/AnimeGen/APIs/nekosmoe.swift +++ b/AnimeGen/APIs Requests/nekosmoe.swift @@ -81,9 +81,14 @@ extension ViewController { print("Image loading error: \(imageError)") } else if let imageData = imageData, let newImage = UIImage(data: imageData) { self.imageView.image = newImage - self.animateImageChange(with: newImage) self.addToHistory(image: newImage) - self.tagsLabel.isHidden = true + self.animateImageChange(with: newImage) + + if self.moetags { + self.tagsLabel.isHidden = false + } else { + self.tagsLabel.isHidden = true + } } else { print("Failed to load image data.") } diff --git a/AnimeGen/APIs/pic-re.swift b/AnimeGen/APIs Requests/pic-re.swift similarity index 100% rename from AnimeGen/APIs/pic-re.swift rename to AnimeGen/APIs Requests/pic-re.swift diff --git a/AnimeGen/APIs/purr.swift b/AnimeGen/APIs Requests/purr.swift similarity index 100% rename from AnimeGen/APIs/purr.swift rename to AnimeGen/APIs Requests/purr.swift diff --git a/AnimeGen/APIs/waifu-im.swift b/AnimeGen/APIs Requests/waifu-im.swift similarity index 100% rename from AnimeGen/APIs/waifu-im.swift rename to AnimeGen/APIs Requests/waifu-im.swift index 49213cad..dfa2a18f 100644 --- a/AnimeGen/APIs/waifu-im.swift +++ b/AnimeGen/APIs Requests/waifu-im.swift @@ -62,9 +62,9 @@ extension ViewController { if let data = try? Data(contentsOf: imageUrl), let newImage = UIImage(data: data) { DispatchQueue.main.async { self.imageView.image = newImage + self.addToHistory(image: newImage) self.animateImageChange(with: newImage) self.tagsLabel.isHidden = false - self.addToHistory(image: newImage) self.updateUIWithTags(tags) self.stopLoadingIndicator() } diff --git a/AnimeGen/APIs/waifu-it.swift b/AnimeGen/APIs Requests/waifu-it.swift similarity index 100% rename from AnimeGen/APIs/waifu-it.swift rename to AnimeGen/APIs Requests/waifu-it.swift diff --git a/AnimeGen/APIs/waifu-pics.swift b/AnimeGen/APIs Requests/waifu-pics.swift similarity index 100% rename from AnimeGen/APIs/waifu-pics.swift rename to AnimeGen/APIs Requests/waifu-pics.swift diff --git a/AnimeGen/AnimeGen.entitlements b/AnimeGen/AnimeGen.entitlements deleted file mode 100644 index c3731178..00000000 --- a/AnimeGen/AnimeGen.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.personal-information.photos-library - - - diff --git a/AnimeGen/AppDelegate.swift b/AnimeGen/AppDelegate.swift index 89a9bb7b..de28abda 100644 --- a/AnimeGen/AppDelegate.swift +++ b/AnimeGen/AppDelegate.swift @@ -2,42 +2,27 @@ // AppDelegate.swift // AnimeGen // -// Created by cranci on 11/02/24. +// Created by Francesco on 04/05/24. // import UIKit -import SwiftUI @main class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. UserDefaults.standard.register(defaults: ["enableAnimations": true]) UserDefaults.standard.register(defaults: ["enableTags": true]) UserDefaults.standard.register(defaults: ["enableGestures": true]) UserDefaults.standard.register(defaults: ["enableKyokobanner": true]) UserDefaults.standard.register(defaults: ["enableImageStartup": true]) - UserDefaults.standard.register(defaults: ["enableHistoryOvertime": true]) - - - // Tutorial View Prompt - let isFirstLaunch = !UserDefaults.standard.bool(forKey: "hasLaunchedBefore") - if isFirstLaunch { - UserDefaults.standard.set(true, forKey: "hasLaunchedBefore") - - let tutorialView = TutorialView() - .edgesIgnoringSafeArea(.all) - let hostingController = UIHostingController(rootView: tutorialView) - - window = UIWindow(frame: UIScreen.main.bounds) - window?.rootViewController = hostingController - window?.makeKeyAndVisible() - } + UserDefaults.standard.register(defaults: ["enableTime": true]) + UserDefaults.standard.register(defaults: ["enableHistory": true]) + // Override point for customization after application launch. return true } @@ -54,4 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } + + } + diff --git a/AnimeGen/Assets.xcassets/.DS_Store b/AnimeGen/Assets.xcassets/.DS_Store index 59fbf7d5..302514c2 100644 Binary files a/AnimeGen/Assets.xcassets/.DS_Store and b/AnimeGen/Assets.xcassets/.DS_Store differ diff --git a/AnimeGen/Base.lproj/Main.storyboard b/AnimeGen/Base.lproj/Main.storyboard deleted file mode 100644 index 4b7fd069..00000000 --- a/AnimeGen/Base.lproj/Main.storyboard +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnimeGen/Boarding/Main-onboard.swift b/AnimeGen/Boarding/Main-onboard.swift deleted file mode 100644 index 4c97a004..00000000 --- a/AnimeGen/Boarding/Main-onboard.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Main-onboard.swift -// AnimeGen -// -// Created by cranci on 20/04/24. -// - -import SwiftUI - -struct TutorialStep { - let text: String - let icon: String - let tintColor: Color - let position: String -} - -struct TutorialView: View { - @Environment(\.presentationMode) var presentationMode - @State private var currentStep = 0 - - var steps: [TutorialStep] { - if #available(iOS 15.0, *) { - return [ - TutorialStep(text: "Welcom to AnimeGen", icon: "star.fill", tintColor: .accentColor, position: "A simple way to enjoy anime Art"), - TutorialStep(text: "Tap the Top button to switch image providers. There are 10 API options with unique images.", icon: "bookmark.fill", tintColor: .yellow, position: "Placed on the Top Center"), - TutorialStep(text: "Hit refresh for a new image.", icon: "arrow.clockwise.circle.fill", tintColor: .secondary, position: "Placed on the Bottom Center"), - TutorialStep(text: "Show some love! Tap the heart to save an image.", icon: "heart.fill", tintColor: .red, position: "Placed on the Bottom Center Right"), - TutorialStep(text: "Rewind to the last image with the rewind icon.", icon: "arrowshape.turn.up.backward.circle.fill", tintColor: .green, position: "Placed on the Bottom Center Left"), - TutorialStep(text: "Share the current image with the share icon.", icon: "square.and.arrow.up.circle.fill", tintColor: .purple, position: "Placed on the Bottom Right Corner"), - TutorialStep(text: "Access the image URL with the Safari icon.", icon: "safari.fill", tintColor: .blue, position: "Placed on the Bottom Left Corner"), - TutorialStep(text: "Gear up! Tap the gear icon to tweak settings.", icon: "gearshape", tintColor: .gray, position: "Placed on the Top Left Corner"), - TutorialStep(text: "Check out the session history with the clock icon in the top right.", icon: "clock.arrow.circlepath", tintColor: .pink, position: "Placed on the Top Right Corner"), - TutorialStep(text: "AnimeGen care about your privacy. Nothing is stored!", icon: "shield.fill", tintColor: .orange, position: "Visit Settings → About, to learn more."), - TutorialStep(text: "Enjoy your Stay!", icon: "photo.on.rectangle.angled", tintColor: .accentColor, position: "Don't forget to share your feedbacks!") - ] - } else { - return [ - TutorialStep(text: "Welcom to AnimeGen", icon: "star.fill", tintColor: .accentColor, position: "A simple way to enjoy anime Art"), - TutorialStep(text: "Tap the Top button to switch image providers. There are 10 API options with unique images.", icon: "bookmark.fill", tintColor: .yellow, position: "Placed on the Top Center"), - TutorialStep(text: "Hit refresh for a new image.", icon: "arrow.clockwise.circle.fill", tintColor: .secondary, position: "Placed on the Bottom Center"), - TutorialStep(text: "Show some love! Tap the heart to save an image.", icon: "heart.fill", tintColor: .red, position: "Placed on the Bottom Center Right"), - TutorialStep(text: "Rewind to the last image with the rewind icon.", icon: "arrowshape.turn.up.backward.circle.fill", tintColor: .green, position: "Placed on the Bottom Center Left"), - TutorialStep(text: "Share the current image with the share icon.", icon: "square.and.arrow.up.on.square.fill", tintColor: .purple, position: "Placed on the Bottom Right Corner"), - TutorialStep(text: "Access the image URL with the Safari icon.", icon: "safari.fill", tintColor: .blue, position: "Placed on the Bottom Left Corner"), - TutorialStep(text: "Gear up! Tap the gear icon to tweak settings.", icon: "gearshape", tintColor: .gray, position: "Placed on the Top Left Corner"), - TutorialStep(text: "Check out the session history with the clock icon in the top right.", icon: "clock.arrow.circlepath", tintColor: .pink, position: "Placed on the Top Right Corner"), - TutorialStep(text: "AnimeGen care about your privacy. Nothing is stored!", icon: "shield.fill", tintColor: .orange, position: "Visit Settings → About, to learn more."), - TutorialStep(text: "Enjoy your Stay!", icon: "photo.on.rectangle.angled", tintColor: .accentColor, position: "Don't forget to share your feedbacks!") - ] - } - } - - var body: some View { - GeometryReader { geometry in - ZStack { - VStack { - Spacer() - - VStack { - if currentStep < steps.count { - ZStack { - Image(systemName: steps[currentStep].icon) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 120, height: 120) - .padding() - .foregroundColor(steps[currentStep].tintColor) - .onTapGesture { - self.nextButtonTapped() - } - } - - Text(steps[currentStep].text) - .font(.title) - .fontWeight(.semibold) - .multilineTextAlignment(.center) - .padding() - .foregroundColor(.primary) - - Text(steps[currentStep].position) - .font(.headline) - .multilineTextAlignment(.center) - .padding() - .foregroundColor(.primary) - } - } - - Spacer() - - HStack(spacing: 30) { - Button(action: { - self.previousButtonTapped() - }) { - Text("Previous") - .font(.headline) - .foregroundColor(.primary) - .padding() - .frame(maxWidth: .infinity) - .background( - RoundedRectangle(cornerRadius: 25) - .fill(steps[currentStep].tintColor) - ) - } - - Spacer() - - Button(action: { - if self.currentStep == self.steps.count - 1 { - self.presentationMode.wrappedValue.dismiss() - } else { - self.nextButtonTapped() - } - }) { - Text(self.currentStep == self.steps.count - 1 ? "Finish" : "Next") - .font(.headline) - .foregroundColor(.primary) - .padding() - .frame(maxWidth: .infinity) - .background( - RoundedRectangle(cornerRadius: 25) - .fill(steps[currentStep].tintColor) - ) - } - } - - HStack { - ForEach(0.. 0 { - currentStep -= 1 - } - } -} - -struct TutorialView_Previews: PreviewProvider { - static var previews: some View { - TutorialView() - .previewDevice("iPhone 13 mini") - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Buttons/HearthButton.swift b/AnimeGen/Buttons func/HeartButton.swift similarity index 95% rename from AnimeGen/Buttons/HearthButton.swift rename to AnimeGen/Buttons func/HeartButton.swift index 8cce71d4..9a69272e 100644 --- a/AnimeGen/Buttons/HearthButton.swift +++ b/AnimeGen/Buttons func/HeartButton.swift @@ -1,8 +1,8 @@ // -// HearthButton.swift +// HeartButton.swift // AnimeGen // -// Created by cranci on 20/03/24. +// Created by cranci on 05/05/24. // import UIKit @@ -11,7 +11,7 @@ import MobileCoreServices extension ViewController { - @objc func heartButtonTapped() { + @IBAction func heartButtonTapped() { guard let image = imageView.image else { return } @@ -56,5 +56,4 @@ extension ViewController { print("Image saved successfully") } } - } diff --git a/AnimeGen/Buttons/History-Butt.swift b/AnimeGen/Buttons func/HistoryButton.swift similarity index 64% rename from AnimeGen/Buttons/History-Butt.swift rename to AnimeGen/Buttons func/HistoryButton.swift index a1991107..11384e25 100644 --- a/AnimeGen/Buttons/History-Butt.swift +++ b/AnimeGen/Buttons func/HistoryButton.swift @@ -1,17 +1,16 @@ // -// History-Butt.swift +// HistoryButton.swift // AnimeGen // -// Created by cranci on 24/03/24. +// Created by cranci on 05/05/24. // import UIKit import SwiftUI -import Photos extension ViewController { - @objc func historyButtonTapped() { + @IBAction func historyButtonTapped() { let history = HistoryView() let hostingController = UIHostingController(rootView: history) @@ -19,7 +18,10 @@ extension ViewController { } func addToHistory(image: UIImage) { - ImageHistory.addImage(image) + if HistoryTrue { + ImageHistory.addImage(image) + } } } + diff --git a/AnimeGen/Buttons/Refresh-API-Button.swift b/AnimeGen/Buttons func/Refresh-API-Button.swift similarity index 96% rename from AnimeGen/Buttons/Refresh-API-Button.swift rename to AnimeGen/Buttons func/Refresh-API-Button.swift index a5782eed..0ba87c57 100644 --- a/AnimeGen/Buttons/Refresh-API-Button.swift +++ b/AnimeGen/Buttons func/Refresh-API-Button.swift @@ -1,15 +1,15 @@ // -// Refresh-Button.swift +// Refresh-API-Button.swift // AnimeGen // -// Created by cranci on 20/03/24. +// Created by cranci on 05/05/24. // import UIKit extension ViewController { - @objc func refreshButtonTapped() { + @IBAction func refreshButtonTapped() { guard let title = apiButton.title(for: .normal) else { return } diff --git a/AnimeGen/Buttons func/RewindButton.swift b/AnimeGen/Buttons func/RewindButton.swift new file mode 100644 index 00000000..ac9a5f5a --- /dev/null +++ b/AnimeGen/Buttons func/RewindButton.swift @@ -0,0 +1,18 @@ +// +// RewindButton.swift +// AnimeGen +// +// Created by cranci on 05/05/24. +// + +import UIKit + +extension ViewController { + + @IBAction func rewindButtonTapped() { + if let lastImage = lastImage { + animateImageChange(with: lastImage) + } + } + +} diff --git a/AnimeGen/Buttons/Web-Share.swift b/AnimeGen/Buttons func/Web-Share.swift similarity index 95% rename from AnimeGen/Buttons/Web-Share.swift rename to AnimeGen/Buttons func/Web-Share.swift index f9a606bf..2b259543 100644 --- a/AnimeGen/Buttons/Web-Share.swift +++ b/AnimeGen/Buttons func/Web-Share.swift @@ -2,7 +2,7 @@ // Web-Share.swift // AnimeGen // -// Created by cranci on 20/03/24. +// Created by cranci on 05/05/24. // import UIKit diff --git a/AnimeGen/Buttons/Rewind-Settings.swift b/AnimeGen/Buttons/Rewind-Settings.swift deleted file mode 100644 index 76b25bbe..00000000 --- a/AnimeGen/Buttons/Rewind-Settings.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// Rewind-Settings.swift -// AnimeGen -// -// Created by cranci on 20/03/24. -// - -import SwiftUI - -extension ViewController { - - @objc func rewindButtonTapped() { - if let lastImage = lastImage { - animateImageChange(with: lastImage) - } - } - - @objc func settingsButtonTapped() { - let settingsPage = SettingsPage() - let hostingController = UIHostingController(rootView: settingsPage) - - present(hostingController, animated: true, completion: nil) - } - -} diff --git a/AnimeGen/Buttons/Activity.swift b/AnimeGen/Extension/Activity.swift similarity index 98% rename from AnimeGen/Buttons/Activity.swift rename to AnimeGen/Extension/Activity.swift index 13bbf889..d02fc7da 100644 --- a/AnimeGen/Buttons/Activity.swift +++ b/AnimeGen/Extension/Activity.swift @@ -2,7 +2,7 @@ // Activity.swift // AnimeGen // -// Created by cranci on 30/03/24. +// Created by cranci on 05/05/24. // import UIKit @@ -59,3 +59,4 @@ extension ViewController { } } + diff --git a/AnimeGen/Extensions/Gradient.swift b/AnimeGen/Extension/Gradient.swift similarity index 95% rename from AnimeGen/Extensions/Gradient.swift rename to AnimeGen/Extension/Gradient.swift index 355b6f14..39f30d77 100644 --- a/AnimeGen/Extensions/Gradient.swift +++ b/AnimeGen/Extension/Gradient.swift @@ -2,7 +2,7 @@ // Gradient.swift // AnimeGen // -// Created by cranci on 22/04/24. +// Created by cranci on 05/05/24. // import UIKit diff --git a/AnimeGen/Extensions/ImageExtensions.swift b/AnimeGen/Extension/ImageExtensions.swift similarity index 95% rename from AnimeGen/Extensions/ImageExtensions.swift rename to AnimeGen/Extension/ImageExtensions.swift index c3ad6930..27cd803f 100644 --- a/AnimeGen/Extensions/ImageExtensions.swift +++ b/AnimeGen/Extension/ImageExtensions.swift @@ -2,7 +2,7 @@ // ImageExtensions.swift // AnimeGen // -// Created by cranci on 17/02/24. +// Created by cranci on 05/05/24. // import UIKit @@ -35,3 +35,4 @@ extension UIImageView { } } } + diff --git a/AnimeGen/Extensions/UIExtensions.swift b/AnimeGen/Extension/Tags.swift similarity index 97% rename from AnimeGen/Extensions/UIExtensions.swift rename to AnimeGen/Extension/Tags.swift index 118ab297..0726e74e 100644 --- a/AnimeGen/Extensions/UIExtensions.swift +++ b/AnimeGen/Extension/Tags.swift @@ -1,8 +1,8 @@ // -// UIExtensions.swift +// Tags.swift // AnimeGen // -// Created by cranci on 17/02/24. +// Created by cranci on 05/05/24. // import UIKit @@ -77,5 +77,4 @@ extension ViewController { self.imageView.image = newImage }, completion: nil) } - } diff --git a/AnimeGen/Extensions/popup-Banner.swift b/AnimeGen/Extension/popup-Banner.swift similarity index 97% rename from AnimeGen/Extensions/popup-Banner.swift rename to AnimeGen/Extension/popup-Banner.swift index a2469c3d..cfb800ab 100644 --- a/AnimeGen/Extensions/popup-Banner.swift +++ b/AnimeGen/Extension/popup-Banner.swift @@ -2,7 +2,7 @@ // popup-Banner.swift // AnimeGen // -// Created by cranci on 17/04/24. +// Created by cranci on 05/05/24. // import UIKit diff --git a/AnimeGen/History/HistoryView.swift b/AnimeGen/History/HistoryView.swift index 749bd649..f4fea4f3 100644 --- a/AnimeGen/History/HistoryView.swift +++ b/AnimeGen/History/HistoryView.swift @@ -2,7 +2,7 @@ // HistoryView.swift // AnimeGen // -// Created by cranci on 24/03/24. +// Created by cranci on 05/05/24. // import SwiftUI diff --git a/AnimeGen/History/ImageHistory.swift b/AnimeGen/History/ImageHistory.swift index 93b667b4..b7e12cd6 100644 --- a/AnimeGen/History/ImageHistory.swift +++ b/AnimeGen/History/ImageHistory.swift @@ -2,54 +2,15 @@ // ImageHistory.swift // AnimeGen // -// Created by cranci on 24/03/24. +// Created by cranci on 05/05/24. // -import Foundation import UIKit struct ImageHistory { - static var images: [UIImage] { - get { - if UserDefaults.standard.bool(forKey: "enableHistoryOvertime") { - if let data = UserDefaults.standard.data(forKey: "imageHistory") { - do { - let images = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSArray.self, UIImage.self], from: data) as? [UIImage] - return images ?? [] - } catch { - print("Error unarchiving image history:", error) - return [] - } - } else { - return [] - } - } else { - return storedImages - } - } - set { - if UserDefaults.standard.bool(forKey: "enableHistoryOvertime") { - do { - let data = try NSKeyedArchiver.archivedData(withRootObject: newValue, requiringSecureCoding: true) - UserDefaults.standard.set(data, forKey: "imageHistory") - } catch { - print("Error archiving image history:", error) - } - } else { - storedImages = newValue - } - } - } - - private static var storedImages: [UIImage] = [] + static var images: [UIImage] = [] static func addImage(_ image: UIImage) { - if UserDefaults.standard.bool(forKey: "enableHistoryOvertime") { - var currentImages = images - currentImages.append(image) - images = currentImages - } else { - storedImages.append(image) - } + images.append(image) } } diff --git a/AnimeGen/Info.plist b/AnimeGen/Info.plist index 18535575..dd3c9afd 100644 --- a/AnimeGen/Info.plist +++ b/AnimeGen/Info.plist @@ -2,22 +2,6 @@ - NSPhotoLibraryAddUsageDescription - The photo Library Addition is required to save images. - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - - - CFBundleIconName - - UIPrerenderedIcon - - - UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/AnimeGen/Base.lproj/LaunchScreen.storyboard b/AnimeGen/LaunchScreen.storyboard similarity index 100% rename from AnimeGen/Base.lproj/LaunchScreen.storyboard rename to AnimeGen/LaunchScreen.storyboard diff --git a/AnimeGen/Main.storyboard b/AnimeGen/Main.storyboard new file mode 100644 index 00000000..ee0e7f40 --- /dev/null +++ b/AnimeGen/Main.storyboard @@ -0,0 +1,1689 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App Animations: Choose to show or hide animations for: + + - New Image Generation + - Previous Image + - Save Image + +Background Gradient: Opt to show or hide a violet gradient background. (App Restart is required) + +Display Activity Label: Choose to show or hide an activity control label displaying session time and images generated. (App Restart is required) + +Enable Gestures: Enable to utilize app gestures: (App Restart is required) + + - Swipe Left to Right: Last Image + - Swipe Right to Left: Generate New Image + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default API Selection: You can customize your preferred API that the app will utilize upon opening. (Only works when opening the App) + +Load Image on Startup: You can choose whether to generate an image when the app starts or not. + +Display of Tags: You have control over whether to display tags associated with each image. + +Display nekos.moe Tags: You can choose whether to show or hide tags sourced from the nekos.moe API. (App Restart is required) + +Kyoko 'Note' Banner: You'll be notified with a special banner for the Kyoko API since it's very slow. (App Restart is required) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AnimeGen prioritizes user privacy and does not store any personal data. All generated images are not retained by the app. If a user chooses to save an image, it will only be stored locally in their device's gallery or on the HistoryView. We are committed to ensuring a secure and private experience for our users. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copyright © 2023-2024 cranci. All rights reserved. + +AnimeGen is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +AnimeGen is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with AnimeGen. If not, see <http://www.gnu.org/licenses/>. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AnimeGen/SceneDelegate.swift b/AnimeGen/SceneDelegate.swift index ffbabc61..9d34e04b 100644 --- a/AnimeGen/SceneDelegate.swift +++ b/AnimeGen/SceneDelegate.swift @@ -2,11 +2,10 @@ // SceneDelegate.swift // AnimeGen // -// Created by cranci on 11/02/24. +// Created by Francesco on 04/05/24. // import UIKit -import SwiftUI class SceneDelegate: UIResponder, UIWindowSceneDelegate { @@ -47,5 +46,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } + + } diff --git a/AnimeGen/Settings/.DS_Store b/AnimeGen/Settings/.DS_Store index ea35cc34..9db38b74 100644 Binary files a/AnimeGen/Settings/.DS_Store and b/AnimeGen/Settings/.DS_Store differ diff --git a/AnimeGen/Settings/API.xcassets/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/Hmtai.imageset/0754DB9D-0AAA-4AB2-8F94-D34DBBF58ADF.png b/AnimeGen/Settings/About-Credits/API.xcassets/Hmtai.imageset/0754DB9D-0AAA-4AB2-8F94-D34DBBF58ADF.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/Hmtai.imageset/0754DB9D-0AAA-4AB2-8F94-D34DBBF58ADF.png rename to AnimeGen/Settings/About-Credits/API.xcassets/Hmtai.imageset/0754DB9D-0AAA-4AB2-8F94-D34DBBF58ADF.png diff --git a/AnimeGen/Settings/API.xcassets/Hmtai.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/Hmtai.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/Hmtai.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/Hmtai.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/NekoBot.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/NekoBot.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/NekoBot.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/NekoBot.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/NekoBot.imageset/apple-touch-icon-removebg-preview.png b/AnimeGen/Settings/About-Credits/API.xcassets/NekoBot.imageset/apple-touch-icon-removebg-preview.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/NekoBot.imageset/apple-touch-icon-removebg-preview.png rename to AnimeGen/Settings/About-Credits/API.xcassets/NekoBot.imageset/apple-touch-icon-removebg-preview.png diff --git a/AnimeGen/Settings/API.xcassets/Purr.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/Purr.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/Purr.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/Purr.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/Purr.imageset/avatar.png b/AnimeGen/Settings/About-Credits/API.xcassets/Purr.imageset/avatar.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/Purr.imageset/avatar.png rename to AnimeGen/Settings/About-Credits/API.xcassets/Purr.imageset/avatar.png diff --git a/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/Contents.json new file mode 100644 index 00000000..3f3a9cae --- /dev/null +++ b/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "SDWebImage_logo_small.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/SDWebImage_logo_small.png b/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/SDWebImage_logo_small.png new file mode 100644 index 00000000..b10d6b31 Binary files /dev/null and b/AnimeGen/Settings/About-Credits/API.xcassets/SD.imageset/SDWebImage_logo_small.png differ diff --git a/AnimeGen/Settings/API.xcassets/kyoko.imageset/68747470733a2f2f692e6962622e636f2f737979315036672f6b796f6b6f2e77656270.png b/AnimeGen/Settings/About-Credits/API.xcassets/kyoko.imageset/68747470733a2f2f692e6962622e636f2f737979315036672f6b796f6b6f2e77656270.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/kyoko.imageset/68747470733a2f2f692e6962622e636f2f737979315036672f6b796f6b6f2e77656270.png rename to AnimeGen/Settings/About-Credits/API.xcassets/kyoko.imageset/68747470733a2f2f692e6962622e636f2f737979315036672f6b796f6b6f2e77656270.png diff --git a/AnimeGen/Settings/API.xcassets/kyoko.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/kyoko.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/kyoko.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/kyoko.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/nekos.best.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/nekos.best.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekos.best.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/nekos.best.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/nekos.best.imageset/favicon.png b/AnimeGen/Settings/About-Credits/API.xcassets/nekos.best.imageset/favicon.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekos.best.imageset/favicon.png rename to AnimeGen/Settings/About-Credits/API.xcassets/nekos.best.imageset/favicon.png diff --git a/AnimeGen/Settings/API.xcassets/nekos.moe.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/nekos.moe.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekos.moe.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/nekos.moe.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/nekos.moe.imageset/apple-touch-icon.png b/AnimeGen/Settings/About-Credits/API.xcassets/nekos.moe.imageset/apple-touch-icon.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekos.moe.imageset/apple-touch-icon.png rename to AnimeGen/Settings/About-Credits/API.xcassets/nekos.moe.imageset/apple-touch-icon.png diff --git a/AnimeGen/Settings/API.xcassets/nekosapi.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/nekosapi.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekosapi.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/nekosapi.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/nekosapi.imageset/logo-removebg-preview.png b/AnimeGen/Settings/About-Credits/API.xcassets/nekosapi.imageset/logo-removebg-preview.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/nekosapi.imageset/logo-removebg-preview.png rename to AnimeGen/Settings/About-Credits/API.xcassets/nekosapi.imageset/logo-removebg-preview.png diff --git a/AnimeGen/Settings/API.xcassets/pic-re.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/pic-re.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/pic-re.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/pic-re.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/pic-re.imageset/download.png b/AnimeGen/Settings/About-Credits/API.xcassets/pic-re.imageset/download.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/pic-re.imageset/download.png rename to AnimeGen/Settings/About-Credits/API.xcassets/pic-re.imageset/download.png diff --git a/AnimeGen/Settings/API.xcassets/waifu.im.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.im.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.im.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.im.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/waifu.im.imageset/favicon.ico.png b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.im.imageset/favicon.ico.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.im.imageset/favicon.ico.png rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.im.imageset/favicon.ico.png diff --git a/AnimeGen/Settings/API.xcassets/waifu.it.imageset/79479798.png b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.it.imageset/79479798.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.it.imageset/79479798.png rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.it.imageset/79479798.png diff --git a/AnimeGen/Settings/API.xcassets/waifu.it.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.it.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.it.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.it.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/waifu.pics.imageset/Contents.json b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.pics.imageset/Contents.json similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.pics.imageset/Contents.json rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.pics.imageset/Contents.json diff --git a/AnimeGen/Settings/API.xcassets/waifu.pics.imageset/favicon-1-_dragged_.png b/AnimeGen/Settings/About-Credits/API.xcassets/waifu.pics.imageset/favicon-1-_dragged_.png similarity index 100% rename from AnimeGen/Settings/API.xcassets/waifu.pics.imageset/favicon-1-_dragged_.png rename to AnimeGen/Settings/About-Credits/API.xcassets/waifu.pics.imageset/favicon-1-_dragged_.png diff --git a/AnimeGen/Settings/About-Credits/APIsCredits.swift b/AnimeGen/Settings/About-Credits/APIsCredits.swift new file mode 100644 index 00000000..093ddd9f --- /dev/null +++ b/AnimeGen/Settings/About-Credits/APIsCredits.swift @@ -0,0 +1,85 @@ +// +// APIsCredits.swift +// AnimeGen +// +// Created by cranci on 06/05/24. +// + +import UIKit + +class APIsCredits: UITableViewController { + + // URLs + let picre = "https://pic.re" + let waifuim = "https://waifu.im" + let waifupics = "https://waifu.pics" + let waifuit = "https://waifu.it/" + let nekosbest = "https://nekos.best" + let nekosapi = "https://nekosapi.com" + let nekosmoe = "https://nekos.moe" + let NekoBot = "https://nekobot.xyz" + let Hmtai = "https://hmtai.hatsunia.cfd/endpoints" + let kyoko = "https://api.rei.my.id/docs/ANIME/WAIFU-Generator/" + let purrbot = "https://purrbot.site/" + let SDweb = "https://github.com/SDWebImage/SDWebImage" + + override func viewDidLoad() { + super.viewDidLoad() + } + + func openURL(_ urlString: String) { + if let url = URL(string: urlString) { + UIApplication.shared.open(url) + } + } + + @IBAction func picre(_ sender: UITapGestureRecognizer) { + openURL(picre) + } + + @IBAction func waifuim(_ sender: UITapGestureRecognizer) { + openURL(waifuim) + } + + @IBAction func waifupics(_ sender: UITapGestureRecognizer) { + openURL(waifupics) + } + + @IBAction func waifuit(_ sender: UITapGestureRecognizer) { + openURL(waifuit) + } + + @IBAction func nekosbest(_ sender: UITapGestureRecognizer) { + openURL(nekosbest) + } + + @IBAction func nekosapi(_ sender: UITapGestureRecognizer) { + openURL(nekosapi) + } + + @IBAction func nekosmoe(_ sender: UITapGestureRecognizer) { + openURL(nekosmoe) + } + + @IBAction func nekobot(_ sender: UITapGestureRecognizer) { + openURL(NekoBot) + } + + @IBAction func Hmtai(_ sender: UITapGestureRecognizer) { + openURL(Hmtai) + } + + @IBAction func kyoko(_ sender: UITapGestureRecognizer) { + openURL(kyoko) + } + + @IBAction func purrbot(_ sender: UITapGestureRecognizer) { + openURL(purrbot) + } + + @IBAction func SDweb(_ sender: UITapGestureRecognizer) { + openURL(SDweb) + } + +} + diff --git a/AnimeGen/Settings/About-Credits/AboutPage.swift b/AnimeGen/Settings/About-Credits/AboutPage.swift index 0307f56f..424188ed 100644 --- a/AnimeGen/Settings/About-Credits/AboutPage.swift +++ b/AnimeGen/Settings/About-Credits/AboutPage.swift @@ -2,98 +2,65 @@ // AboutPage.swift // AnimeGen // -// Created by cranci on 18/02/24. +// Created by cranci on 06/05/24. // -import SwiftUI +import UIKit -struct AboutPage: View { +class AboutPageViewController: UITableViewController { - let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "N/A" - let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "N/A" + // Outlets for labels + @IBOutlet weak var versionLabel: UILabel! + @IBOutlet weak var buildLabel: UILabel! + @IBOutlet weak var privacyLabel: UILabel! + @IBOutlet weak var licenseLabel: UILabel! - var body: some View { - NavigationView { - Form { - Section(header: Text("App info"), - footer: Text("AnimeGen is a free, open source iOS app, developed by cranci. The app is under the GNU General Public License version 3.")) { - InfoRow(title: "Version", value: appVersion) - InfoRow(title: "Build", value: appBuild) - LinkRow(title: "Github Repository", url: "https://github.com/cranci1/AnimeGen/") - LinkRow(title: "Report an Issue", url: "https://github.com/cranci1/AnimeGen/issues") - } - - Section(header: Text("Privacy"), - footer: Text("AnimeGen prioritizes user privacy and does not store any personal data. All generated images are not retained by the app. If a user chooses to save an image, it will only be stored locally in their device's gallery except for the Hmtai API. We are committed to ensuring a secure and private experience for our users.")) { - LinkRow(title: "Review the code", url: "https://github.com/cranci1/AnimeGen/tree/main") - LinkRow(title: "Hmtai API Privacy", url: "https://github.com/cranci1/AnimeGen/blob/main/Privacy/Hmtai.md") - } - - Section(header: Text("License"), - footer: Text(""" - Copyright © 2023-2024 cranci. All rights reserved. - - AnimeGen is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - AnimeGen is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with AnimeGen. If not, see . - """)) { - LinkRow(title: "Full License", url: "https://github.com/cranci1/AnimeGen/blob/main/LICENSE") - } - } - .navigationBarHidden(true) + // URLs + let githubURL = "https://github.com/cranci1/AnimeGen/" + let reportIssueURL = "https://github.com/cranci1/AnimeGen/issues" + let reviewCodeURL = "https://github.com/cranci1/AnimeGen/tree/main" + let hmtaiPrivacyURL = "https://github.com/cranci1/AnimeGen/blob/main/Privacy/Hmtai.md" + let fullLicenseURL = "https://github.com/cranci1/AnimeGen/blob/main/LICENSE" + + override func viewDidLoad() { + super.viewDidLoad() + + if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String { + versionLabel.text = "Version: \(appVersion)" + } else { + versionLabel.text = "Version: N/A" + } + + if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String { + buildLabel.text = "Build: \(appBuild)" + } else { + buildLabel.text = "Build: N/A" } - .navigationBarTitle("About", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) } -} - -struct InfoRow: View { - let title: String - let value: String - var body: some View { - HStack { - Text("\(title): \(value)") + func openURL(_ urlString: String) { + if let url = URL(string: urlString) { + UIApplication.shared.open(url) } } -} - -struct LinkRow: View { - let title: String - let url: String - var body: some View { - HStack { - Text(title) - .foregroundColor(.accentColor) - .onTapGesture { - if let url = URL(string: self.url) { - UIApplication.shared.open(url) - } - } - Image(systemName: "arrow.right.circle.fill") - .foregroundColor(.accentColor) - .onTapGesture { - if let url = URL(string: self.url) { - UIApplication.shared.open(url) - } - } - } + @IBAction func githubTapped(_ sender: UITapGestureRecognizer) { + openURL(githubURL) } -} - -struct AboutPage_Previews: PreviewProvider { - static var previews: some View { - AboutPage() - .preferredColorScheme(.dark) + + @IBAction func reportIssueTapped(_ sender: UITapGestureRecognizer) { + openURL(reportIssueURL) + } + + @IBAction func reviewCodeTapped(_ sender: UITapGestureRecognizer) { + openURL(reviewCodeURL) + } + + @IBAction func hmtaiPrivacyTapped(_ sender: UITapGestureRecognizer) { + openURL(hmtaiPrivacyURL) + } + + @IBAction func fullLicenseTapped(_ sender: UITapGestureRecognizer) { + openURL(fullLicenseURL) } } diff --git a/AnimeGen/Settings/About-Credits/ApiPage.swift b/AnimeGen/Settings/About-Credits/ApiPage.swift deleted file mode 100644 index 93b53fa9..00000000 --- a/AnimeGen/Settings/About-Credits/ApiPage.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// ApiPage.swift -// AnimeGen -// -// Created by cranci on 25/02/24. -// - -import SwiftUI - -struct ApiPage: View { - struct APIInfo: Hashable { - let imageName: String - let apiName: String - let url: URL - } - - let apiData: [APIInfo] = [ - APIInfo(imageName: "pic-re", apiName: "pic.re", url: URL(string: "https://pic.re")!), - APIInfo(imageName: "waifu.im", apiName: "waifu.im", url: URL(string: "https://waifu.im")!), - APIInfo(imageName: "waifu.pics", apiName: "waifu.pics", url: URL(string: "https://waifu.pics")!), - APIInfo(imageName: "waifu.it", apiName: "waifu.it", url: URL(string: "https://waifu.it/")!), - APIInfo(imageName: "nekos.best", apiName: "nekos.best", url: URL(string: "https://nekos.best")!), - APIInfo(imageName: "nekosapi", apiName: "nekosapi.com", url: URL(string: "https://nekosapi.com")!), - APIInfo(imageName: "nekos.moe", apiName: "nekos.moe", url: URL(string: "https://nekos.moe")!), - APIInfo(imageName: "NekoBot", apiName: "NekoBot", url: URL(string: "https://nekobot.xyz")!), - APIInfo(imageName: "Hmtai", apiName: "Hmtai", url: URL(string: "https://hmtai.hatsunia.cfd/endpoints")!), - APIInfo(imageName: "kyoko", apiName: "Kyoko", url: URL(string: "https://api.rei.my.id/docs/ANIME/WAIFU-Generator/")!), - APIInfo(imageName: "Purr", apiName: "Purr", url: URL(string: "https://purrbot.site/")!) - ] - - var body: some View { - NavigationView { - ScrollView { - VStack(spacing: 20) { - ForEach(Array(apiData.enumerated()), id: \.element.self) { index, data in - if index != apiData.count - 1 { - APIRow(data: data) - } else { - VStack(spacing: 10) { - APIRow(data: data) - THanksSection() - } - } - } - } - .padding() - } - .navigationBarHidden(true) - } - .navigationBarTitle("APIs Credit", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } -} - -struct THanksSection: View { - var body: some View { - VStack(spacing: 10) { - Text("Special Thanks") - .font(.title) - .fontWeight(.bold) - Text("Special thanks to all the developers who provided these APIs for public use. Without them, this project wouldn't exist. Thank you very much!") - .font(.caption) - .fontWeight(.semibold) - .foregroundColor(.secondary) - .multilineTextAlignment(.center) - } - .padding() - .background(Color.secondary.opacity(0.1)) - .cornerRadius(10) - } -} - -struct APIRow: View { - let data: ApiPage.APIInfo - - var body: some View { - HStack { - Image(data.imageName) - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: 80, height: 80) - .cornerRadius(10) - .onTapGesture { - openURL(data.url) - } - - VStack(alignment: .leading) { - Text(data.apiName) - .font(.title) - .foregroundColor(.accentColor) - .padding(.vertical, 10) - .onTapGesture { - openURL(data.url) - } - } - .padding(.horizontal, 10) - Spacer() - } - .background(Color.secondary.opacity(0.1)) - .cornerRadius(10) - } - - private func openURL(_ url: URL) { - UIApplication.shared.open(url) - } -} - -struct ApiPage_Preview: PreviewProvider { - static var previews: some View { - ApiPage() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Settings/App Settings/API-Pref.swift b/AnimeGen/Settings/App Settings/API-Pref.swift deleted file mode 100644 index fd8477db..00000000 --- a/AnimeGen/Settings/App Settings/API-Pref.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// API-Pref.swift -// AnimeGen -// -// Created by cranci on 30/04/24. -// - -import SwiftUI - -struct APIPreferences: View { - - // API preferences - @State private var loadstart = UserDefaults.standard.bool(forKey: "enableImageStartup") - @State private var tags = UserDefaults.standard.bool(forKey: "enableTags") - @State private var moetags = UserDefaults.standard.bool(forKey: "enableMoeTags") - @State private var kyokobanner = UserDefaults.standard.bool(forKey: "enableKyokobanner") - - // Default API - @State private var isPresentingActionSheet = false - @State private var selectedChoiceIndex = UserDefaults.standard.integer(forKey: "SelectedChoiceIndex") - - let choices = ["waifu.im", "pic.re", "waifu.pics", "waifu.it", "nekos.best", "Nekos api", "nekos.moe", "NekoBot", "kyoko", "Purr"] - - var body: some View { - NavigationView { - Form { - Section(footer: Text(""" - Default API Selection: You can customize your preferred API that the app will utilize upon opening. (Only works when opening the App) - - Load Image on Startup: You can choose whether to generate an image when the app starts or not. - - Display of Tags: You have control over whether to display tags associated with each image. - - Display nekos.moe Tags: You can choose whether to show or hide tags sourced from the nekos.moe API. (App Restart is required) - - Kyoko 'Note' Banner: You'll be notified with a special banner for the Kyoko API since it's very slow. (App Restart is required) - """)) { - Button(action: { - isPresentingActionSheet = true - }) { - HStack { - Text("Default API") - .foregroundColor(.primary) - Spacer() - Text(choices[selectedChoiceIndex]) - .foregroundColor(.accentColor) - } - } - .actionSheet(isPresented: $isPresentingActionSheet) { - ActionSheet(title: Text("Choose Default API"), buttons: [ - .default(Text("Purr")) { updateSelectedChoiceIndex(9) }, - .default(Text("kyoko")) { updateSelectedChoiceIndex(8) }, - .default(Text("NekoBot")) { updateSelectedChoiceIndex(7) }, - .default(Text("nekos.moe")) { updateSelectedChoiceIndex(6) }, - .default(Text("Nekos api")) { updateSelectedChoiceIndex(5) }, - .default(Text("nekos.best")) { updateSelectedChoiceIndex(4) }, - .default(Text("waifu.it")) { updateSelectedChoiceIndex(3) }, - .default(Text("waifu.pics")) { updateSelectedChoiceIndex(2) }, - .default(Text("waifu.im")) { updateSelectedChoiceIndex(0) }, - .default(Text("pic.re")) { updateSelectedChoiceIndex(1) }, - .cancel() - ]) - } - .onAppear { - selectedChoiceIndex = UserDefaults.standard.integer(forKey: "SelectedChoiceIndex") - } - .onDisappear { - UserDefaults.standard.set(selectedChoiceIndex, forKey: "SelectedChoiceIndex") - NotificationCenter.default.post(name: Notification.Name("SelectedChoiceChanged"), object: selectedChoiceIndex) - } - - Toggle("Load Image on Startup", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableImageStartup") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableImageStartup") - } - )) - - Toggle("Display Tags", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableTags") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableTags") - } - )) - Toggle("Display nekos.moe Tags", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableMoeTags") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableMoeTags") - } - )) - Toggle("Kyoko 'Note' banner", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableKyokobanner") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableKyokobanner") - } - )) - - } - } - .navigationBarHidden(true) - } - .navigationBarTitle("APIs Preferences", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } - - private func updateSelectedChoiceIndex(_ index: Int) { - selectedChoiceIndex = index - UserDefaults.standard.set(index, forKey: "SelectedChoiceIndex") - NotificationCenter.default.post(name: Notification.Name("SelectedChoiceChanged"), object: index) - } - -} - -struct APIPref_Preview: PreviewProvider { - static var previews: some View { - APIPreferences() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Settings/App Settings/Content.swift b/AnimeGen/Settings/App Settings/Content.swift deleted file mode 100644 index 8f9e75c8..00000000 --- a/AnimeGen/Settings/App Settings/Content.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Content.swift -// AnimeGen -// -// Created by cranci on 30/04/24. -// - -import SwiftUI - -struct Contents: View { - - // Content - @State private var explicitCont = UserDefaults.standard.bool(forKey: "enableExplictiCont") - @State private var showAlert = false - - var body: some View { - NavigationView { - Form { - Section(footer: Text(""" - This content is on the borderline of explicit material and includes adult content. Viewer discretion is advised. - """)) { - - Toggle("Explicit Contents", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableExplictiCont") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableExplictiCont") - if newValue { - self.showAlert = true - } - } - )) - - } - } - .navigationBarHidden(true) - .alert(isPresented: $showAlert) { - Alert( - title: Text("Are you sure?"), - message: Text("Enabling explicit content may not be suitable for all audiences. Are you sure you want to proceed?"), - primaryButton: .default(Text("Enable"), action: { - self.explicitCont = true - UserDefaults.standard.set(true, forKey: "enableExplictiCont") - }), - secondaryButton: .cancel(Text("Cancel")) - ) - } - } - .navigationBarTitle("Contents Settings", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } -} - -struct ContentPage_Preview: PreviewProvider { - static var previews: some View { - Contents() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Settings/App Settings/Developer.swift b/AnimeGen/Settings/App Settings/Developer.swift deleted file mode 100644 index 9f468439..00000000 --- a/AnimeGen/Settings/App Settings/Developer.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// Developer.swift -// AnimeGen -// -// Created by cranci on 30/04/24. -// - -import SwiftUI - -struct DeveloperPref: View { - - // Devloper Mode - @State private var developerMode = UserDefaults.standard.bool(forKey: "enableDeveloperMode") - @State private var developerAlert = UserDefaults.standard.bool(forKey: "enableDeveloperAlert") - @State private var hmtaidev = UserDefaults.standard.bool(forKey: "enabledHmtaiAPI") - - var body: some View { - NavigationView { - Form { - Section(footer: Text(""" - Enabling 'Developer Mode' grants access to additional specific settings and beta modules. - - Enabling 'Developer Alerts' lets you view error messages explaining why an image failed to load. - """)) { - - Toggle("Developer Mode", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableDeveloperMode") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableDeveloperMode") - } - )) - - Toggle("Developer Alert", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enableDeveloperAlert") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enableDeveloperAlert") - } - )) - - if UserDefaults.standard.bool(forKey: "enableDeveloperMode") { - NavigationLink(destination: DeveloperView()) { - Text("Hmtai Preferences") - .foregroundColor(.accentColor) - } - } - - if UserDefaults.standard.bool(forKey: "enableDeveloperMode") { - NavigationLink(destination: waifuitView()) { - Text("Waifu.it Preferences") - .foregroundColor(.accentColor) - } - } - - if UserDefaults.standard.bool(forKey: "enableDeveloperMode") { - Toggle("Display Hmtai API", isOn: Binding( - get: { UserDefaults.standard.bool(forKey: "enabledHmtaiAPI") }, - set: { newValue in - UserDefaults.standard.set(newValue, forKey: "enabledHmtaiAPI") - } - )) - } - - } - } - .navigationBarHidden(true) - } - .navigationBarTitle("Developer Preferences", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } -} - -struct Developer_Preview: PreviewProvider { - static var previews: some View { - DeveloperPref() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Settings/App Settings/Features.swift b/AnimeGen/Settings/App Settings/Features.swift deleted file mode 100644 index 42674cf6..00000000 --- a/AnimeGen/Settings/App Settings/Features.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// Features.swift -// AnimeGen -// -// Created by cranci on 30/04/24. -// - -import SwiftUI - -struct Features: View { - - // Features - @State private var animations = UserDefaults.standard.bool(forKey: "enableAnimations") - @State private var gradient = UserDefaults.standard.bool(forKey: "enablegradient") - @State private var activitytime = UserDefaults.standard.bool(forKey: "enableTime") - @State private var gestures = UserDefaults.standard.bool(forKey: "enableGestures") - - var body: some View { - NavigationView { - Form { - Section(footer: Text(""" - App Animations: Choose to show or hide animations for: - - - New Image Generation - - Previous Image - - Save Image - - Background Gradient: Opt to show or hide a violet gradient background. (App Restart is required) - - Display Activity Label: Choose to show or hide an activity control label displaying session time and images generated. (App Restart is required) - - Enable Gestures: Enable to utilize app gestures: (App Restart is required) - - - Swipe Left to Right: Last Image - - Swipe Right to Left: Generate New Image - - Swipe Top to Bottom: Show Settings - """)) { - - Toggle("App Animations", isOn: Binding( - get: { self.animations }, - set: { newValue in - self.animations = newValue - UserDefaults.standard.set(newValue, forKey: "enableAnimations") - } - )) - Toggle("Background Gradient", isOn: Binding( - get: { self.gradient }, - set: { newValue in - self.gradient = newValue - UserDefaults.standard.set(newValue, forKey: "enablegradient") - } - )) - - Toggle("Display Activity Label", isOn: Binding( - get: { self.activitytime }, - set: { newValue in - self.activitytime = newValue - UserDefaults.standard.set(newValue, forKey: "enableTime") - } - )) - - Toggle("Enable Gestures", isOn: Binding( - get: { self.gestures }, - set: { newValue in - self.gestures = newValue - UserDefaults.standard.set(newValue, forKey: "enableGestures") - } - )) - - } - } - .navigationBarHidden(true) - } - .navigationBarTitle("App Features", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } -} - -struct Features_Preview: PreviewProvider { - static var previews: some View { - Features() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/Settings/App Settings/History.swift b/AnimeGen/Settings/App Settings/History.swift deleted file mode 100644 index b408b746..00000000 --- a/AnimeGen/Settings/App Settings/History.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// History.swift -// AnimeGen -// -// Created by cranci on 30/04/24. -// - -import SwiftUI - -struct HistoryPref: View { - - // Content - @State private var historyOvertime = UserDefaults.standard.bool(forKey: "enableHistoryOvertime") - @State private var showAlert = false - - var body: some View { - NavigationView { - Form { - Section(footer: Text("'Don't clear history': It makes so that the history will not be cleared when closing the app.")) { - Toggle("Don't clear history", isOn: Binding( - get: { self.historyOvertime }, - set: { newValue in - self.historyOvertime = newValue - UserDefaults.standard.set(newValue, forKey: "enableHistoryOvertime") - } - )) - } - - Section { - Button(action: { - showAlert = true - }) { - HStack { - Image(systemName: "trash") - Text("Clear History") - } - .foregroundColor(.red) - } - } - } - .navigationBarHidden(true) - .alert(isPresented: $showAlert) { - Alert( - title: Text("Are you sure?"), - message: Text("This action will clear all history. Are you sure you want to proceed?"), - primaryButton: .default(Text("Cancel")), - secondaryButton: .destructive(Text("Clear"), action: clearHistory) - ) - } - } - .navigationBarTitle("History Settings", displayMode: .inline) - .navigationViewStyle(StackNavigationViewStyle()) - } - - private func clearHistory() { - UserDefaults.standard.removeObject(forKey: "imageHistory") - } - } - - struct HistoryPrefPage_Preview: PreviewProvider { - static var previews: some View { - HistoryPref() - .preferredColorScheme(.dark) - } - } diff --git a/AnimeGen/Settings/AppPref.swift b/AnimeGen/Settings/AppPref.swift new file mode 100644 index 00000000..97763793 --- /dev/null +++ b/AnimeGen/Settings/AppPref.swift @@ -0,0 +1,43 @@ +// +// AppPref.swift +// AnimeGen +// +// Created by cranci on 05/05/24. +// + +import UIKit + +class AppPref: UITableViewController { + + @IBOutlet weak var LoadImageSwitch: UISwitch! + @IBOutlet weak var DisplayTags: UISwitch! + @IBOutlet weak var DisplayNekosTags: UISwitch! + @IBOutlet weak var KyokoNoteBanner: UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + LoadImageSwitch.isOn = UserDefaults.standard.bool(forKey: "enableImageStartup") + DisplayTags.isOn = UserDefaults.standard.bool(forKey: "enableTags") + DisplayNekosTags.isOn = UserDefaults.standard.bool(forKey: "enableMoeTags") + KyokoNoteBanner.isOn = UserDefaults.standard.bool(forKey: "enableKyokobanner") + + } + + @IBAction func switchImageStartup(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableImageStartup") + } + + @IBAction func switchTags(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableTags") + } + + @IBAction func switchMoeTags(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableMoeTags") + } + + @IBAction func switchKyokoBanner(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableKyokobanner") + } + +} diff --git a/AnimeGen/Settings/Contents.swift b/AnimeGen/Settings/Contents.swift new file mode 100644 index 00000000..889cf41b --- /dev/null +++ b/AnimeGen/Settings/Contents.swift @@ -0,0 +1,25 @@ +// +// Contents.swift +// AnimeGen +// +// Created by cranci on 05/05/24. +// + +import UIKit + +class Contents: UITableViewController { + + @IBOutlet weak var Contents: UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + Contents.isOn = UserDefaults.standard.bool(forKey: "enableExplictiCont") + + } + + @IBAction func switchContent(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableExplictiCont") + } +} + diff --git a/AnimeGen/Settings/Developer.swift b/AnimeGen/Settings/Developer.swift new file mode 100644 index 00000000..4dbc4718 --- /dev/null +++ b/AnimeGen/Settings/Developer.swift @@ -0,0 +1,46 @@ +// +// Developer.swift +// AnimeGen +// +// Created by cranci on 05/05/24. +// + +import UIKit +import SwiftUI + +class DeveloperPref: UITableViewController { + + // @IBOutlet weak var DevloperAlerts: UISwitch! + @IBOutlet weak var DisplayHmtai: UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + // DevloperAlerts.isOn = UserDefaults.standard.bool(forKey: "enableDeveloperAlert") + DisplayHmtai.isOn = UserDefaults.standard.bool(forKey: "enabledHmtaiAPI") + + } + + // @IBAction func switchDeveloperAlert(_ sender: UISwitch) { + // UserDefaults.standard.set(sender.isOn, forKey: "enableDeveloperAlert") + // } + + @IBAction func switchHmtaiAPI(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enabledHmtaiAPI") + } + + @IBAction func waifuit(_ sender: UITapGestureRecognizer) { + let swiftUIView = waifuitView() + let hostingController = UIHostingController(rootView: swiftUIView) + present(hostingController, animated: true, completion: nil) + } + + @IBAction func hmtaipage(_ sender: UITapGestureRecognizer) { + let swiftUIView = HmtaiView() + let hostingController = UIHostingController(rootView: swiftUIView) + present(hostingController, animated: true, completion: nil) + } + + +} + diff --git a/AnimeGen/Settings/App Settings/Developer-Pref/Hmtai-pref.swift b/AnimeGen/Settings/Developer/Hmtai-pref.swift similarity index 97% rename from AnimeGen/Settings/App Settings/Developer-Pref/Hmtai-pref.swift rename to AnimeGen/Settings/Developer/Hmtai-pref.swift index 6dd9b334..5225f5e8 100644 --- a/AnimeGen/Settings/App Settings/Developer-Pref/Hmtai-pref.swift +++ b/AnimeGen/Settings/Developer/Hmtai-pref.swift @@ -7,7 +7,7 @@ import SwiftUI -struct DeveloperView: View { +struct HmtaiView: View { @State private var apiToken: String @State private var discordWebhookURL: String @State private var discordChannelId: String @@ -89,8 +89,8 @@ struct DeveloperView: View { } } -struct DeveloperView_Previews: PreviewProvider { +struct HmtaiView_Previews: PreviewProvider { static var previews: some View { - DeveloperView() + HmtaiView() } } diff --git a/AnimeGen/Settings/App Settings/Developer-Pref/waifu-it-pref.swift b/AnimeGen/Settings/Developer/waifu-it-pref.swift similarity index 100% rename from AnimeGen/Settings/App Settings/Developer-Pref/waifu-it-pref.swift rename to AnimeGen/Settings/Developer/waifu-it-pref.swift diff --git a/AnimeGen/Settings/FeaturesApp.swift b/AnimeGen/Settings/FeaturesApp.swift new file mode 100644 index 00000000..4d95e8c0 --- /dev/null +++ b/AnimeGen/Settings/FeaturesApp.swift @@ -0,0 +1,61 @@ +// +// FeaturesApp.swift +// AnimeGen +// +// Created by cranci on 05/05/24. +// + +import UIKit + +class FeaturesApp: UITableViewController { + + @IBOutlet weak var segmentedControl: UISegmentedControl! + + @IBOutlet weak var Animations: UISwitch! + @IBOutlet weak var Gradient: UISwitch! + @IBOutlet weak var Gestures: UISwitch! + @IBOutlet weak var ActivityLabel: UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + Animations.isOn = UserDefaults.standard.bool(forKey: "enableAnimations") + Gradient.isOn = UserDefaults.standard.bool(forKey: "enablegradient") + Gestures.isOn = UserDefaults.standard.bool(forKey: "enableGestures") + ActivityLabel.isOn = UserDefaults.standard.bool(forKey: "enableTime") + + let selectedIndex = UserDefaults.standard.integer(forKey: "selectedIndex") + segmentedControl.selectedSegmentIndex = selectedIndex + if UserDefaults.standard.value(forKey: "enabledLightMode") == nil { + UserDefaults.standard.set(false, forKey: "enabledLightMode") + } + + } + + @IBAction func switchAnimations(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableAnimations") + } + + @IBAction func switchGradient(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enablegradient") + } + + @IBAction func switchTime(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableTime") + } + + @IBAction func switctchGestures(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableGestures") + } + + @IBAction func segmentedControlValueChanged(_ sender: UISegmentedControl) { + let selectedIndex = sender.selectedSegmentIndex + UserDefaults.standard.set(selectedIndex, forKey: "selectedIndex") + + if selectedIndex == 1 { + UserDefaults.standard.set(true, forKey: "enabledLightMode") + } else { + UserDefaults.standard.set(false, forKey: "enabledLightMode") + } + } +} diff --git a/AnimeGen/Settings/Historyy.swift b/AnimeGen/Settings/Historyy.swift new file mode 100644 index 00000000..4da7fc76 --- /dev/null +++ b/AnimeGen/Settings/Historyy.swift @@ -0,0 +1,37 @@ +// +// Historyy.swift +// AnimeGen +// +// Created by cranci on 06/05/24. +// + +import UIKit + +class History: UITableViewController { + + @IBOutlet weak var historySwitch: UISwitch! + + override func viewDidLoad() { + super.viewDidLoad() + + historySwitch.isOn = UserDefaults.standard.bool(forKey: "enableHistory") + } + + @IBAction func switchHistory(_ sender: UISwitch) { + UserDefaults.standard.set(sender.isOn, forKey: "enableHistory") + } + + @IBAction func clearButtonTapped(_ sender: Any) { + let alertController = UIAlertController(title: "Clear History", message: "Are you sure you want to clear the history?", preferredStyle: .alert) + + alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) + + alertController.addAction(UIAlertAction(title: "Clear", style: .destructive, handler: { _ in + ImageHistory.images.removeAll() + })) + + present(alertController, animated: true, completion: nil) + } + + +} diff --git a/AnimeGen/Settings/SettingsMain.swift b/AnimeGen/Settings/SettingsMain.swift new file mode 100644 index 00000000..1ce57ba1 --- /dev/null +++ b/AnimeGen/Settings/SettingsMain.swift @@ -0,0 +1,16 @@ +// +// SettingsMain.swift +// AnimeGen +// +// Created by Francesco on 07/05/24. +// + +import UIKit +import SwiftUI + +class SettingsMain: UITableViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/AnimeGen/Settings/SettingsPage.swift b/AnimeGen/Settings/SettingsPage.swift deleted file mode 100644 index c46c9a64..00000000 --- a/AnimeGen/Settings/SettingsPage.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// SettingsPage.swift -// AnimeGen -// -// Created by cranci on 18/02/24. -// - -import SwiftUI - -struct SettingsPage: View { - - // Tutorial - @State private var isShowingTutorial = false - - var body: some View { - NavigationView { - Form { - - Section(header: Text("App Settings"), footer: Text("You can access different app settings on these pages.")) { - NavigationLink(destination: APIPreferences()) { - HStack { - Image(systemName: "gear") - Text("APIs Preferences") - .foregroundColor(.accentColor) - } - } - - NavigationLink(destination: Features()) { - HStack { - Image(systemName: "square.grid.2x2") - Text("App Features") - .foregroundColor(.accentColor) - } - } - - NavigationLink(destination: Contents()) { - HStack { - Image(systemName: "doc.text.magnifyingglass") - Text("Contents Settings") - .foregroundColor(.accentColor) - } - } - - - NavigationLink(destination: HistoryPref()) { - HStack { - Image(systemName: "clock") - Text("History Settings") - .foregroundColor(.accentColor) - } - } - - NavigationLink(destination: DeveloperPref()) { - HStack { - Image(systemName: "hammer") - Text("Developer Preferences") - .foregroundColor(.accentColor) - } - } - - } - - Section(header: Text("About AnimeGen")) { - NavigationLink(destination: AboutPage()) { - HStack { - Image(systemName: "info.circle") - Text("About") - .foregroundColor(.accentColor) - } - } - - NavigationLink(destination: ApiPage()) { - HStack { - Image(systemName: "list.bullet") - Text("APIs Credits") - .foregroundColor(.accentColor) - } - } - - if #available(iOS 14.0, *) { - Button(action: { - isShowingTutorial = true - }) { - Text("Show Tutorial") - .foregroundColor(.accentColor) - } - .fullScreenCover(isPresented: $isShowingTutorial) { - TutorialView() - } - } else { - Button(action: { - isShowingTutorial = true - }) { - Text("Show Tutorial") - .foregroundColor(.accentColor) - } - .sheet(isPresented: $isShowingTutorial) { - TutorialView() - } - } - } - - } - .navigationBarTitle("Settings") - } - .navigationViewStyle(StackNavigationViewStyle()) - } - -} - -struct SettingsPage_Preview: PreviewProvider { - static var previews: some View { - SettingsPage() - .preferredColorScheme(.dark) - } -} diff --git a/AnimeGen/ViewController.swift b/AnimeGen/ViewController.swift index a7ef44e4..86fbb6ff 100644 --- a/AnimeGen/ViewController.swift +++ b/AnimeGen/ViewController.swift @@ -2,38 +2,32 @@ // ViewController.swift // AnimeGen // -// Created by cranci on 11/02/24. +// Created by Francesco on 04/05/24. // import UIKit -import SwiftUI class ViewController: UIViewController { + + var currentImageURL: String? + var lastImage: UIImage? + var tagsLabel: UILabel! + + var timeLabel: UILabel! + var startTime: Date? + var timer: Timer? var imageView: UIImageView! - var settingsButton: UIButton! - - var refreshButton: UIButton! - var heartButton: UIButton! - var rewindButton: UIButton! + var apiButton: UIButton! var shareButton: UIButton! var webButton: UIButton! - var apiButton: UIButton! - var historyButton: UIButton! var activityIndicator: UIActivityIndicatorView! - var lastImage: UIImage? - var tagsLabel: UILabel! - - var timeLabel: UILabel! - var startTime: Date? - var timer: Timer? - - var currentImageURL: String? - - var gradientLayer: CAGradientLayer? + @IBOutlet var RefreshButton: UIButton! + @IBOutlet var HeartButton: UIButton! + @IBOutlet var RewindButton: UIButton! var enableAnimations = UserDefaults.standard.bool(forKey: "enableAnimations") var gradient = UserDefaults.standard.bool(forKey: "enablegradient") @@ -44,13 +38,15 @@ class ViewController: UIViewController { var moetags = UserDefaults.standard.bool(forKey: "enableMoeTags") var kyokobanner = UserDefaults.standard.bool(forKey: "enableKyokobanner") + var HistoryTrue = UserDefaults.standard.bool(forKey: "enableHistory") + var alert = UserDefaults.standard.bool(forKey: "enableDeveloperAlert") var hmtaiON = UserDefaults.standard.bool(forKey: "enabledHmtaiAPI") - let choices = ["waifu.im", "pic.re", "waifu.pics", "waifu.it", "nekos.best", "Nekos api", "nekos.moe", "NekoBot", "kyoko", "Purr"] - - var counter: Int = 0 + var lightmode = UserDefaults.standard.bool(forKey: "enabledLightMode") + var counter: Int = 0 + override func viewDidLoad() { super.viewDidLoad() @@ -70,19 +66,18 @@ class ViewController: UIViewController { swipeRight.direction = .right view.addGestureRecognizer(swipeRight) - let swipeDown = UISwipeGestureRecognizer(target: self, action: #selector(settingsButtonTapped)) - swipeDown.direction = .down - view.addGestureRecognizer(swipeDown) } // Gradient if gradient { setupGradient() - } else { + animateGradient() + } else if !lightmode { view.backgroundColor = UIColor(red: 0.125, green: 0.125, blue: 0.125, alpha: 1.0) + } else if lightmode { + view.backgroundColor = UIColor.white } - // Image View imageView = UIImageView() imageView.translatesAutoresizingMaskIntoConstraints = false @@ -92,45 +87,31 @@ class ViewController: UIViewController { // Api Button apiButton = UIButton(type: .system) - apiButton.setTitle("", for: .normal) + apiButton.setTitle("pic.re", for: .normal) apiButton.addTarget(self, action: #selector(apiButtonTapped), for: .touchUpInside) apiButton.translatesAutoresizingMaskIntoConstraints = false - apiButton.backgroundColor = gradient ? UIColor(red: 0.4, green: 0.3, blue: 0.6, alpha: 1.0) : UIColor.darkGray + if gradient { + apiButton.backgroundColor = UIColor(red: 0.4, green: 0.3, blue: 0.6, alpha: 1.0) + } else if !lightmode { + apiButton.backgroundColor = UIColor.darkGray + } else if lightmode { + apiButton.backgroundColor = UIColor.lightGray + } apiButton.layer.cornerRadius = 10 apiButton.setTitleColor(UIColor.white, for: .normal) view.addSubview(apiButton) - // History Button - historyButton = UIButton(type: .system) - if #available(iOS 14.0, *) { - let historyIcon = UIImage(systemName: "clock.arrow.circlepath")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 20, weight: .regular)) - historyButton.setImage(historyIcon, for: .normal) + // Activity Indicator + activityIndicator = UIActivityIndicatorView(style: .large) + if !lightmode { + activityIndicator.color = .white } else { - let secondhistoryIcon = UIImage(systemName: "clock")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 20, weight: .regular)) - historyButton.setImage(secondhistoryIcon, for: .normal) + activityIndicator.color = .black } - historyButton.tintColor = .systemGray - historyButton.setTitleColor(.white, for: .normal) - historyButton.addTarget(self, action: #selector(historyButtonTapped), for: .touchUpInside) - historyButton.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(historyButton) - - - - // Settings Button - settingsButton = UIButton(type: .system) - let settingsIcon = UIImage(systemName: "gear")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 20, weight: .regular)) - settingsButton.setImage(settingsIcon, for: .normal) - settingsButton.tintColor = .systemGray - settingsButton.setTitleColor(.white, for: .normal) - settingsButton.titleLabel?.font = UIFont.systemFont(ofSize: 35, weight: .bold) - settingsButton.addTarget(self, action: #selector(settingsButtonTapped), for: .touchUpInside) - settingsButton.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(settingsButton) + activityIndicator.hidesWhenStopped = true + activityIndicator.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(activityIndicator) // Web Button @@ -143,43 +124,6 @@ class ViewController: UIViewController { webButton.translatesAutoresizingMaskIntoConstraints = false view.addSubview(webButton) - // Refresh Button - refreshButton = UIButton(type: .system) - let refreshImage = UIImage(systemName: "arrow.clockwise.circle.fill")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 35, weight: .bold)) - refreshButton.setImage(refreshImage, for: .normal) - refreshButton.tintColor = .systemTeal - refreshButton.setTitleColor(.white, for: .normal) - refreshButton.titleLabel?.font = UIFont.systemFont(ofSize: 35, weight: .bold) - refreshButton.addTarget(self, action: #selector(refreshButtonTapped), for: .touchUpInside) - refreshButton.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(refreshButton) - - // Heart Button - heartButton = UIButton(type: .system) - let heartImage = UIImage(systemName: "heart.fill")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 35, weight: .bold)) - heartButton.setImage(heartImage, for: .normal) - heartButton.tintColor = .systemRed - heartButton.setTitleColor(.white, for: .normal) - heartButton.titleLabel?.font = UIFont.systemFont(ofSize: 35, weight: .bold) - heartButton.addTarget(self, action: #selector(heartButtonTapped), for: .touchUpInside) - heartButton.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(heartButton) - - - // Rewind Button - rewindButton = UIButton(type: .system) - let rewindImage = UIImage(systemName: "arrowshape.turn.up.left.circle.fill")? - .withConfiguration(UIImage.SymbolConfiguration(pointSize: 35, weight: .bold)) - rewindButton.setImage(rewindImage, for: .normal) - rewindButton.tintColor = .systemGreen - rewindButton.setTitleColor(.white, for: .normal) - rewindButton.titleLabel?.font = UIFont.systemFont(ofSize: 35, weight: .bold) - rewindButton.addTarget(self, action: #selector(rewindButtonTapped), for: .touchUpInside) - rewindButton.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(rewindButton) - // Share Button shareButton = UIButton(type: .system) @@ -198,19 +142,15 @@ class ViewController: UIViewController { shareButton.addTarget(self, action: #selector(shareButtonTapped), for: .touchUpInside) shareButton.translatesAutoresizingMaskIntoConstraints = false view.addSubview(shareButton) - - - // Activity Indicator - activityIndicator = UIActivityIndicatorView(style: .large) - activityIndicator.color = .white - activityIndicator.hidesWhenStopped = true - activityIndicator.translatesAutoresizingMaskIntoConstraints = false - view.addSubview(activityIndicator) // Tags Label tagsLabel = UILabel() - tagsLabel.textColor = .white + if !lightmode{ + tagsLabel.textColor = .white + } else { + tagsLabel.textColor = .black + } tagsLabel.textAlignment = .center tagsLabel.font = UIFont.systemFont(ofSize: 18) tagsLabel.numberOfLines = 0 @@ -220,7 +160,11 @@ class ViewController: UIViewController { // Time Label timeLabel = UILabel() - timeLabel.textColor = .white + if !lightmode{ + timeLabel.textColor = .white + } else { + timeLabel.textColor = .black + } timeLabel.textAlignment = .center timeLabel.font = UIFont.systemFont(ofSize: 18) timeLabel.numberOfLines = 0 @@ -231,7 +175,6 @@ class ViewController: UIViewController { timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(updateTimeLabel), userInfo: nil, repeats: true) - NSLayoutConstraint.activate([ // Image View @@ -246,34 +189,14 @@ class ViewController: UIViewController { apiButton.heightAnchor.constraint(equalToConstant: 40), apiButton.widthAnchor.constraint(equalToConstant: 120), - // History button - historyButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 10), - historyButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -10), - - // Settings button - settingsButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 5), - settingsButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 10), + // Activity button + activityIndicator.centerXAnchor.constraint(equalTo: view.centerXAnchor), + activityIndicator.centerYAnchor.constraint(equalTo: RefreshButton.topAnchor, constant: -30), // Web button webButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -25), webButton.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 20), - // Refresh button - refreshButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -15), - refreshButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), - - // Heart button - heartButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -15), - heartButton.centerXAnchor.constraint(equalTo: refreshButton.centerXAnchor, constant: -60), - - // Rewind button - rewindButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -15), - rewindButton.centerXAnchor.constraint(equalTo: refreshButton.centerXAnchor, constant: 60), - - // Activity button - activityIndicator.centerXAnchor.constraint(equalTo: view.centerXAnchor), - activityIndicator.centerYAnchor.constraint(equalTo: refreshButton.topAnchor, constant: -30), - // Share button shareButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -25), shareButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -20), @@ -286,33 +209,14 @@ class ViewController: UIViewController { // Time label timeLabel.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: 10), timeLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor) - ]) - - if gradient { - animateGradient() - } - - let selectedChoiceIndex = UserDefaults.standard.integer(forKey: "SelectedChoiceIndex") - apiButton.setTitle(choices[selectedChoiceIndex], for: .normal) - - NotificationCenter.default.addObserver(self, selector: #selector(selectedChoiceChanged(_:)), name: Notification.Name("SelectedChoiceChanged"), object: nil) + + ]) if loadstart { loadImageAndTagsFromSelectedAPI() } } - - - deinit { - NotificationCenter.default.removeObserver(self) - } - - @objc func selectedChoiceChanged(_ notification: Notification) { - guard let selectedIndex = notification.object as? Int else { return } - guard selectedIndex >= 0 && selectedIndex < choices.count else { return } - apiButton.setTitle(choices[selectedIndex], for: .normal) - } - + func loadImageAndTagsFromSelectedAPI() { guard let title = apiButton.title(for: .normal) else { @@ -368,5 +272,5 @@ class ViewController: UIViewController { break } } - } +