From bbf3707c6dd6eaa79baf0978784e128a10d54ea9 Mon Sep 17 00:00:00 2001 From: JongHoon Date: Mon, 7 Oct 2024 21:31:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=98=B8=EA=B0=90=20=ED=83=AD=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=ED=98=B8=EA=B0=90=20=EC=9B=B9?= =?UTF-8?q?=EB=B7=B0=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectDescriptionHelpers/Modules.swift | 1 + .../Interface/Sources/BaseWebViewType.swift | 6 ++ .../View/SubViews/Matching/MatchingView.swift | 2 +- .../GoodFeeling/Example/Sources/AppView.swift | 21 +++++++ .../GoodFeeling/GoodFeelingFeature.swift | 34 +++++++++++ .../GoodFeelingFeatureInterface.swift | 20 +++++++ .../Sources/GoodFeeling/GoodFeelingView.swift | 31 ++++++++++ .../Root/FeatureGoodFeelingRootView.swift | 42 +++++++++++++ .../Sources/Root/GoodFeelingRootFeature.swift | 59 +++++++++++++++++++ .../GoodFeelingRootFeatureInterface.swift | 26 ++++++++ Projects/Feature/GoodFeeling/Project.swift | 53 +++++++++++++++++ .../Feature/GoodFeeling/Sources/Source.swift | 1 + .../Testing/Sources/GoodFeelingTesting.swift | 1 + .../Tests/Sources/GoodFeelingTest.swift | 11 ++++ .../Feature/Sources/TabView/MainTabView.swift | 7 ++- .../Sources/TabView/MainTabViewFeature.swift | 20 ++++++- .../TabBar/Interface/Sources/TabType.swift | 13 +++- .../icon/icon_heart.imageset/Contents.json | 24 ++++++++ .../icon/icon_heart.imageset/icon_heart.svg | 10 ++++ .../Components/Alert/BottleAlertView.swift | 2 +- .../OutlinedButton/OutlinedStyleButton.swift | 2 +- .../Button/SolidButton/SolidButton.swift | 4 +- .../Card/PingPong/PingPongContainerView.swift | 2 +- .../Card/UserProfile/UserProfileView.swift | 2 +- .../Components/ETC/ImagePickerButton.swift | 4 +- .../Components/List/ArrowListView.swift | 2 +- .../LineTextField/LineTextField.swift | 2 +- .../Image/BottleImageSystem+Icon.swift | 4 ++ .../Sources/Image/Image+Extensions.swift | 6 +- .../Modifiers/NavigationBarModifier.swift | 4 +- 30 files changed, 394 insertions(+), 22 deletions(-) create mode 100644 Projects/Feature/GoodFeeling/Example/Sources/AppView.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeature.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeatureInterface.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingView.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/Root/FeatureGoodFeelingRootView.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeature.swift create mode 100644 Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeatureInterface.swift create mode 100644 Projects/Feature/GoodFeeling/Project.swift create mode 100644 Projects/Feature/GoodFeeling/Sources/Source.swift create mode 100644 Projects/Feature/GoodFeeling/Testing/Sources/GoodFeelingTesting.swift create mode 100644 Projects/Feature/GoodFeeling/Tests/Sources/GoodFeelingTest.swift create mode 100644 Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/Contents.json create mode 100644 Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/icon_heart.svg diff --git a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Modules.swift b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Modules.swift index 8f56cd8c..a6d4af0e 100644 --- a/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Modules.swift +++ b/Plugins/DependencyPlugin/ProjectDescriptionHelpers/Modules.swift @@ -27,6 +27,7 @@ public extension ModulePath { // MARK: - FeatureModule public extension ModulePath { enum Feature: String, CaseIterable { + case GoodFeeling case Guide case TabBar case Report diff --git a/Projects/Feature/BaseWebView/Interface/Sources/BaseWebViewType.swift b/Projects/Feature/BaseWebView/Interface/Sources/BaseWebViewType.swift index 11d53307..3cca11f0 100644 --- a/Projects/Feature/BaseWebView/Interface/Sources/BaseWebViewType.swift +++ b/Projects/Feature/BaseWebView/Interface/Sources/BaseWebViewType.swift @@ -26,6 +26,7 @@ public enum BottleWebViewType { case login case bottles case editProfile + case goodFeeling var path: String { switch self { @@ -39,6 +40,8 @@ public enum BottleWebViewType { return "bottles" case .editProfile: return "profile/edit" + case .goodFeeling: + return "bottles/sents" } } @@ -58,6 +61,9 @@ public enum BottleWebViewType { case .editProfile: return makeUrlWithToken(path) + + case .goodFeeling: + return makeUrlWithToken(path) } } diff --git a/Projects/Feature/BottleStorage/Interface/Sources/PingPongDetail/View/SubViews/Matching/MatchingView.swift b/Projects/Feature/BottleStorage/Interface/Sources/PingPongDetail/View/SubViews/Matching/MatchingView.swift index c1fbca1a..2515d20b 100644 --- a/Projects/Feature/BottleStorage/Interface/Sources/PingPongDetail/View/SubViews/Matching/MatchingView.swift +++ b/Projects/Feature/BottleStorage/Interface/Sources/PingPongDetail/View/SubViews/Matching/MatchingView.swift @@ -139,7 +139,7 @@ private extension MatchingView { ) OutlinedStyleButton( - .small(contentType: .image(type: .local(bottleImageSystem: .icom(.share)))), + .small(contentType: .image(type: .local(bottleImageSystem: .icon(.share)))), title: "복사하기", buttonType: .throttle ) { diff --git a/Projects/Feature/GoodFeeling/Example/Sources/AppView.swift b/Projects/Feature/GoodFeeling/Example/Sources/AppView.swift new file mode 100644 index 00000000..021e3614 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Example/Sources/AppView.swift @@ -0,0 +1,21 @@ +import SwiftUI + +import FeatureGoodFeeling +import FeatureGoodFeelingInterface + +import DomainAuth +import DomainAuthInterface + +import ComposableArchitecture + +@main +struct AppView: App { + var body: some Scene { + WindowGroup { + GoodFeelingRootView(store: Store( + initialState: GoodFeelingRootFeature.State(), + reducer: { GoodFeelingRootFeature() } + )) + } + } +} diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeature.swift b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeature.swift new file mode 100644 index 00000000..50faada6 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeature.swift @@ -0,0 +1,34 @@ +// +// GoodFeelingFeatureInterface.swift +// FeatureGoodFeelingInterface +// +// Created by JongHoon on 10/6/24. +// + +import Foundation + +import ComposableArchitecture + +@Reducer +public struct GoodFeelingFeature { + private let reducer: Reduce + + public init(reducer: Reduce) { + self.reducer = reducer + } + + @ObservableState + public struct State: Equatable { + public init() { + + } + } + + public enum Action: BindableAction { + case binding(BindingAction) + } + + public var body: some ReducerOf { + reducer + } +} diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeatureInterface.swift b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeatureInterface.swift new file mode 100644 index 00000000..c842b715 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingFeatureInterface.swift @@ -0,0 +1,20 @@ +// +// GoodFeelingFeature.swift +// FeatureGoodFeelingInterface +// +// Created by JongHoon on 10/6/24. +// + +import Foundation + +import ComposableArchitecture + +extension GoodFeelingFeature { + public init() { + let reducer = Reduce { state, action in + return .none + } + + self.init(reducer: reducer) + } +} diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingView.swift b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingView.swift new file mode 100644 index 00000000..747d650a --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/GoodFeeling/GoodFeelingView.swift @@ -0,0 +1,31 @@ +// +// GoodFeelingView.swift +// FeatureGoodFeelingInterface +// +// Created by JongHoon on 10/6/24. +// + +import SwiftUI + +import FeatureBaseWebViewInterface + +import ComposableArchitecture + +public struct GoodFeelingView: View { + @Perception.Bindable private var store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some View { + WithPerceptionTracking { + BaseWebView( + type: .goodFeeling, + actionDidInputted: { action in + // TODO: action handling + } + ) + } + } +} diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/Root/FeatureGoodFeelingRootView.swift b/Projects/Feature/GoodFeeling/Interface/Sources/Root/FeatureGoodFeelingRootView.swift new file mode 100644 index 00000000..59ed4db6 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/Root/FeatureGoodFeelingRootView.swift @@ -0,0 +1,42 @@ +// +// FeatureGoodFeelingRootView.swift +// FeatureGoodFeeling +// +// Created by JongHoon on 10/6/24. +// + +import SwiftUI + +import SharedDesignSystem + +import ComposableArchitecture + +public struct GoodFeelingRootView: View { + @Perception.Bindable private var store: StoreOf + + public init(store: StoreOf) { + self.store = store + } + + public var body: some View { + WithPerceptionTracking { + NavigationStack(path: $store.scope(state: \.path, action: \.path)) { + VStack(spacing: 0.0) { + GoodFeelingView(store: store.scope( + state: \.goodFeeling, + action: \.goodFeeling + )) + Spacer() + .frame(height: BottleConstants.bottomTabBarHeight.value) + } + .setTabBar(selectedTab: .goodFeeling) { selectedTab in + store.send(.selectedTabDidChanged(selectedTab)) + } + } destination: { store in + WithPerceptionTracking { + + } + } + } + } +} diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeature.swift b/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeature.swift new file mode 100644 index 00000000..8d530da2 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeature.swift @@ -0,0 +1,59 @@ +// +// GoodFeelingRootFeature.swift +// FeatureGoodFeelingInterface +// +// Created by JongHoon on 10/6/24. +// + +import Foundation + +import FeatureTabBarInterface + +import ComposableArchitecture + +@Reducer +public struct GoodFeelingRootFeature { + private let reducer: Reduce + + public init(reducer: Reduce) { + self.reducer = reducer + } + + @Reducer(state: .equatable) + public enum Path { + + } + + @ObservableState + public struct State: Equatable { + public var goodFeeling: GoodFeelingFeature.State + + var path = StackState() + + public init() { + self.goodFeeling = .init() + } + } + + public enum Action { + case selectedTabDidChanged(TabType) + case goodFeeling(GoodFeelingFeature.Action) + + case path(StackAction) + case delegate(Delegate) + + public enum Delegate { + case selectedTabDidChanged(TabType) + } + } + + public var body: some ReducerOf { + Scope(state: \.goodFeeling, action: \.goodFeeling) { + GoodFeelingFeature() + } + + reducer + .forEach(\.path, action: \.path) + } +} + diff --git a/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeatureInterface.swift b/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeatureInterface.swift new file mode 100644 index 00000000..a1db7c60 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Interface/Sources/Root/GoodFeelingRootFeatureInterface.swift @@ -0,0 +1,26 @@ +// +// GoodFeelingRootFeatureInterface.swift +// FeatureGoodFeelingInterface +// +// Created by JongHoon on 10/6/24. +// + +import Foundation + +import ComposableArchitecture + +extension GoodFeelingRootFeature { + public init() { + let reducer = Reduce { state, action in + switch action { + case let .selectedTabDidChanged(selectedTab): + return .send(.delegate(.selectedTabDidChanged(selectedTab))) + + default: + return .none + } + } + + self.init(reducer: reducer) + } +} diff --git a/Projects/Feature/GoodFeeling/Project.swift b/Projects/Feature/GoodFeeling/Project.swift new file mode 100644 index 00000000..b63af4e7 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Project.swift @@ -0,0 +1,53 @@ +import ProjectDescription +import ProjectDescriptionHelpers +import DependencyPlugin + +let project = Project.makeModule( + name: ModulePath.Feature.name+ModulePath.Feature.GoodFeeling.rawValue, + targets: [ + .feature( + interface: .GoodFeeling, + factory: .init( + dependencies: [ + .domain, + .feature(interface: .TabBar), + .feature(interface: .BaseWebView) + ] + ) + ), + .feature( + implements: .GoodFeeling, + factory: .init( + dependencies: [ + .feature(interface: .GoodFeeling) + ] + ) + ), + .feature( + testing: .GoodFeeling, + factory: .init( + dependencies: [ + .feature(interface: .GoodFeeling) + ] + ) + ), + .feature( + tests: .GoodFeeling, + factory: .init( + dependencies: [ + .feature(testing: .GoodFeeling), + .feature(implements: .GoodFeeling) + ] + ) + ), + .feature( + example: .GoodFeeling, + factory: .init( + dependencies: [ + .feature(testing: .GoodFeeling), + .feature(implements: .GoodFeeling) + ] + ) + ) + ] +) diff --git a/Projects/Feature/GoodFeeling/Sources/Source.swift b/Projects/Feature/GoodFeeling/Sources/Source.swift new file mode 100644 index 00000000..b1853ce6 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Sources/Source.swift @@ -0,0 +1 @@ +// This is for Tuist diff --git a/Projects/Feature/GoodFeeling/Testing/Sources/GoodFeelingTesting.swift b/Projects/Feature/GoodFeeling/Testing/Sources/GoodFeelingTesting.swift new file mode 100644 index 00000000..b1853ce6 --- /dev/null +++ b/Projects/Feature/GoodFeeling/Testing/Sources/GoodFeelingTesting.swift @@ -0,0 +1 @@ +// This is for Tuist diff --git a/Projects/Feature/GoodFeeling/Tests/Sources/GoodFeelingTest.swift b/Projects/Feature/GoodFeeling/Tests/Sources/GoodFeelingTest.swift new file mode 100644 index 00000000..c453bfff --- /dev/null +++ b/Projects/Feature/GoodFeeling/Tests/Sources/GoodFeelingTest.swift @@ -0,0 +1,11 @@ +import XCTest + +final class GoodFeelingTests: XCTestCase { + override func setUpWithError() throws {} + + override func tearDownWithError() throws {} + + func testExample() { + XCTAssertEqual(1, 1) + } +} diff --git a/Projects/Feature/Sources/TabView/MainTabView.swift b/Projects/Feature/Sources/TabView/MainTabView.swift index 32787aa8..60833013 100644 --- a/Projects/Feature/Sources/TabView/MainTabView.swift +++ b/Projects/Feature/Sources/TabView/MainTabView.swift @@ -7,9 +7,10 @@ import SwiftUI +import FeatureSandBeachInterface +import FeatureGoodFeelingInterface import FeatureBottleStorageInterface import FeatureMyPageInterface -import FeatureSandBeachInterface import FeatureTabBarInterface import SharedDesignSystem @@ -30,6 +31,10 @@ public struct MainTabView: View { .tag(TabType.sandBeach) .toolbar(.hidden, for: .tabBar) + GoodFeelingRootView(store: store.scope(state: \.goodFeelingRoot, action: \.goodFeelingRoot)) + .tag(TabType.goodFeeling) + .toolbar(.hidden, for: .tabBar) + BottleStorageView(store: store.scope(state: \.bottleStorage, action: \.bottleStorage)) .tag(TabType.bottleStorage) .toolbar(.hidden, for: .tabBar) diff --git a/Projects/Feature/Sources/TabView/MainTabViewFeature.swift b/Projects/Feature/Sources/TabView/MainTabViewFeature.swift index ecbe49c7..755c5400 100644 --- a/Projects/Feature/Sources/TabView/MainTabViewFeature.swift +++ b/Projects/Feature/Sources/TabView/MainTabViewFeature.swift @@ -7,12 +7,14 @@ import Foundation +import FeatureSandBeach +import FeatureSandBeachInterface +import FeatureGoodFeeling +import FeatureGoodFeelingInterface import FeatureBottleStorage import FeatureBottleStorageInterface import FeatureMyPage import FeatureMyPageInterface -import FeatureSandBeach -import FeatureSandBeachInterface import FeatureTabBarInterface import ComposableArchitecture @@ -23,12 +25,14 @@ public struct MainTabViewFeature { @ObservableState public struct State: Equatable { var sandBeachRoot: SandBeachRootFeature.State + var goodFeelingRoot: GoodFeelingRootFeature.State var bottleStorage: BottleStorageFeature.State var myPageRoot: MyPageRootFeature.State var selectedTab: TabType var isLoading: Bool public init() { self.sandBeachRoot = .init() + self.goodFeelingRoot = .init() self.bottleStorage = .init() self.myPageRoot = .init() self.selectedTab = .sandBeach @@ -38,6 +42,7 @@ public struct MainTabViewFeature { public enum Action: BindableAction { case sandBeachRoot(SandBeachRootFeature.Action) + case goodFeelingRoot(GoodFeelingRootFeature.Action) case bottleStorage(BottleStorageFeature.Action) case myPageRoot(MyPageRootFeature.Action) case selectedTabChanged(TabType) @@ -57,6 +62,9 @@ public struct MainTabViewFeature { Scope(state: \.sandBeachRoot, action: \.sandBeachRoot) { SandBeachRootFeature() } + Scope(state: \.goodFeelingRoot, action: \.goodFeelingRoot) { + GoodFeelingRootFeature() + } Scope(state: \.bottleStorage, action: \.bottleStorage) { BottleStorageFeature() } @@ -87,6 +95,14 @@ public struct MainTabViewFeature { } return .none + // GoodFeeling Delegate + case let .goodFeelingRoot(.delegate(delegate)): + switch delegate { + case let .selectedTabDidChanged(selectedTab): + state.selectedTab = selectedTab + return .none + } + // BottleStorage Delegate case let .bottleStorage(.delegate(delegate)): switch delegate { diff --git a/Projects/Feature/TabBar/Interface/Sources/TabType.swift b/Projects/Feature/TabBar/Interface/Sources/TabType.swift index b001961c..a89c7be8 100644 --- a/Projects/Feature/TabBar/Interface/Sources/TabType.swift +++ b/Projects/Feature/TabBar/Interface/Sources/TabType.swift @@ -10,6 +10,7 @@ import SharedDesignSystem public enum TabType: Hashable, CaseIterable { case sandBeach + case goodFeeling case bottleStorage case myPage @@ -18,6 +19,9 @@ public enum TabType: Hashable, CaseIterable { case .sandBeach: return "모래사장" + case .goodFeeling: + return "호감" + case .bottleStorage: return "보틀 보관함" @@ -29,13 +33,16 @@ public enum TabType: Hashable, CaseIterable { var image: Image.BottleImageSystem { switch self { case .sandBeach: - return .icom(.sandBeach) + return .icon(.sandBeach) + + case .goodFeeling: + return .icon(.goodFeeling) case .bottleStorage: - return .icom(.bottleStorage) + return .icon(.bottleStorage) case .myPage: - return .icom(.myPage) + return .icon(.myPage) } } } diff --git a/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/Contents.json b/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/Contents.json new file mode 100644 index 00000000..3280bd66 --- /dev/null +++ b/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "filename" : "icon_heart.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" + } +} diff --git a/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/icon_heart.svg b/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/icon_heart.svg new file mode 100644 index 00000000..5c514d3c --- /dev/null +++ b/Projects/Shared/DesignSystem/Resources/Images.xcassets/icon/icon_heart.imageset/icon_heart.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Projects/Shared/DesignSystem/Sources/Components/Alert/BottleAlertView.swift b/Projects/Shared/DesignSystem/Sources/Components/Alert/BottleAlertView.swift index 80228c04..a25aae16 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Alert/BottleAlertView.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Alert/BottleAlertView.swift @@ -53,7 +53,7 @@ struct BottleAlertView: View where A: View, M: View { private extension BottleAlertView { var alertImage: some View { - BottleImageView(type: .local(bottleImageSystem: .icom(.warning))) + BottleImageView(type: .local(bottleImageSystem: .icon(.warning))) .foregroundStyle(to: ColorToken.icon(.primary)) .padding(.top, .lg) .padding(.bottom, .xs) diff --git a/Projects/Shared/DesignSystem/Sources/Components/Button/OutlinedButton/OutlinedStyleButton.swift b/Projects/Shared/DesignSystem/Sources/Components/Button/OutlinedButton/OutlinedStyleButton.swift index bfa51416..f6dba8b7 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Button/OutlinedButton/OutlinedStyleButton.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Button/OutlinedButton/OutlinedStyleButton.swift @@ -132,7 +132,7 @@ private extension OutlinedStyleButton { default: assertionFailure("Wrong Image Configuration") - return .local(bottleImageSystem: .icom(.siren)) + return .local(bottleImageSystem: .icon(.siren)) } case let .local(bottleImageSystem): diff --git a/Projects/Shared/DesignSystem/Sources/Components/Button/SolidButton/SolidButton.swift b/Projects/Shared/DesignSystem/Sources/Components/Button/SolidButton/SolidButton.swift index b3fae586..8df94456 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Button/SolidButton/SolidButton.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Button/SolidButton/SolidButton.swift @@ -87,10 +87,10 @@ extension SolidButton { var image: some View { switch buttonApperance { case .kakao: - BottleImageView(type: .local(bottleImageSystem: .icom(.kakaoLogo))) + BottleImageView(type: .local(bottleImageSystem: .icon(.kakaoLogo))) case .apple: - BottleImageView(type: .local(bottleImageSystem: .icom(.appleLogo))) + BottleImageView(type: .local(bottleImageSystem: .icon(.appleLogo))) case .solid: EmptyView() case .generalSignIn: diff --git a/Projects/Shared/DesignSystem/Sources/Components/Card/PingPong/PingPongContainerView.swift b/Projects/Shared/DesignSystem/Sources/Components/Card/PingPong/PingPongContainerView.swift index f77e13ea..a631779d 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Card/PingPong/PingPongContainerView.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Card/PingPong/PingPongContainerView.swift @@ -62,7 +62,7 @@ private extension PingPongContainer { Spacer() - LocalImageView(.icom(.up)) + LocalImageView(.icon(.up)) .rotationEffect(.degrees((isHidden ? -180 : 0))) .asButton { withAnimation(.snappy) { diff --git a/Projects/Shared/DesignSystem/Sources/Components/Card/UserProfile/UserProfileView.swift b/Projects/Shared/DesignSystem/Sources/Components/Card/UserProfile/UserProfileView.swift index 6ae44506..014ad572 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/Card/UserProfile/UserProfileView.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/Card/UserProfile/UserProfileView.swift @@ -70,7 +70,7 @@ private extension UserProfileView { } var verticalLine: some View { - LocalImageView(.icom(.verticalLine)) + LocalImageView(.icon(.verticalLine)) .foregroundStyle(to: ColorToken.border(.secondary)) } diff --git a/Projects/Shared/DesignSystem/Sources/Components/ETC/ImagePickerButton.swift b/Projects/Shared/DesignSystem/Sources/Components/ETC/ImagePickerButton.swift index 8f06031c..9882812c 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/ETC/ImagePickerButton.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/ETC/ImagePickerButton.swift @@ -55,7 +55,7 @@ private extension ImagePickerButton { deleteButton } } else { - LocalImageView(.icom(.plus)) + LocalImageView(.icon(.plus)) .frame(width: width, height: width, alignment: .center) } } @@ -68,7 +68,7 @@ private extension ImagePickerButton { .clipShape(RoundedRectangle(cornerRadius: BottleRadiusType.xs.value)) .frame(width: 36, height: 36) .overlay { - LocalImageView(.icom(.clearDelete)) + LocalImageView(.icon(.clearDelete)) .asThrottleButton { self.selectedImage.removeAll() action() diff --git a/Projects/Shared/DesignSystem/Sources/Components/List/ArrowListView.swift b/Projects/Shared/DesignSystem/Sources/Components/List/ArrowListView.swift index 71f8bd43..a1f91696 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/List/ArrowListView.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/List/ArrowListView.swift @@ -33,7 +33,7 @@ private extension ArrowListView { var rightArrowImage: some View { BottleImageView( type: .local( - bottleImageSystem: .icom(.right) + bottleImageSystem: .icon(.right) ) ) .foregroundStyle(to: ColorToken.icon(.primary)) diff --git a/Projects/Shared/DesignSystem/Sources/Components/TextField/LineTextField/LineTextField.swift b/Projects/Shared/DesignSystem/Sources/Components/TextField/LineTextField/LineTextField.swift index 8065f33b..1b0ebbcf 100644 --- a/Projects/Shared/DesignSystem/Sources/Components/TextField/LineTextField/LineTextField.swift +++ b/Projects/Shared/DesignSystem/Sources/Components/TextField/LineTextField/LineTextField.swift @@ -49,7 +49,7 @@ private extension LineTextField { if text.isEmpty { EmptyView() } else { - BottleImageView(type: .local(bottleImageSystem: .icom(.delete))) + BottleImageView(type: .local(bottleImageSystem: .icon(.delete))) .foregroundStyle(to: ColorToken.icon(.primary)) .asThrottleButton { self.text = "" diff --git a/Projects/Shared/DesignSystem/Sources/Image/BottleImageSystem+Icon.swift b/Projects/Shared/DesignSystem/Sources/Image/BottleImageSystem+Icon.swift index 6abc53c8..c4bccc03 100644 --- a/Projects/Shared/DesignSystem/Sources/Image/BottleImageSystem+Icon.swift +++ b/Projects/Shared/DesignSystem/Sources/Image/BottleImageSystem+Icon.swift @@ -22,6 +22,7 @@ public extension Image.BottleImageSystem { case kakaoLogo case sandBeach case bottleStorage + case goodFeeling case myPage case appleLogo case warning @@ -61,6 +62,9 @@ public extension Image.BottleImageSystem.Icon { case .bottleStorage: return SharedDesignSystemAsset.Images.iconBottleStorage.swiftUIImage + case .goodFeeling: + return SharedDesignSystemAsset.Images.iconHeart.swiftUIImage + case .myPage: return SharedDesignSystemAsset.Images.iconMyPage.swiftUIImage diff --git a/Projects/Shared/DesignSystem/Sources/Image/Image+Extensions.swift b/Projects/Shared/DesignSystem/Sources/Image/Image+Extensions.swift index 28d6c5f6..8affd312 100644 --- a/Projects/Shared/DesignSystem/Sources/Image/Image+Extensions.swift +++ b/Projects/Shared/DesignSystem/Sources/Image/Image+Extensions.swift @@ -9,12 +9,12 @@ import SwiftUI public extension Image { enum BottleImageSystem: Imageable { - case icom(Icon) + case icon(Icon) case illustraition(Illustraition) public var image: Image { switch self { - case .icom(let icon): + case .icon(let icon): return icon.image case .illustraition(let illustraition): return illustraition.image @@ -23,7 +23,7 @@ public extension Image { public var description: String { switch self { - case .icom: + case .icon: return "icon" case .illustraition: return "illustraition" diff --git a/Projects/Shared/DesignSystem/Sources/Modifiers/NavigationBarModifier.swift b/Projects/Shared/DesignSystem/Sources/Modifiers/NavigationBarModifier.swift index aacd17ba..9cf2edb6 100644 --- a/Projects/Shared/DesignSystem/Sources/Modifiers/NavigationBarModifier.swift +++ b/Projects/Shared/DesignSystem/Sources/Modifiers/NavigationBarModifier.swift @@ -103,13 +103,13 @@ public extension View { public extension View { func makeNaivgationleftButton(action: (() -> Void)? = nil) -> some View { - BottleImageView(type: .local(bottleImageSystem: .icom(.leftArrow))) + BottleImageView(type: .local(bottleImageSystem: .icon(.leftArrow))) .foregroundStyle(to: ColorToken.icon(.primary)) .asThrottleButton(action: action ?? {}) } func makeNavigationReportButton(action: (() -> Void)? = nil) -> some View { - BottleImageView(type: .local(bottleImageSystem: .icom(.siren))) + BottleImageView(type: .local(bottleImageSystem: .icon(.siren))) .foregroundStyle(to: ColorToken.icon(.primary)) .asThrottleButton(action: action ?? {}) }