From a42edbe99cec78dd8b197c7982b4f4da734881f9 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 3 Sep 2025 17:37:23 +0900 Subject: [PATCH] =?UTF-8?q?feat(chat-room):=20=EC=B1=84=ED=8C=85=EB=B0=A9?= =?UTF-8?q?=EC=97=90=20=ED=95=84=EC=9A=94=ED=95=9C=20=EA=B8=B0=EB=B3=B8?= =?UTF-8?q?=EC=A0=81=EC=9D=B8=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chat/Talk/Room/ChatRoomHeaderView.swift | 18 ++++++++++++++++ .../Chat/Talk/Room/ChatRoomViewModel.swift | 1 + .../Talk/Room/Disclaimer/DisclaimerView.swift | 18 ++++++++++++++++ .../Talk/Room/Message/MessageInputView.swift | 18 ++++++++++++++++ .../Room/Quota/ChatQuotaPurchaseRequest.swift | 4 +++- .../Room/Quota/ChatQuotaStatusResponse.swift | 5 ++++- .../Room/Settings/ChatBgSelectionView.swift | 18 ++++++++++++++++ .../Talk/Room/Settings/ChatSettingsView.swift | 18 ++++++++++++++++ .../Room/Settings/ChatSettingsViewModel.swift | 21 +++++++++++++++++++ 9 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 SodaLive/Sources/Chat/Talk/Room/ChatRoomHeaderView.swift create mode 100644 SodaLive/Sources/Chat/Talk/Room/Disclaimer/DisclaimerView.swift create mode 100644 SodaLive/Sources/Chat/Talk/Room/Message/MessageInputView.swift create mode 100644 SodaLive/Sources/Chat/Talk/Room/Settings/ChatBgSelectionView.swift create mode 100644 SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsView.swift create mode 100644 SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsViewModel.swift diff --git a/SodaLive/Sources/Chat/Talk/Room/ChatRoomHeaderView.swift b/SodaLive/Sources/Chat/Talk/Room/ChatRoomHeaderView.swift new file mode 100644 index 0000000..a00b844 --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/ChatRoomHeaderView.swift @@ -0,0 +1,18 @@ +// +// ChatRoomHeaderView.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import SwiftUI + +struct ChatRoomHeaderView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + ChatRoomHeaderView() +} diff --git a/SodaLive/Sources/Chat/Talk/Room/ChatRoomViewModel.swift b/SodaLive/Sources/Chat/Talk/Room/ChatRoomViewModel.swift index 8680046..8d6c5b5 100644 --- a/SodaLive/Sources/Chat/Talk/Room/ChatRoomViewModel.swift +++ b/SodaLive/Sources/Chat/Talk/Room/ChatRoomViewModel.swift @@ -16,6 +16,7 @@ final class ChatRoomViewModel: ObservableObject { @Published var isShowPopup = false // MARK: - Private + private let userRepository = UserRepository() private let repository = ChatRoomRepository() private var subscription = Set() } diff --git a/SodaLive/Sources/Chat/Talk/Room/Disclaimer/DisclaimerView.swift b/SodaLive/Sources/Chat/Talk/Room/Disclaimer/DisclaimerView.swift new file mode 100644 index 0000000..b003ef1 --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/Disclaimer/DisclaimerView.swift @@ -0,0 +1,18 @@ +// +// DisclaimerView.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import SwiftUI + +struct DisclaimerView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + DisclaimerView() +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Message/MessageInputView.swift b/SodaLive/Sources/Chat/Talk/Room/Message/MessageInputView.swift new file mode 100644 index 0000000..00bb5d8 --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/Message/MessageInputView.swift @@ -0,0 +1,18 @@ +// +// MessageInputView.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import SwiftUI + +struct MessageInputView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + MessageInputView() +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaPurchaseRequest.swift b/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaPurchaseRequest.swift index 7bd49e9..a964065 100644 --- a/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaPurchaseRequest.swift +++ b/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaPurchaseRequest.swift @@ -5,4 +5,6 @@ // Created by klaus on 9/2/25. // -import Foundation +struct ChatQuotaPurchaseRequest: Encodable { + let container: String = "ios" +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaStatusResponse.swift b/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaStatusResponse.swift index 68fd2f2..c7cefe3 100644 --- a/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaStatusResponse.swift +++ b/SodaLive/Sources/Chat/Talk/Room/Quota/ChatQuotaStatusResponse.swift @@ -5,4 +5,7 @@ // Created by klaus on 9/2/25. // -import Foundation +struct ChatQuotaStatusResponse: Decodable { + let totalRemaining: Int + let nextRechargeAtEpoch: Int64 +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Settings/ChatBgSelectionView.swift b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatBgSelectionView.swift new file mode 100644 index 0000000..d8b790e --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatBgSelectionView.swift @@ -0,0 +1,18 @@ +// +// ChatBgSelectionView.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import SwiftUI + +struct ChatBgSelectionView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + ChatBgSelectionView() +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsView.swift b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsView.swift new file mode 100644 index 0000000..5be04f2 --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsView.swift @@ -0,0 +1,18 @@ +// +// ChatSettingsView.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import SwiftUI + +struct ChatSettingsView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + ChatSettingsView() +} diff --git a/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsViewModel.swift b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsViewModel.swift new file mode 100644 index 0000000..7d332ab --- /dev/null +++ b/SodaLive/Sources/Chat/Talk/Room/Settings/ChatSettingsViewModel.swift @@ -0,0 +1,21 @@ +// +// ChatSettingsViewModel.swift +// SodaLive +// +// Created by klaus on 9/3/25. +// + +import Foundation +import Combine +import Moya + +final class ChatSettingsViewModel: ObservableObject { + // MARK: - Published State + @Published var isLoading: Bool = false + @Published var errorMessage: String = "" + @Published var isShowPopup = false + + // MARK: - Private + private let repository = ChatRoomRepository() + private var subscription = Set() +}