Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

로그인 페이지 퍼블리싱 #35

Merged
merged 15 commits into from
Aug 13, 2023
Merged
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Created by https://www.toptal.com/developers/gitignore/api/swiftpackagemanager,swift,xcode,macos,git
# Edit at https://www.toptal.com/developers/gitignore?templates=swiftpackagemanager,swift,xcode,macos,git

Expand Down Expand Up @@ -151,4 +152,7 @@ xcuserdata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# file: .gitignore
BASEURLInfo.plist

# End of https://www.toptal.com/developers/gitignore/api/swiftpackagemanager,swift,xcode,macos,git
Expand Down
138 changes: 73 additions & 65 deletions Idea-Archive.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "bc268c28fb170f494de9e9927c371b8342979ece",
"version" : "5.7.1"
}
},
{
"identity" : "iqkeyboardmanager",
"kind" : "remoteSourceControl",
"location" : "https://github.com/hackiftekhar/IQKeyboardManager",
"state" : {
"revision" : "ea08e08958890043019d248065fe3d825f338087",
"version" : "6.5.12"
}
},
{
"identity" : "junseopark-aeotptextfield",
"kind" : "remoteSourceControl",
"location" : "https://github.com/junseopark0331/junseopark-AEOTPTextField.git",
"state" : {
"branch" : "master",
"revision" : "fcfab5536514abf93ae05ac2896655c3bfa01a41"
}
},
{
"identity" : "moya",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Moya/Moya",
"state" : {
"revision" : "c263811c1f3dbf002be9bd83107f7cdc38992b26",
"version" : "15.0.3"
}
},
{
"identity" : "reactiveswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveCocoa/ReactiveSwift.git",
"state" : {
"revision" : "c43bae3dac73fdd3cb906bd5a1914686ca71ed3c",
"version" : "6.7.0"
}
},
{
"identity" : "rxkeyboard",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RxSwiftCommunity/RxKeyboard",
"state" : {
"revision" : "63f6377975c962a1d89f012a6f1e5bebb2c502b7",
"version" : "2.0.1"
}
},
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift.git",
"state" : {
"revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4",
"version" : "6.6.0"
}
},
{
"identity" : "snapkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SnapKit/SnapKit",
"state" : {
"branch" : "develop",
"revision" : "58320fe80522414bf3a7e24c88123581dc586752"
}
},
{
"identity" : "then",
"kind" : "remoteSourceControl",
"location" : "https://github.com/devxoul/Then",
"state" : {
"branch" : "master",
"revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a"
}
}
],
"version" : 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,77 +14,119 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
<integer>8</integer>
</dict>
<key>ReactiveSwift (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
<integer>9</integer>
</dict>
<key>ReactiveSwift (Playground) 3.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>ReactiveSwift (Playground) 4.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>14</integer>
</dict>
<key>ReactiveSwift (Playground) 5.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>15</integer>
</dict>
<key>ReactiveSwift (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
<integer>7</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
<integer>11</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
<integer>12</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 3.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>16</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 4.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>17</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground) 5.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>18</integer>
</dict>
<key>ReactiveSwift-UIExamples (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
<integer>10</integer>
</dict>
<key>Rx (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
<integer>5</integer>
</dict>
<key>Rx (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
<integer>6</integer>
</dict>
<key>Rx (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
<integer>4</integer>
</dict>
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
<integer>2</integer>
</dict>
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
<integer>3</integer>
</dict>
<key>SnapKitPlayground (Playground) 3.xcscheme</key>
<dict>
Expand Down Expand Up @@ -112,7 +154,7 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Idea-Archive/Sources/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }
window = UIWindow(windowScene: windowScene)
window?.rootViewController = UINavigationController(rootViewController: LoginViewController())
window?.rootViewController = UINavigationController(rootViewController: LoginVC())
window?.makeKeyAndVisible()
}

Expand Down
5 changes: 2 additions & 3 deletions Idea-Archive/Sources/Data/General/Idea-Archive++Bundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation

extension Bundle {
var baseAPIKey: String {
guard let file = self.path(forResource: "URLInfo", ofType: "plist") else { return ""}
guard let file = self.path(forResource: "BaseURL", ofType: "plist") else { return ""}

guard let resource = NSDictionary(contentsOfFile: file) else { return "" }
guard let key = resource["Base-API-KEY"] as? String else {
Expand All @@ -12,13 +12,12 @@ extension Bundle {
}

var testAPIKey: String {
guard let file = self.path(forResource: "URLInfo", ofType: "plist") else { return ""}
guard let file = self.path(forResource: "BaseURL", ofType: "plist") else { return ""}

guard let resource = NSDictionary(contentsOfFile: file) else { return "" }
guard let key = resource["Test-API-KEY"] as? String else {
fatalError("BaseURLInfo.plist에 API_KEY 설정을해주세요.")
}
return key
}

}
4 changes: 0 additions & 4 deletions Idea-Archive/Sources/Data/Model/Email/Email.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Idea-Archive/Sources/Data/Request/Auth/AuthRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,3 @@ struct LoginRequest: Encodable {
self.password = password
}
}

struct LogoutRequest {
let accessToken: String

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

struct RefreshTokenRequest {
let refreshToken: String

init(refreshToken: String) {
self.refreshToken = refreshToken
}
}
25 changes: 8 additions & 17 deletions Idea-Archive/Sources/Data/Services/Auth/AuthServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Foundation
import Moya

enum AuthServices {
case signup(param: SignupRequest)
case login(param: LoginRequest)
case logout(param: LogoutRequest)
case refreshToken(param: RefreshTokenRequest)
case signup(signupRequest: SignupRequest)
case login(loginRequest: LoginRequest)
case logout(logoutRequest: String)
case refreshToken(refreshTokenRequest: String)
}
extension AuthServices: TargetType {

Expand Down Expand Up @@ -42,18 +42,9 @@ extension AuthServices: TargetType {
var task: Task {
switch self {
case .signup(let param):
let params : [String: String] = [
"email" : param.email,
"password" : param.password,
"name": param.name
]
return .requestJSONEncodable(params)
return .requestJSONEncodable(param)
case .login(let param):
let params : [String: String] = [
"email" : param.email,
"password" : param.password
]
return .requestJSONEncodable(params)
return .requestJSONEncodable(param)
default:
return .requestPlain
}
Expand All @@ -62,9 +53,9 @@ extension AuthServices: TargetType {
var headers: [String : String]? {
switch self {
case .logout(let param):
return ["Authorization": param.accessToken]
return ["Authorization": param]
case .refreshToken(let param):
return ["RefreshToken": param.refreshToken]
return ["RefreshToken": param]
default:
return ["Content-Type": "application/json"]
}
Expand Down
8 changes: 3 additions & 5 deletions Idea-Archive/Sources/Data/Services/Email/EmailServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import Foundation
import Moya

enum EmailServices {
case getCertificationNumber(param: GetCertificationNumberRequest)
case checkCertificationNumber(param: CheckCertificationNumberRequest)
case getCertificationNumber(getCertificationNumberRequest: String)
case checkCertificationNumber(checkCertificationNumberRequest: CheckCertificationNumberRequest)
}
extension EmailServices: TargetType {

Expand Down Expand Up @@ -37,7 +37,7 @@ extension EmailServices: TargetType {
switch self {
case .getCertificationNumber(let param):
let params : [String: String] = [
"email" : param.email
"email" : param
]
return .requestJSONEncodable(params)
default:
Expand All @@ -57,5 +57,3 @@ extension EmailServices: TargetType {
}
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public final class NextStepButton: UIButton{
}

func setupView(){
titleLabel?.font = .I_A(size: 18, family: .semiBold)
titleLabel?.font = .I_A(size: 18, family: .bold)
setTitleColor(UIColor(rgb: 0xFFFFFF), for: .normal)
layer.cornerRadius = 10
clipsToBounds = true
Expand Down
11 changes: 4 additions & 7 deletions Idea-Archive/Sources/DesignSystem/Sources/Color/Color.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//
// Color.swift
// Idea-Archive
//
// Created by 박준서 on 2023/05/30.
//

import Foundation

struct BaseColor {

}
Loading