Skip to content

Commit

Permalink
✨ :: [#220] MyPageFeature / 저장 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Aug 4, 2023
1 parent 2a243f0 commit 19578e4
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 64 deletions.
12 changes: 1 addition & 11 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


import AuthDomain
import AuthDomainInterface
import BaseDomain
Expand Down Expand Up @@ -56,7 +54,7 @@ import UserDomain
import UserDomainInterface

// swiftlint:disable unused_declaration
private let needleDependenciesHash : String? = nil
private let needleDependenciesHash: String? = nil

// MARK: - Traversal Helpers

Expand Down Expand Up @@ -125,7 +123,6 @@ private func factory0f6f456ebf157d02dfb3f47b58f8f304c97af4d5(_ component: Needle
}
private class InputWorkInfoDependency74441f61366e4e5af9a2Provider: InputWorkInfoDependency {


init() {

}
Expand Down Expand Up @@ -161,7 +158,6 @@ private func factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5(_ component: Needle
}
private class InputSchoolLifeInfoDependency30edf0903f9bdb7a60fbProvider: InputSchoolLifeInfoDependency {


init() {

}
Expand Down Expand Up @@ -229,7 +225,6 @@ private func factory2882a056d84a613debccf47b58f8f304c97af4d5(_ component: Needle
}
private class InputMilitaryInfoDependency0cd58f3f7088aec361b6Provider: InputMilitaryInfoDependency {


init() {

}
Expand All @@ -240,7 +235,6 @@ private func factory6e35522c47cca1190471e3b0c44298fc1c149afb(_ component: Needle
}
private class InputLanguageInfoDependencye83ef16d0fe38d31cb64Provider: InputLanguageInfoDependency {


init() {

}
Expand Down Expand Up @@ -304,7 +298,6 @@ private func factory0b9613d8c923fa9ae897f47b58f8f304c97af4d5(_ component: Needle
}
private class InputCertificateInfoDependencyd369771b4dc3e8540791Provider: InputCertificateInfoDependency {


init() {

}
Expand Down Expand Up @@ -347,7 +340,6 @@ private func factoryb3d74d9bff60efbc0282f47b58f8f304c97af4d5(_ component: Needle
}
private class InputPrizeInfoDependencyff32e2191f3500ff4774Provider: InputPrizeInfoDependency {


init() {

}
Expand Down Expand Up @@ -444,7 +436,6 @@ extension JwtStoreComponent: Registration {
extension AppComponent: Registration {
public func registerItems() {


}
}
extension KeychainComponent: Registration {
Expand Down Expand Up @@ -590,7 +581,6 @@ extension UserDomainComponent: Registration {
}
}


#endif

private func factoryEmptyDependencyProvider(_ component: NeedleFoundation.Scope) -> AnyObject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import SwiftUI
internal struct PressedSelectionButtonStyle: ButtonStyle {
var isSelected: Bool

init(isSelected: Bool) {
self.isSelected = isSelected
}

@ViewBuilder
func makeBody(configuration: Configuration) -> some View {
Circle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension RefreshEndpoint {
return .none
}

var headers: [String : String]? {
var headers: [String: String]? {
switch self {
case let .refresh(refreshToken):
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ public extension SortType {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Foundation

public enum UserDomainError: Error {

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@ import Foundation
struct LanguageInputModel: Equatable {
let languageName: String
let languageScore: String

init(languageName: String, languageScore: String) {
self.languageName = languageName
self.languageScore = languageScore
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ import StudentDomainInterface
struct LanguageModel: Equatable {
var name: String
var score: String

init(name: String, score: String) {
self.name = name
self.score = score
}
}

protocol MyPageLanguageInfoStateProtocol {
Expand Down
22 changes: 18 additions & 4 deletions Projects/Feature/MyPageFeature/Sources/Scene/MyPageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DesignSystem

struct MyPageView: View {
@Environment(\.dismiss) var dismiss
@Environment(\.safeAreaInsets) var safeAreaInsets
@StateObject var container: MVIContainer<MyPageIntentProtocol, MyPageStateProtocol>
var intent: any MyPageIntentProtocol { container.intent }
var state: any MyPageStateProtocol { container.model }
Expand Down Expand Up @@ -93,12 +94,25 @@ struct MyPageView: View {
}
}
}

CTAButton(text: "저장") {
#warning("저장 로직 추가")
}
.padding(.horizontal, 20)
.padding(.bottom, safeAreaInsets.bottom + 16)
.background {
Color.sms(.system(.white))
}
.ignoresSafeArea()
}
}
.smsBottomSheet(isShowing: Binding(
get: { state.isPresentedExistActionSheet },
set: { _ in intent.existActionSheetDismissed() }
)) {
.edgesIgnoringSafeArea([.bottom])
.smsBottomSheet(
isShowing: Binding(
get: { state.isPresentedExistActionSheet },
set: { _ in intent.existActionSheetDismissed() }
)
) {
VStack(alignment: .leading, spacing: 32) {
Button {
intent.logoutDialogIsRequired()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import SwiftUI
struct StudentDetailTitleWrapper: ViewModifier {
let title: String

init(title: String) {
self.title = title
}

func body(content: Content) -> some View {
VStack(alignment: .leading, spacing: 8) {
Text(title)
Expand Down
4 changes: 1 addition & 3 deletions Scripts/CodeSigning.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/swift
import Foundation

func handleSIGINT(_ signal: Int32) -> Void {
func handleSIGINT(_ signal: Int32) {
exit(0)
}

Expand Down Expand Up @@ -32,5 +32,3 @@ public extension SettingsDictionary {
writeContentInFile(path: "Tuist/ProjectDescriptionHelpers/CodeSign.swift", content: codeSignContent)

print("✅ Code Sign extension generated successfully!")


8 changes: 4 additions & 4 deletions Scripts/GenerateFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//import ProjectDescription
//import ProjectDescriptionHelpers
// import ProjectDescription
// import ProjectDescriptionHelpers
//
//let project = Project.staticFramework(
// let project = Project.staticFramework(
// name: "Feature",
// dependencies: [
// .Project.Features.Feature
// ]
//)
// )
21 changes: 9 additions & 12 deletions Scripts/GenerateModule.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/swift
import Foundation

func handleSIGINT(_ signal: Int32) -> Void {
func handleSIGINT(_ signal: Int32) {
exit(0)
}

Expand Down Expand Up @@ -124,7 +124,7 @@ let project = Project.makeModule(
"""
writeContentInFile(
path: currentPath + "Projects/\(layer.rawValue)/\(moduleName)/Project.swift",
path: currentPath + "Projects/\(layer.rawValue)/\(moduleName)/Project.swift",
content: projectSwift
)
}
Expand All @@ -135,14 +135,14 @@ func makeProjectDirectory() {

func makeProjectScaffold(targetString: String) {
_ = try? bash.run(
commandName: "tuist",
commandName: "tuist",
arguments: ["scaffold", "Module", "--name", "\(moduleName)", "--layer", "\(layer.rawValue)", "--target", "\(targetString)"]
)
}

func makeScaffold(target: MicroTargetType) {
_ = try? bash.run(
commandName: "tuist",
commandName: "tuist",
arguments: ["scaffold", "\(target.rawValue)", "--name", "\(moduleName)", "--layer", "\(layer.rawValue)"]
)
}
Expand All @@ -162,7 +162,7 @@ func updateFileContent(
guard let readHandle = try? FileHandle(forReadingFrom: fileURL) else {
fatalError("❌ Failed to find \(filePath)")
}
guard let readData = try? readHandle.readToEnd() else {
guard let readData = try? readHandle.readToEnd() else {
fatalError("❌ Failed to find \(filePath)")
}
try? readHandle.close()
Expand All @@ -178,14 +178,13 @@ func updateFileContent(
try? writeHandle.close()
}


// MARK: - Starting point

print("Enter layer name\n(Feature | Domain | Core | Shared)", terminator: " : ")
let layerInput = readLine()
guard
let layerInput,
!layerInput.isEmpty ,
guard
let layerInput,
!layerInput.isEmpty,
let layerUnwrapping = LayerType(rawValue: layerInput)
else {
print("Layer is empty or invalid")
Expand Down Expand Up @@ -230,7 +229,6 @@ print("interface: \(hasInterface), testing: \(hasTesting), unitTests: \(hasUnitT
print("------------------------------------------------------------------------------------------------------------------------")
print("✅ Module is created successfully!")


// MARK: - Bash
protocol CommandExecuting {
func run(commandName: String, arguments: [String]) throws -> String
Expand All @@ -246,7 +244,7 @@ struct Bash: CommandExecuting {
}

private func resolve(_ command: String) throws -> String {
guard var bashCommand = try? run("/bin/bash" , with: ["-l", "-c", "which \(command)"]) else {
guard var bashCommand = try? run("/bin/bash", with: ["-l", "-c", "which \(command)"]) else {
throw BashError.commandNotFound(name: command)
}
bashCommand = bashCommand.trimmingCharacters(in: NSCharacterSet.whitespacesAndNewlines)
Expand All @@ -265,4 +263,3 @@ struct Bash: CommandExecuting {
return output
}
}

2 changes: 1 addition & 1 deletion Scripts/InitEnvironment.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/swift
import Foundation

func handleSIGINT(_ signal: Int32) -> Void {
func handleSIGINT(_ signal: Int32) {
exit(0)
}

Expand Down
5 changes: 2 additions & 3 deletions Scripts/NewDependency.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/swift
import Foundation

func handleSIGINT(_ signal: Int32) -> Void {
func handleSIGINT(_ signal: Int32) {
exit(0)
}

Expand All @@ -18,7 +18,7 @@ signal(SIGINT, handleSIGINT)
guard let readHandle = try? FileHandle(forReadingFrom: fileURL) else {
fatalError("❌ Failed to find \(filePath)")
}
guard let readData = try? readHandle.readToEnd() else {
guard let readData = try? readHandle.readToEnd() else {
fatalError("❌ Failed to find \(filePath)")
}
try? readHandle.close()
Expand Down Expand Up @@ -74,4 +74,3 @@ signal(SIGINT, handleSIGINT)
}

registerDependency(name: dependencyName, package: packageName, url: dependencyURL, version: dependencyVersion)

4 changes: 2 additions & 2 deletions Tuist/Dependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ let dependencies = Dependencies(
.remote(url: "https://github.com/GSM-MSG/GAuthSignin-Swift", requirement: .exact("0.0.3")),
.remote(url: "https://github.com/Quick/Nimble.git", requirement: .exact("11.2.2")),
.remote(url: "https://github.com/Quick/Quick.git", requirement: .exact("6.1.0")),
.remote(url: "https://github.com/GSM-MSG/Emdpoint.git", requirement: .exact("3.2.11")),
.remote(url: "https://github.com/GSM-MSG/Emdpoint.git", requirement: .exact("3.2.11"))

],
baseSettings: .settings(
configurations: [
Expand Down
2 changes: 1 addition & 1 deletion Tuist/ProjectDescriptionHelpers/Project+Template.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public extension Project {
infoPlist: .extendingDefault(with: [
"UIMainStoryboardFile": "",
"UILaunchStoryboardName": "LaunchScreen",
"ENABLE_TESTS": .boolean(true),
"ENABLE_TESTS": .boolean(true)
]),
sources: .demoSources,
resources: ["Demo/Resources/**"],
Expand Down
2 changes: 1 addition & 1 deletion Tuist/Templates/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ private let template = Template(
.file(
path: "Projects/\(layerAttribute)/\(nameAttribute)/Tests/\(nameAttribute)Test.swift",
templatePath: "Tests.stencil"
),
)
]
)
2 changes: 1 addition & 1 deletion Tuist/Templates/UITests/UITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ private let template = Template(
.file(
path: "Projects/\(layerAttribute)/\(nameAttribute)/UITests/\(nameAttribute)UITests.swift",
templatePath: "UITests.stencil"
),
)
]
)

0 comments on commit 19578e4

Please sign in to comment.