Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "appleLogo.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "googleLogo.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions Core/DesignSystem/Sources/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@

import SwiftUI

public extension Image {
static let sampleImage: Image = Image(.test)
}

public extension ImageResource {
static let sampleImage: ImageResource = .test
static let sampleImage: ImageResource = .test
static let apple: ImageResource = .appleLogo
static let google: ImageResource = .googleLogo
}
20 changes: 20 additions & 0 deletions Mark-In/Sources/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// AppDelegate.swift
// Mark-In
//
// Created by 이정동 on 5/1/25.
//

import SwiftUI


// TODO: 디자인 논의 후 수정 예정
//final class AppDelegate: NSObject, NSApplicationDelegate {
// func applicationDidFinishLaunching(_ notification: Notification) {
// if let window = NSApplication.shared.windows.first {
// window.titlebarAppearsTransparent = false
//// window.titleVisibility = .hidden
// window.title = ""
// }
// }
//}
2 changes: 1 addition & 1 deletion Mark-In/Sources/App/Mark_InApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Mark_InApp: App {
init() {
FontLoader.registerFont()

// Self.configureFirebase()
// Self.configureFirebase()
}

var body: some Scene {
Expand Down
159 changes: 159 additions & 0 deletions Mark-In/Sources/Feature/Login/LoginView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
//
// LoginView.swift
// Mark-In
//
// Created by 이정동 on 4/30/25.
//

import SwiftUI

import DesignSystem
import Util

struct LoginView: View {
var body: some View {
ZStack {
LinearGradient(
colors: [.markPoint, .markWhite],
startPoint: .top,
endPoint: .bottom
)
.ignoresSafeArea()

VStack(spacing: 28) {
headerView

BodyView()
}
}

}

@ViewBuilder
private var headerView: some View {
VStack(spacing: 0) {
Text("Mark-in")
.font(.pretendard(size: 50, weight: .black))
.foregroundStyle(.markWhite)

Text("하나로 관리하는 쉬운 북마크")
.font(.pretendard(size: 18, weight: .semiBold))
.foregroundStyle(.markWhite)
}
}
}

private struct BodyView: View {

var body: some View {
VStack(spacing: 2) {
Group {
titleView

divider

SignInButtonList()
}
.frame(maxWidth: .infinity, alignment: .leading)
}
.foregroundStyle(.black)
.frame(width: 386, height: 210)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS 기준

.padding(22)
.background(
RoundedRectangle(cornerRadius: 15)
.fill(.markWhite)
)
}

private var titleView: some View {
VStack(alignment: .leading, spacing: 7) {
Text("로그인")
.font(.pretendard(size: 20, weight: .semiBold))
.foregroundStyle(.markBlack)

Text("SNS로 간편하게 로그인하고 마크인을 시작해 보세요")
.font(.pretendard(size: 12, weight: .medium))
.foregroundStyle(.markBlack30)
}
}

@ViewBuilder
private var divider: some View {
Spacer()
Rectangle()
.frame(height: 0.5)
.foregroundStyle(.markBlack20)
Spacer()
}
}

private struct SignInButtonList: View {
// TODO: LoginViewModel 전달 받도록

var body: some View {
VStack(spacing: 12) {
SignInButton(provider: .apple) {
// TODO: 애플 로그인 로직
}

SignInButton(provider: .google) {
// TODO: 구글 로그인 로직
}
}
}
}

private struct SignInButton: View {
let provider: OAuthProvider

let action: () -> Void

private var image: Image {
switch provider {
case .apple: Image(.apple)
case .google: Image(.google)
@unknown default: Image(systemName: "questionmark")
}
}

private var title: String {
switch provider {
case .apple: "Apple"
case .google: "Google"
@unknown default: "Unknown"
}
}

var body: some View {
Button {
action()
} label: {
HStack(spacing: 4) {
image
.resizable()
.frame(width: 22, height: 22)

Text("\(title)로 시작하기")
.font(.pretendard(size: 18, weight: .semiBold))
.foregroundStyle(.markBlack)
}
.padding(.vertical, 15)
.frame(maxWidth: .infinity)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.clipShape(
RoundedRectangle(cornerRadius: 10)
)
.overlay(content: {
RoundedRectangle(cornerRadius: 10)
.stroke(lineWidth: 0.5)
.fill(.markBlack30)
})
}
}

#Preview {
LoginView()
.frame(width: 600, height: 400)
}
13 changes: 13 additions & 0 deletions Shared/Util/Sources/OAuthProvider.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// OAuthProvider.swift
// Util
//
// Created by 이정동 on 4/30/25.
//

import Foundation

public enum OAuthProvider {
case apple
case google
}
9 changes: 0 additions & 9 deletions Shared/Util/Sources/Util.swift

This file was deleted.

6 changes: 6 additions & 0 deletions Shared/Util/Util.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
TargetAttributes = {
57AC52FE2DA4FC1800BA84BD = {
CreatedOnToolsVersion = 16.3;
LastSwiftMigration = 1630;
};
};
};
Expand Down Expand Up @@ -263,8 +264,10 @@
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5DFZR8RCQR;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -294,6 +297,7 @@
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_INSTALL_MODULE = YES;
SWIFT_INSTALL_OBJC_HEADER = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2,7";
XROS_DEPLOYMENT_TARGET = 2.0;
Expand All @@ -305,8 +309,10 @@
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5DFZR8RCQR;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down
Loading