diff --git a/HappyAnding/HappyAnding.xcodeproj/project.pbxproj b/HappyAnding/HappyAnding.xcodeproj/project.pbxproj index d0d284bb..eba336d6 100644 --- a/HappyAnding/HappyAnding.xcodeproj/project.pbxproj +++ b/HappyAnding/HappyAnding.xcodeproj/project.pbxproj @@ -22,7 +22,6 @@ 4D93D0752A61D0D10042CBA8 /* ReadShortcutViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D93D0742A61D0D10042CBA8 /* ReadShortcutViewModel.swift */; }; 4D93D0772A73C9330042CBA8 /* FirebaseMessaging in Frameworks */ = {isa = PBXBuildFile; productRef = 4D93D0762A73C9330042CBA8 /* FirebaseMessaging */; }; 4DAD635E292AB61700ABF8C1 /* UpdateShortcutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DAD635D292AB61700ABF8C1 /* UpdateShortcutView.swift */; }; - 4DF15D732A4ECC7D0014F854 /* ListShortcutViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF15D722A4ECC7D0014F854 /* ListShortcutViewModel.swift */; }; 4DF15D752A4ECE1F0014F854 /* ListCategoryShortcutViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF15D742A4ECE1F0014F854 /* ListCategoryShortcutViewModel.swift */; }; 4DF62DD52A0550ED00A8B377 /* UIScreen+Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8795A16F292AB945004B765F /* UIScreen+Size.swift */; }; 87276C382933F6AB00C92F4C /* CustomTextEditor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87276C372933F6AB00C92F4C /* CustomTextEditor.swift */; }; @@ -71,7 +70,6 @@ 87E99CC128FFF2B5009B691F /* CategoryModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CC028FFF2B5009B691F /* CategoryModalView.swift */; }; 87E99CC429014572009B691F /* Color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CC329014572009B691F /* Color+Extension.swift */; }; 87E99CC7290145AD009B691F /* ShortcutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CC6290145AD009B691F /* ShortcutCell.swift */; }; - 87E99CC9290145B8009B691F /* ListShortcutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CC8290145B8009B691F /* ListShortcutView.swift */; }; 87E99CCB290145C4009B691F /* UserCurationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CCA290145C4009B691F /* UserCurationCell.swift */; }; 87E99CCD290145CC009B691F /* AdminCurationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CCC290145CC009B691F /* AdminCurationCell.swift */; }; 87E99CD32901465F009B691F /* ValidationCheckTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87E99CD22901465F009B691F /* ValidationCheckTextField.swift */; }; @@ -160,18 +158,20 @@ F96D45BB29804057000C2441 /* EnvironmentValues+Alerter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96D45BA29804057000C2441 /* EnvironmentValues+Alerter.swift */; }; F96D45BD29816578000C2441 /* StickyHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96D45BC29816578000C2441 /* StickyHeader.swift */; }; F9724BBF292755E400860F8A /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9724BBE292755E400860F8A /* Comment.swift */; }; + F975C2102BD59982006CC401 /* ListShortcutViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F975C20F2BD59982006CC401 /* ListShortcutViewModel.swift */; }; F976E82C29368E0D0088BBA1 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = F976E82B29368E0D0088BBA1 /* Version.swift */; }; F976E85129395B350088BBA1 /* ShareExtensionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F976E85029395B350088BBA1 /* ShareExtensionViewModel.swift */; }; F98017182BBC29A7004F2EA7 /* SCZ+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98017172BBC29A7004F2EA7 /* SCZ+Color.swift */; }; F980171A2BBC29D6004F2EA7 /* PromotionSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98017192BBC29D6004F2EA7 /* PromotionSection.swift */; }; F980171C2BBC29F7004F2EA7 /* CardSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = F980171B2BBC29F7004F2EA7 /* CardSection.swift */; }; F98017202BBC2A6F004F2EA7 /* ExploreCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F980171F2BBC2A6F004F2EA7 /* ExploreCell.swift */; }; - F98017222BBC3FD8004F2EA7 /* ExpandedRankingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98017212BBC3FD8004F2EA7 /* ExpandedRankingView.swift */; }; + F98017222BBC3FD8004F2EA7 /* ListShortcutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98017212BBC3FD8004F2EA7 /* ListShortcutView.swift */; }; F98017242BBC4061004F2EA7 /* ShortcutIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F98017232BBC4061004F2EA7 /* ShortcutIcon.swift */; }; F99569182901DC4D0060AAEF /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F99569172901DC4D0060AAEF /* UIFont+Extension.swift */; }; F9A86DA62A0B54ED00405E12 /* UserNameCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A86DA52A0B54ED00405E12 /* UserNameCell.swift */; }; F9AC2BB62935201C00165820 /* CheckUpdateVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9AC2BB52935201C00165820 /* CheckUpdateVersion.swift */; }; F9AFF6E32A59153B00FFFFAD /* WriteShortcutViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9AFF6E22A59153B00FFFFAD /* WriteShortcutViewModel.swift */; }; + F9B99F262BCD73A10094F47B /* MyPageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B99F252BCD73A10094F47B /* MyPageViewModel.swift */; }; F9BA11D329A389EA00176807 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F9BA11D229A389EA00176807 /* GoogleService-Info.plist */; }; F9BA11D429A389EA00176807 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F9BA11D229A389EA00176807 /* GoogleService-Info.plist */; }; F9CAEF832914855900224B0A /* Date+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9CAEF822914855900224B0A /* Date+String.swift */; }; @@ -235,7 +235,6 @@ 4D93D06E2A5956E60042CBA8 /* ShowProfileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowProfileViewModel.swift; sourceTree = ""; }; 4D93D0742A61D0D10042CBA8 /* ReadShortcutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadShortcutViewModel.swift; sourceTree = ""; }; 4DAD635D292AB61700ABF8C1 /* UpdateShortcutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UpdateShortcutView.swift; sourceTree = ""; }; - 4DF15D722A4ECC7D0014F854 /* ListShortcutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListShortcutViewModel.swift; sourceTree = ""; }; 4DF15D742A4ECE1F0014F854 /* ListCategoryShortcutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListCategoryShortcutViewModel.swift; sourceTree = ""; }; 87276C372933F6AB00C92F4C /* CustomTextEditor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextEditor.swift; sourceTree = ""; }; 872A7D8E2918393B004A05B8 /* PrivacyPolicyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacyPolicyView.swift; sourceTree = ""; }; @@ -285,7 +284,6 @@ 87E99CC028FFF2B5009B691F /* CategoryModalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryModalView.swift; sourceTree = ""; }; 87E99CC329014572009B691F /* Color+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extension.swift"; sourceTree = ""; }; 87E99CC6290145AD009B691F /* ShortcutCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutCell.swift; sourceTree = ""; }; - 87E99CC8290145B8009B691F /* ListShortcutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListShortcutView.swift; sourceTree = ""; }; 87E99CCA290145C4009B691F /* UserCurationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserCurationCell.swift; sourceTree = ""; }; 87E99CCC290145CC009B691F /* AdminCurationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminCurationCell.swift; sourceTree = ""; }; 87E99CD22901465F009B691F /* ValidationCheckTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValidationCheckTextField.swift; sourceTree = ""; }; @@ -342,19 +340,21 @@ F96D45BA29804057000C2441 /* EnvironmentValues+Alerter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EnvironmentValues+Alerter.swift"; sourceTree = ""; }; F96D45BC29816578000C2441 /* StickyHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickyHeader.swift; sourceTree = ""; }; F9724BBE292755E400860F8A /* Comment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comment.swift; sourceTree = ""; }; + F975C20F2BD59982006CC401 /* ListShortcutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListShortcutViewModel.swift; sourceTree = ""; }; F976E82B29368E0D0088BBA1 /* Version.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Version.swift; sourceTree = ""; }; F976E85029395B350088BBA1 /* ShareExtensionViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareExtensionViewModel.swift; sourceTree = ""; }; F98017172BBC29A7004F2EA7 /* SCZ+Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SCZ+Color.swift"; sourceTree = ""; }; F98017192BBC29D6004F2EA7 /* PromotionSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromotionSection.swift; sourceTree = ""; }; F980171B2BBC29F7004F2EA7 /* CardSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardSection.swift; sourceTree = ""; }; F980171F2BBC2A6F004F2EA7 /* ExploreCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreCell.swift; sourceTree = ""; }; - F98017212BBC3FD8004F2EA7 /* ExpandedRankingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpandedRankingView.swift; sourceTree = ""; }; + F98017212BBC3FD8004F2EA7 /* ListShortcutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListShortcutView.swift; sourceTree = ""; }; F98017232BBC4061004F2EA7 /* ShortcutIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutIcon.swift; sourceTree = ""; }; F99569172901DC4D0060AAEF /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = ""; }; F9A86DA52A0B54ED00405E12 /* UserNameCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserNameCell.swift; sourceTree = ""; }; F9AC2BB52935201C00165820 /* CheckUpdateVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckUpdateVersion.swift; sourceTree = ""; }; F9AC2BB92935D34C00165820 /* Image+View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+View.swift"; sourceTree = ""; }; F9AFF6E22A59153B00FFFFAD /* WriteShortcutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteShortcutViewModel.swift; sourceTree = ""; }; + F9B99F252BCD73A10094F47B /* MyPageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageViewModel.swift; sourceTree = ""; }; F9BA11D229A389EA00176807 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; F9CAEF822914855900224B0A /* Date+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+String.swift"; sourceTree = ""; }; F9DB8EB82939853D00516CE1 /* ShareExtensionValidationTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareExtensionValidationTextField.swift; sourceTree = ""; }; @@ -443,8 +443,8 @@ isa = PBXGroup; children = ( 4D061BB92A475EE800F76835 /* ExploreShortcutViewModel.swift */, - 4DF15D722A4ECC7D0014F854 /* ListShortcutViewModel.swift */, 4DF15D742A4ECE1F0014F854 /* ListCategoryShortcutViewModel.swift */, + F975C20F2BD59982006CC401 /* ListShortcutViewModel.swift */, ); path = ExploreShortcutViewModels; sourceTree = ""; @@ -595,9 +595,8 @@ isa = PBXGroup; children = ( 4D061BB72A47531800F76835 /* ExploreShortcutView.swift */, - 87E99CC8290145B8009B691F /* ListShortcutView.swift */, A0F822B629164D2300AF4448 /* ListCategoryShortcutView.swift */, - F98017212BBC3FD8004F2EA7 /* ExpandedRankingView.swift */, + F98017212BBC3FD8004F2EA7 /* ListShortcutView.swift */, ); path = ExploreShortcutViews; sourceTree = ""; @@ -706,6 +705,7 @@ A0F822AA2910B8B900AF4448 /* ViewModel */ = { isa = PBXGroup; children = ( + F9B99F242BCD738B0094F47B /* MyPageViewModels */, 8788E1A12A484518007C3852 /* ExploreShortcutViewModels */, 8788E1A32A484533007C3852 /* ReadShortcutViewModels */, 8788E19E2A483FDF007C3852 /* ExploreCurationViewModels */, @@ -801,6 +801,14 @@ path = SettingViews; sourceTree = ""; }; + F9B99F242BCD738B0094F47B /* MyPageViewModels */ = { + isa = PBXGroup; + children = ( + F9B99F252BCD73A10094F47B /* MyPageViewModel.swift */, + ); + path = MyPageViewModels; + sourceTree = ""; + }; F9DB8ECB293B30EC00516CE1 /* Recovered References */ = { isa = PBXGroup; children = ( @@ -1027,7 +1035,6 @@ A38115BA292B447D0043E8B8 /* ShortcutCardCell.swift in Sources */, 8792479B291BDF820040D5C3 /* SearchView.swift in Sources */, A3FF018E291ACFA500384211 /* WithdrawalView.swift in Sources */, - 4DF15D732A4ECC7D0014F854 /* ListShortcutViewModel.swift in Sources */, 4D778A34290A53BA00C15AC4 /* UIApplication+Keyboard.swift in Sources */, F98017242BBC4061004F2EA7 /* ShortcutIcon.swift in Sources */, A3766B232904330300708F83 /* ReadCurationView.swift in Sources */, @@ -1066,12 +1073,13 @@ A309862F2BBFE6B90004D993 /* View+Shadow.swift in Sources */, 87E99CC7290145AD009B691F /* ShortcutCell.swift in Sources */, 87E99CBB28FFF298009B691F /* IconModalView.swift in Sources */, - F98017222BBC3FD8004F2EA7 /* ExpandedRankingView.swift in Sources */, + F98017222BBC3FD8004F2EA7 /* ListShortcutView.swift in Sources */, 87E99C7028F94EA6009B691F /* ShortcutTabView.swift in Sources */, F99569182901DC4D0060AAEF /* UIFont+Extension.swift in Sources */, F91A72C32999160E00CA135A /* Alerter.swift in Sources */, A3D348552BD1233000DE814C /* View+Font.swift in Sources */, 87E99CAD28FFF261009B691F /* ReadShortcutView.swift in Sources */, + F975C2102BD59982006CC401 /* ListShortcutViewModel.swift in Sources */, F930E0002BBD51EC003C2686 /* Seal.swift in Sources */, 4D5889E82AA36A52000C4849 /* AppDelegate.swift in Sources */, A33F74AE2908D8C800B8D0D0 /* CheckBoxShortcutCell.swift in Sources */, @@ -1084,6 +1092,7 @@ F9136EB6293612310034AAB2 /* ShortcutsZipView.swift in Sources */, 87E99CB128FFF273009B691F /* WriteCurationSetView.swift in Sources */, 4D61A767291E1EE8000EF531 /* NavigationViewModel.swift in Sources */, + F9B99F262BCD73A10094F47B /* MyPageViewModel.swift in Sources */, 4D93D0752A61D0D10042CBA8 /* ReadShortcutViewModel.swift in Sources */, F96D45BD29816578000C2441 /* StickyHeader.swift in Sources */, 87E99CEE29080D33009B691F /* User.swift in Sources */, @@ -1091,7 +1100,6 @@ 87E99CB928FFF291009B691F /* WriteShortcutView.swift in Sources */, 87E99CCD290145CC009B691F /* AdminCurationCell.swift in Sources */, 8786B2E229A7F93B000B46A1 /* View+UIFont.swift in Sources */, - 87E99CC9290145B8009B691F /* ListShortcutView.swift in Sources */, F92766552A61A032009C4EC2 /* WriteShortcutModalViewModel.swift in Sources */, A3FF01862918552E00384211 /* AboutTeamView.swift in Sources */, 87E99C6E28F94EA6009B691F /* HappyAndingApp.swift in Sources */, @@ -1402,7 +1410,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; @@ -1424,7 +1432,7 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; @@ -1445,7 +1453,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; @@ -1465,7 +1473,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Icons/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Icons/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/Contents.json new file mode 100644 index 00000000..d4099dbb --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "loved.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/loved.png b/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/loved.png new file mode 100644 index 00000000..6204a756 Binary files /dev/null and b/HappyAnding/HappyAnding/Assets.xcassets/Icons/loved.imageset/loved.png differ diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/Contents.json new file mode 100644 index 00000000..af536bab --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "new.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/new.png b/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/new.png new file mode 100644 index 00000000..7597e45c Binary files /dev/null and b/HappyAnding/HappyAnding/Assets.xcassets/Icons/new.imageset/new.png differ diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/Contents.json new file mode 100644 index 00000000..d411162b --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "ranked.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/ranked.png b/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/ranked.png new file mode 100644 index 00000000..4bb16a8e Binary files /dev/null and b/HappyAnding/HappyAnding/Assets.xcassets/Icons/ranked.imageset/ranked.png differ diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Profile/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Profile/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Profile/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/Contents.json b/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/Contents.json new file mode 100644 index 00000000..583537be --- /dev/null +++ b/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "profile_ex.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/profile_ex.png b/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/profile_ex.png new file mode 100644 index 00000000..4580ce79 Binary files /dev/null and b/HappyAnding/HappyAnding/Assets.xcassets/Profile/profile_ex.imageset/profile_ex.png differ diff --git a/HappyAnding/HappyAnding/Extensions/SCZ+Color.swift b/HappyAnding/HappyAnding/Extensions/SCZ+Color.swift index 7ba67af5..53a1c536 100644 --- a/HappyAnding/HappyAnding/Extensions/SCZ+Color.swift +++ b/HappyAnding/HappyAnding/Extensions/SCZ+Color.swift @@ -73,7 +73,7 @@ struct SCZColor { "Pink": Pink(), "Purple": Purple(), "LightPurple": Lavendar(), - "Silver": Silver(), + "Gray": Silver(), "Khaki": Khaki(), "Brown": Brown() ] diff --git a/HappyAnding/HappyAnding/Model/SectionType.swift b/HappyAnding/HappyAnding/Model/SectionType.swift index 46cdb649..c4a82443 100644 --- a/HappyAnding/HappyAnding/Model/SectionType.swift +++ b/HappyAnding/HappyAnding/Model/SectionType.swift @@ -66,44 +66,86 @@ enum SectionType { } } - func fetchTitleIcon() -> some View { + func fetchTitleImage() -> some View { switch self { case .recent: - return Image(systemName: self.icon) + return Image("new") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( Color(hexString: "E4C139"), Color(hexString: "E4C139") ) + .shadow(color: Color(hexString: "E5C239").opacity(0.36), + radius: 8, + x: 0, + y: 0) case .download: - return Image(systemName: self.icon) + return Image("ranked") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( - Color(hexString: "404040", opacity: 0.48), - Color(hexString: "404040", opacity: 0.48) + SCZColor.CharcoalGray.opacity48, + SCZColor.CharcoalGray.opacity48 ) + .shadow(color: Color.black.opacity(0.16), + radius: 8, + x: 0, + y: 0) case .popular: - return Image(systemName: self.icon) + return Image("loved") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( SCZColor.SCZBlue.opacity88, SCZColor.SCZBlue.opacity88 ) + .shadow(color: SCZColor.SCZBlue.opacity48, + radius: 8, + x: 0, + y: 0) case .myShortcut: return Image(systemName: "square.text.square.fill") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( SCZColor.CharcoalGray.opacity64, Color.white ) + .shadow(color: Color.clear, + radius: 0, + x: 0, + y: 0) case .myDownloadShortcut: return Image(systemName: "arrow.down.square.fill") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( Color.white, SCZColor.CharcoalGray.opacity24 ) + .shadow(color: Color.clear, + radius: 0, + x: 0, + y: 0) case .myLovingShortcut: - return Image(systemName: "heart.fill") + return Image("loved") + .resizable() + .scaledToFit() + .frame(width: 19) .foregroundStyle( SCZColor.SCZBlue.opacity88, SCZColor.SCZBlue.opacity88 ) + .shadow(color: Color.black.opacity(0.16), + radius: 8, + x: 0, + y: 0) } } } diff --git a/HappyAnding/HappyAnding/TextLiteral.swift b/HappyAnding/HappyAnding/TextLiteral.swift index fc358608..241a2eaf 100644 --- a/HappyAnding/HappyAnding/TextLiteral.swift +++ b/HappyAnding/HappyAnding/TextLiteral.swift @@ -224,7 +224,7 @@ enum TextLiteral { static let signInWithAppleViewUseWithoutSignIn: String = "로그인 없이 둘러보기" // MARK: - MyPageView - static let myPageViewTitle: String = "프로필" + static let myPageViewTitle: String = "나의 공간" static let myPageViewMyCuration: String = "내가 작성한 추천 모음집" static let myPageViewLikedShortcuts: String = "내가 좋아요한" static let myPageViewDownloadedShortcuts: String = "다운로드한" diff --git a/HappyAnding/HappyAnding/ViewModel/MyPageViewModels/MyPageViewModel.swift b/HappyAnding/HappyAnding/ViewModel/MyPageViewModels/MyPageViewModel.swift new file mode 100644 index 00000000..4f9373da --- /dev/null +++ b/HappyAnding/HappyAnding/ViewModel/MyPageViewModels/MyPageViewModel.swift @@ -0,0 +1,50 @@ +// +// MyPageViewModel.swift +// HappyAnding +// +// Created by JeonJimin on 4/15/24. +// + +import Foundation +import Combine + +final class MyPageViewModel: ObservableObject { + private let shortcutsZipViewModel = ShortcutsZipViewModel.share + private var cancellables = Set() + + @Published var myShortcuts: [Shortcuts] = [] + @Published var myDownloadShortcuts: [Shortcuts] = [] + @Published var myLovingShortcuts: [Shortcuts] = [] + + @Published var isMyDownloadShortcutFolded = false { + didSet { + UserDefaults.standard.set(isMyDownloadShortcutFolded, forKey: "isMyDownloadShortcutFolded") + } + } + @Published var isMyLovingShortcutFolded = false { + didSet { + UserDefaults.standard.set(isMyLovingShortcutFolded, forKey: "isMyLovingShortcutFolded") + } + } + + init() { + shortcutsZipViewModel.$shortcutsMadeByUser + .sink { [weak self] in self?.myShortcuts = $0 } + .store(in: &cancellables) + + shortcutsZipViewModel.$shortcutsUserDownloaded + .sink { [weak self] in self?.myDownloadShortcuts = $0 } + .store(in: &cancellables) + + shortcutsZipViewModel.$shortcutsUserLiked + .sink { [weak self] in self?.myLovingShortcuts = $0 } + .store(in: &cancellables) + + self.isMyDownloadShortcutFolded = UserDefaults.standard.bool(forKey: "isMyDownloadShortcutFolded") + self.isMyLovingShortcutFolded = UserDefaults.standard.bool(forKey: "isMyLovingShortcutFolded") + } + + func fetchUserInfo() -> String { + shortcutsZipViewModel.userInfo?.nickname ?? TextLiteral.defaultUser + } +} diff --git a/HappyAnding/HappyAnding/Views/Components/CardSection.swift b/HappyAnding/HappyAnding/Views/Components/CardSection.swift index 6ffa2df3..62d55a6c 100644 --- a/HappyAnding/HappyAnding/Views/Components/CardSection.swift +++ b/HappyAnding/HappyAnding/Views/Components/CardSection.swift @@ -10,31 +10,31 @@ import SwiftUI struct CardSection: View { let type: SectionType let shortcuts: [Shortcuts] - + let horizontalPadding: CGFloat = 16 var body: some View { VStack(alignment: .leading, spacing: 6) { HStack { - type.fetchTitleIcon() + type.fetchTitleImage() Text(type.title) .foregroundStyle(SCZColor.Basic) } - .font(.system(size: 20, weight: .semibold)) - .padding(.horizontal, 13) + .font(.system(size: 20, weight: .semibold)) + .padding(.horizontal, horizontalPadding) ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 6) { Rectangle() .foregroundStyle(Color.clear) - .frame(width: 13) + .frame(width: horizontalPadding-6) ForEach(Array(shortcuts.enumerated()).prefix(5), id: \.offset) { index, shortcut in switch type { case .recent: UnorderedCell(shortcut: shortcut) default: - OrderedCell(type: .download, index: index, shortcut: shortcut) + OrderedCell(type: .download, index: index+1, shortcut: shortcut) } } ExpandedCell(type: type, shortcuts: shortcuts) - .padding(.trailing, 13) + .padding(.trailing, horizontalPadding) } } } diff --git a/HappyAnding/HappyAnding/Views/Components/ExploreCell.swift b/HappyAnding/HappyAnding/Views/Components/ExploreCell.swift index 98faa9c3..90a9c88e 100644 --- a/HappyAnding/HappyAnding/Views/Components/ExploreCell.swift +++ b/HappyAnding/HappyAnding/Views/Components/ExploreCell.swift @@ -48,6 +48,7 @@ struct OrderedCell: View { .background( SCZColor.colors[shortcut.color]?.color(for: colorScheme).fillGradient() ?? Color.clear.toGradient()) .cornerRadius(16) .roundedBorder(cornerRadius: 16, color: Color.white, isNormalBlend: true, opacity: 0.12) + .navigationLinkRouter(data: shortcut) } private func formatNumber(_ number: Int) -> String { @@ -87,6 +88,7 @@ struct UnorderedCell: View{ ) .cornerRadius(16) .dropShadow() + .navigationLinkRouter(data: shortcut) } } @@ -95,23 +97,25 @@ struct ExpandedCell: View { let shortcuts: [Shortcuts] var body: some View { - NavigationLink { - ExpandedRankingView(type: type, shortcuts: shortcuts) - } label: { - VStack(alignment: .center, spacing: 4) { - Image(systemName: "rectangle.portrait.on.rectangle.portrait.angled.fill") - Text("더보기") - } - .foregroundStyle(Color.white.opacity(0.88)) - .font(.system(size: 15, weight: .semibold)) - .frame(width: 108, height: 144, alignment: .center) - .background(SCZColor.CharcoalGray.opacity08) - .cornerRadius(12) - .overlay( - RoundedRectangle(cornerRadius: 12) - .strokeBorder(Color.white.opacity(0.12), lineWidth: 2) - ) - .shadow(color: SCZColor.CharcoalGray.opacity04, radius: 4, x: 0, y: 2) + VStack(alignment: .center, spacing: 4) { + Image(systemName: "rectangle.portrait.on.rectangle.portrait.angled.fill") + Text("더보기") } + .foregroundStyle(SCZColor.CharcoalGray.opacity64) + .font(.system(size: 15, weight: .semibold)) + .frame(width: 108, height: 144, alignment: .center) + .background( + ZStack { + Color.white.opacity(0.24) + SCZColor.CharcoalGray.opacity08 + } + ) + .cornerRadius(12) + .overlay( + RoundedRectangle(cornerRadius: 12) + .strokeBorder(Color.white.opacity(0.12), lineWidth: 2) + ) + .shadow(color: SCZColor.CharcoalGray.opacity04, radius: 4, x: 0, y: 2) + .navigationLinkRouter(data: type) } } diff --git a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExpandedRankingView.swift b/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExpandedRankingView.swift deleted file mode 100644 index 118f29cc..00000000 --- a/HappyAnding/HappyAnding/Views/ExploreShortcutViews/ExpandedRankingView.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// ExpandedRankingView.swift -// HappyAnding -// -// Created by JeonJimin on 4/2/24. -// - -import SwiftUI - -struct ExpandedRankingView: View { - let type: SectionType - let shortcuts: [Shortcuts] - - var body: some View { - ScrollView(.vertical) { - VStack(spacing: 5) { - ForEach(0.. some View { - ForEach(shortcuts.indices, id: \.self) { index in - let shortcut = shortcuts[index] - ShortcutCell(shortcut: shortcut, - rankNumber: (viewModel.sectionType == .download) ? index : nil, - navigationParentView: .shortcuts) - .navigationLinkRouter(data: shortcut) +} + +struct ListShortcutCell: View { + let type: SectionType + let index: Int + let shortcut: Shortcuts + var body: some View { + HStack(spacing: 14) { + if type == .popular || type == .download { + Seal(index: index, type: .ranking) + } + ShortcutIcon(sfSymbol: shortcut.sfSymbol, color: shortcut.color, size: 56) + + VStack(alignment: .leading, spacing: 2) { + Text(shortcut.title) + .font(.system(size: 16, weight: .bold)) + .foregroundStyle(SCZColor.Basic) + Text(shortcut.subtitle) + .font(.system(size: 14, weight: .medium)) + .foregroundStyle(SCZColor.CharcoalGray.opacity48) + } + .lineLimit(1) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.vertical, 5) + + Image(systemName: "chevron.right") + .foregroundStyle(SCZColor.CharcoalGray.opacity24) } + .padding(.vertical, 6) + .padding(.horizontal, type == .popular || type == .download ? 0 : 8) + .navigationLinkRouter(data: shortcut) } } diff --git a/HappyAnding/HappyAnding/Views/MyPageViews/MyPageView.swift b/HappyAnding/HappyAnding/Views/MyPageViews/MyPageView.swift index 5e59586b..dba31b08 100644 --- a/HappyAnding/HappyAnding/Views/MyPageViews/MyPageView.swift +++ b/HappyAnding/HappyAnding/Views/MyPageViews/MyPageView.swift @@ -8,79 +8,192 @@ import SwiftUI struct MyPageView: View { - - @EnvironmentObject var shortcutsZipViewModel: ShortcutsZipViewModel - - @AppStorage("useWithoutSignIn") var useWithoutSignIn: Bool = false - - @State var isTappedUserGradeButton = false - + @StateObject var viewModel: MyPageViewModel + var body: some View { - ScrollView { - VStack(spacing: 32) { - - //MARK: - 사용자 프로필 - - HStack(spacing: 16) { - - Button { - isTappedUserGradeButton = true - } label: { - shortcutsZipViewModel.fetchShortcutGradeImage(isBig: true, shortcutGrade: shortcutsZipViewModel.checkShortcutGrade(userID: shortcutsZipViewModel.userInfo?.id ?? "!")) - .font(.system(size: 60, weight: .medium)) - .frame(width: 60, height: 60) - .foregroundStyle(Color.gray3) - .id(333) + ScrollView(showsIndicators: false) { + VStack(spacing: 12) { + Button { + //프로필 설정 페이지 연걸 + } label: { + HStack { + //TODO: 프로필 이미지 - 등급 시스템과 동일 추후 이미지 연결 + Image("profile_ex") + .resizable() + .scaledToFit() + .frame(width: 96, height: 96) + + VStack(spacing: 9) { + HStack { + //TODO: 추가 예정 이미지 확정되면 넣기 + } + .frame(maxWidth: .infinity, alignment: .leading) + Divider() + HStack { + Text(viewModel.fetchUserInfo()) + .frame(maxWidth: .infinity, alignment: .leading) + .foregroundStyle(SCZColor.Basic) + Image(systemName: "slider.horizontal.3") + .foregroundStyle(SCZColor.CharcoalGray.opacity64) + } + .padding(.vertical, 8) + } + .padding(.vertical, 12) + .padding(.horizontal, 16) + .background(Color.white) + .clipShape(RoundedRectangle(cornerRadius: 16)) + } - - Text(shortcutsZipViewModel.userInfo?.nickname ?? TextLiteral.defaultUser) - .shortcutsZipTitle1() - .foregroundStyle(Color.gray5) - - Spacer() } - .frame(maxWidth: .infinity) .padding(.horizontal, 16) - .padding(.top, 16) - - //TODO: - 각 뷰에 해당하는 단축어 목록 전달하도록 변경 필요 - // MARK: - 나의 단축어 - - MyShortcutCardListView(shortcuts: shortcutsZipViewModel.shortcutsMadeByUser, - navigationParentView: .myPage) - - // MARK: - 내가 작성한 큐레이션 - UserCurationListView(data: CurationType.myCuration) - .frame(maxWidth: .infinity) - - // MARK: - 좋아요한 단축어 + MyPageSection(type: .myShortcut, shortcuts: $viewModel.myShortcuts, isFolded: .constant(false)) + + MyPageSection(type: .myDownloadShortcut, shortcuts: $viewModel.myDownloadShortcuts, isFolded: $viewModel.isMyDownloadShortcutFolded) - MyPageShortcutListCell(type: .myLovingShortcut, shortcuts: shortcutsZipViewModel.shortcutsUserLiked) + if viewModel.isMyDownloadShortcutFolded { + Divider() + .padding(.horizontal, 16) + .foregroundStyle(SCZColor.CharcoalGray.opacity08) + } - // MARK: -다운로드한 단축어 + MyPageSection(type: .myLovingShortcut, shortcuts: $viewModel.myLovingShortcuts, isFolded: $viewModel.isMyLovingShortcutFolded) - MyPageShortcutListCell(type: .myDownloadShortcut, shortcuts: shortcutsZipViewModel.shortcutsUserDownloaded) - .padding(.bottom, 44) + if viewModel.isMyLovingShortcutFolded { + Divider() + .padding(.horizontal, 16) + .foregroundStyle(SCZColor.CharcoalGray.opacity08) + } } + .padding(.bottom, 30) + .padding(.top, 12) } - .navigationBarTitle(TextLiteral.myPageViewTitle) - .navigationBarTitleDisplayMode(.large) - .toolbar { - ToolbarItem { - Image(systemName: "gearshape.fill") - .shortcutsZipHeadline() - .foregroundStyle(Color.gray5) - .navigationLinkRouter(data: NavigationSettingView.first) + .toolbar{ + ToolbarItem(placement: .topBarLeading) { + Text(TextLiteral.myPageViewTitle) + .font(.system(size: 24, weight: .bold)) + .foregroundStyle( + LinearGradient(colors: [SCZColor.CharcoalGray.color, SCZColor.CharcoalGray.opacity48], startPoint: .top, endPoint: .bottom) + .opacity(0.64) + ) + } + ToolbarItem(placement: .topBarTrailing) { + HStack(spacing: 3) { + Button { + //TODO: 알림창 연결 + print("알림창 연결") + } label: { + Image(systemName: "bell.badge.fill") + .symbolRenderingMode(.palette) + .foregroundStyle( + Color(hexString: "3366FF"), + LinearGradient( + colors: [SCZColor.CharcoalGray.color, SCZColor.CharcoalGray.opacity48], + startPoint: .top, + endPoint: .bottom + ).opacity(0.64) + ) + } + Button { + print("설정 페이지 연결") + } label: { + Image(systemName: "gearshape.fill") + .foregroundStyle( + LinearGradient( + colors: [SCZColor.CharcoalGray.color, SCZColor.CharcoalGray.opacity48], + startPoint: .top, + endPoint: .bottom + ).opacity(0.64) + ) +// .navigationLinkRouter(data: NavigationSettingView.first) + } + } } } - .sheet(isPresented: $isTappedUserGradeButton) { - AboutShortcutGradeView() - .presentationDetents([.large]) - .presentationDragIndicator(.visible) + .background( + ZStack { + Color.white + SCZColor.CharcoalGray.opacity04 + } + ) + } +} + +struct MyPageSection: View { + let type: SectionType + @Binding var shortcuts: [Shortcuts] + @Binding var isFolded: Bool + var body: some View { + + VStack(alignment: .leading, spacing: 0) { + HStack { + type.fetchTitleImage() + Text(type.title) + //pretendard 16 bold + .font(.system(size: 16, weight: .bold)) + .foregroundStyle(SCZColor.Basic) + Text("\(shortcuts.count)") + //SF compact rounded 14 medium + .font(.system(size: 14, weight: .medium)) + .foregroundStyle(SCZColor.CharcoalGray.opacity48) + .padding(EdgeInsets(top: 5, leading: 7, bottom: 5, trailing: 7)) + .background(SCZColor.CharcoalGray.opacity08) + .roundedBorder(cornerRadius: 16, color: Color.white, isNormalBlend: true, opacity: 0.12) + + Spacer() + + if type != .myShortcut { + Button { + withAnimation { + isFolded.toggle() + } + } label: { + Image(systemName: isFolded ? "chevron.down" : "chevron.up") + .foregroundStyle(SCZColor.CharcoalGray.opacity48) + } + .frame(width: 28, height: 28) + } + } + .padding(.horizontal, 16) + let maxNum = shortcuts.count > 3 ? 2 : 3 + if type == .myShortcut || !isFolded { + ScrollView(.horizontal, showsIndicators: false) { + HStack(spacing: 8) { + Rectangle() + .frame(width: 16) + .foregroundStyle(Color.clear) + if type == .myShortcut { + Button { + print("단축어 작성 페이지 연결") + } label: { + Image(systemName: "plus") + .foregroundStyle(Color.white) + .frame(width: 36, height: 144) + .background(Color(hexString: "3366FF").opacity(0.88)) + .roundedBorder(cornerRadius: 16, color: .white, isNormalBlend: true, opacity: 0.12) + } + + ForEach(shortcuts.prefix(maxNum), id: \.self) { shortcut in + OrderedCell(type: .myShortcut, index: 0, shortcut: shortcut) + } + if shortcuts.count > maxNum { + ExpandedCell(type: type, shortcuts: shortcuts) + } + } else { + ForEach(shortcuts.prefix(maxNum), id: \.self) { shortcut in + UnorderedCell(shortcut: shortcut) + } + if shortcuts.count > maxNum { + ExpandedCell(type: type, shortcuts: shortcuts) + } + } + + } + .padding(.trailing, 16) + } + .padding(.vertical, 8) + } } - .scrollIndicators(.hidden) - .background(Color.shortcutsZipBackground) } } diff --git a/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift b/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift index 182f49fb..05b2ba50 100644 --- a/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift +++ b/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift @@ -137,7 +137,7 @@ struct ShortcutTabView: View { @ViewBuilder private func thirdTab() -> some View { - MyPageView() + MyPageView(viewModel: MyPageViewModel()) .modifierNavigation() .navigationBarBackground ({ Color.shortcutsZipBackground }) .id(thirdTabID)