Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions Modules/Presentation/Login/Project.swift

This file was deleted.

29 changes: 0 additions & 29 deletions Modules/Presentation/Login/Sources/View/ViewController.swift

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Modules/Shared/UIComponents/Sources/.swift

This file was deleted.

3 changes: 2 additions & 1 deletion Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ let project = Project(
]
),
sources: ["Sources/**"],
resources: ["Resources/**"],
dependencies: [
.project(target: "Login", path: "../../Modules/Presentation/Login")
.project(target: "Presentation", path: "../Presentation")
]
)
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
7 changes: 3 additions & 4 deletions Projects/App/Sources/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import UIKit
import Login
import DesignSystem

import Shared
import Presentation

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// MARK: - Tuist 디자인 시스템 폰트 등록 -
FontRegistrar.registerFont()
Pretendard.registerFont()

guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(frame: windowScene.coordinateSpace.bounds)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import ProjectDescription

let project = Project(
name: "AuthDomain",
name: "Data",
targets: [
.target(
name: "AuthDomain",
name: "Data",
destinations: .iOS,
product: .staticFramework,

bundleId: "com.hereit.domain.auth",
bundleId: "com.hereit.data",
infoPlist: .default,
sources: ["Sources/**"],
dependencies: []
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import ProjectDescription

let project = Project(
name: "AuthData",
name: "Domain",
targets: [
.target(
name: "AuthData",
name: "Domain",
destinations: .iOS,
product: .staticFramework,
bundleId: "com.hereit.data.auth",
bundleId: "com.hereit.domain",
infoPlist: .default,
sources: ["Sources/**"],
dependencies: [
.project(target: "AuthDomain", path: "../../Domain/Auth"),
]
dependencies: []
)
]
)
Empty file.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import ProjectDescription

let project = Project(
name: "UIComponents",
name: "Presentation",
targets: [
.target(
name: "UIComponents",
name: "Presentation",
destinations: .iOS,
product: .staticFramework,
bundleId: "com.hereit.shared.uicomponents",
bundleId: "com.hereit.presentation",
infoPlist: .default,
sources: ["Sources/**"],
resources: ["Resources/**"],
dependencies: [
.external(name: "SnapKit"),
.project(target: "DesignSystem", path: "../DesignSystem")
.project(target: "Domain", path: "../Domain"),
.project(target: "Data", path: "../Data"),
.project(target: "Shared", path: "../Shared")
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import UIKit

public enum LoginScene {
public static func create() -> UIViewController {
let viewModel = AuthViewModel()
let viewModel = LoginViewModel()
let viewController = LoginViewController(viewModel: viewModel)
return viewController
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import UIKit
import UIComponents
import DesignSystem
import Shared

final class LoginViewController: UIViewController {

// MARK: - Properties

private let viewModel: AuthViewModel
private let viewModel: LoginViewModel


private lazy var titleLabel: UILabel = {
Expand Down Expand Up @@ -172,7 +171,7 @@ final class LoginViewController: UIViewController {

// MARK: - Init

init(viewModel: AuthViewModel) {
init(viewModel: LoginViewModel) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
}
Expand Down Expand Up @@ -225,6 +224,6 @@ final class LoginViewController: UIViewController {
}

#Preview {
FontRegistrar.registerFont()
return LoginViewController(viewModel: AuthViewModel())
Pretendard.registerFont()
return LoginViewController(viewModel: LoginViewModel())
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import Foundation

final class AuthViewModel {
final class LoginViewModel {
var email : String = ""
func login(email: String, password: String) {
self.email = email
print("Logging in with email: \(email), password: \(password)")
}
func signup(fullName: String,email: String, password: String) {
print("Logging in with fullName: \(fullName) email: \(email), password: \(password)")
}

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import UIKit
import UIComponents
import DesignSystem
import Shared

final class SignUpViewController: UIViewController {
final class RegisterViewController: UIViewController {

// MARK: - Properties

private let viewModel: AuthViewModel
private let viewModel: RegisterViewModel


private lazy var titleLabel: UILabel = {
Expand Down Expand Up @@ -118,7 +117,7 @@ final class SignUpViewController: UIViewController {

// MARK: - Init

init(viewModel: AuthViewModel) {
init(viewModel: RegisterViewModel) {
self.viewModel = viewModel
super.init(nibName: nil, bundle: nil)
}
Expand Down Expand Up @@ -158,7 +157,7 @@ final class SignUpViewController: UIViewController {
let email = emailField.getTextField().text ?? ""
let password = passwordField.getTextField().text ?? ""

viewModel.signup(fullName: fullName, email: email, password: password)
viewModel.register(fullName: fullName, email: email, password: password)
}

@objc private func didTapForgotPassword() {
Expand All @@ -171,6 +170,6 @@ final class SignUpViewController: UIViewController {
}

#Preview {
FontRegistrar.registerFont()
return SignUpViewController(viewModel: AuthViewModel())
Pretendard.registerFont()
return RegisterViewController(viewModel: RegisterViewModel())
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Foundation

final class RegisterViewModel {
var email : String = ""
var password : String = ""
var fullName : String = ""

func register(fullName: String, email: String, password: String) {
self.email = email
self.password = email
self.fullName = email
print("Logging in with email: \(email), password: \(password)")
}

}
Loading