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
Expand Up @@ -76,7 +76,7 @@ extension ShapeStyle where Self == Color {
// MARK: - NatureBlue

static var blue10: Color { .init(hex: "155DFC") }
static var blue20: Color { .init(hex: "E1EAFF") }
static var blue20: Color { .init(hex: "5E8CFD") }
static var blue30: Color { .init(hex: "C1D3FF") }
static var blue40: Color { .init(hex: "0D82F9") }
static var blue50: Color { .init(hex: "0c75e0") }
Expand All @@ -88,7 +88,7 @@ extension ShapeStyle where Self == Color {

// MARK: - NatureRed

static var red10: Color { .init(hex: "ffe7e6") }
static var red10: Color { .init(hex: "EC484A") }
static var red20: Color { .init(hex: "ffdbda") }
static var red30: Color { .init(hex: "feb5b2") }
static var red40: Color { .init(hex: "fd1008") }
Expand All @@ -109,7 +109,14 @@ extension ShapeStyle where Self == Color {


static var green: Color { .init(hex: "00A63E") }
static var green10: Color { .init(hex: "4CBC6F") }

static var lightPurple: Color { .init(hex: "9810FA") }
static var lightPurple10: Color { .init(hex: "B04EFC") }

static var orange10: Color { .init(hex: "F77B41") }


static var error: Color { .init(hex: "FF5050") }
static var basicBlue: Color { .init(hex: "0099FF") }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//
// StaggeredAppearModifier.swift
// TeamIntroduce
//
// Created by Wonji Suh on 8/13/25.
//

import SwiftUI

struct StaggeredAppearModifier: ViewModifier {
let index: Int
@Binding var currentMaxIndex: Int

var baseDelay: Double = 0.25
var stepDelay: Double = 0.15
var hiddenYOffset: CGFloat = 12
var animation: Animation = .spring(response: 0.5, dampingFraction: 0.85)

@Environment(\.accessibilityReduceMotion) private var reduceMotion

func body(content: Content) -> some View {
content
.opacity(index <= currentMaxIndex ? 1 : 0)
.offset(y: index <= currentMaxIndex ? 0 : hiddenYOffset)
.onAppear {
guard index > currentMaxIndex else { return }
guard !reduceMotion else {
currentMaxIndex = index
return
}

let delay = baseDelay + stepDelay * Double(index)
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
withAnimation(animation) {
currentMaxIndex = index
}
}
}
}
}

extension View {
func staggeredAppear(
index: Int,
currentMaxIndex: Binding<Int>,
baseDelay: Double = 0.25,
stepDelay: Double = 0.15,
hiddenYOffset: CGFloat = 12,
animation: Animation = .spring(response: 0.5, dampingFraction: 0.85)
) -> some View {
modifier(
StaggeredAppearModifier(
index: index,
currentMaxIndex: currentMaxIndex,
baseDelay: baseDelay,
stepDelay: stepDelay,
hiddenYOffset: hiddenYOffset,
animation: animation
)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct PretendardFont: ViewModifier {
}

extension Font {
static func pretendardFontFamily(family: PretendardFontFamily, size: CGFloat) -> Font{
static func pretendardFont(family: PretendardFontFamily, size: CGFloat) -> Font{
let font = Font.custom("PretendardVariable-\(family)", size: size)
return font
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
import SwiftUI

struct CardStyle: ViewModifier {
func body(content: Content) -> some View {
content
.padding(15)
.frame(maxWidth: .infinity, alignment: .leading)
.background(
RoundedRectangle(cornerRadius: 16)
.fill(.staticWhite)
)
.overlay(
RoundedRectangle(cornerRadius: 16)
.stroke(.borderInactive, lineWidth: 0.5)
)
.shadow(color: .shadowDefault, radius: 3, x: 0, y: 1)
}
func body(content: Content) -> some View {
content
.padding(15)
.frame(maxWidth: .infinity, alignment: .leading)
.background(
RoundedRectangle(cornerRadius: 16)
.fill(.staticWhite)
)
.overlay(
RoundedRectangle(cornerRadius: 16)
.stroke(.borderInactive, lineWidth: 0.5)
)
.shadow(color: .shadowDefault, radius: 3, x: 0, y: 1)
}
Comment on lines -11 to +24
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 줄 간격 컨벤션을 맞추면 좋을 것 같은데
동일하게 가지 않으면 코드리뷰에서 이전에 했던 것들이 올라오네요 ~!

}

extension View {
public func cardStyle() -> some View {
modifier(CardStyle())
}
public func cardStyle() -> some View {
modifier(CardStyle())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

public enum MBTI: String, CaseIterable {
public enum MBTI: String, CaseIterable, Codable {
case enfp = "ENFP"
case estp = "ESTP"
case infj = "INFJ"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import SwiftUI
import SwiftData

struct IntroductionMainView: View {
@State private var viewModel: IntroductionViewModel
Expand Down Expand Up @@ -34,6 +35,7 @@ struct IntroductionMainView: View {
ForEach(viewModel.introductions) { model in
IntroductionRowView(model: model)
.onTapGesture {
print(model.id)
viewModel.send(.presentMemberDetail)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// AgreeMentItem.swift
// TeamIntroduce
//
// Created by Wonji Suh on 8/13/25.
//

import Foundation
import SwiftUI

struct AgreeMentItem: Identifiable {
let id = UUID()
let number: Int
let color: Color
let agreeMentTitle: String
let agreeMentSubTitle: String
}

extension AgreeMentItem {
static let items: [AgreeMentItem] = [
.init(number: 1, color: .blue20, agreeMentTitle: "스크럼 시간", agreeMentSubTitle: "참여못하는 날은 노션에 미리 작성해두고, 당일 불참시 슬랙 DM 보내기"),
.init(number: 2, color: .green10, agreeMentTitle: "시간과 약속 준수", agreeMentSubTitle: "정해진 시간과 약속을 지켜 서로에 대한 신뢰를 쌓겠습니다."),
.init(number: 3, color: .lightPurple10, agreeMentTitle: "스크럼 참여시간 ", agreeMentSubTitle: "스크럼 하루 두번 (10:00, 20:00)"),
.init(number: 4, color: .orange10, agreeMentTitle: "GIT 커벤션 및 PR", agreeMentSubTitle: "git-flow, PR 머지(머지 할때는 스쿼시 머지)"),
.init(number: 5, color: .red10, agreeMentTitle: "점심시간", agreeMentSubTitle: "점심시간 12:30, 저녁시간 18:00 (1시간)")
]
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
//
// TeamAgreeMentView.swift
// TeamIntroduce
//
// Created by Wonji Suh on 8/13/25.
//

import SwiftUI

struct TeamAgreeMentView: View {
@ObservedObject var coordinator: IntroduceCoordinator

private let agreeMentItem = AgreeMentItem.items
@State private var currentMaxIndex: Int = -1


var body: some View {
VStack {
Spacer()
.frame(height: 14)

CustomNavigationBackBar(text: "팀 약속") {
coordinator.goBack()
}


teamAgreeMentHeader()

agreeMentCard()

}
}
}

extension TeamAgreeMentView {

@ViewBuilder
private func teamAgreeMentHeader() -> some View {
VStack(spacing: 10) {
Image(asset: .teamiIntroduce)
.resizable()
.scaledToFit()
.frame(width: 56, height: 56)


HStack {
Spacer()

Text("우리의 약속")
.pretendardFont(family: .medium, size: 16)
.foregroundStyle(.textPrimary)

Spacer()
}


HStack {
Spacer()
TypingText(
text: "더 나은 팀이 되기 위해 함께 지켜나갈 소중한 약속들입니다.",
font: .pretendardFont(family: .bold, size: 16),
perChar: 0.06,
startDelay: 0.15,
showsCursor: false
)
Spacer()
}
}
.cardStyle()
.padding(16)
}

@ViewBuilder
private func agreeMentCard() -> some View {
let indices = Array(agreeMentItem.indices)
ScrollView(.vertical) {
ForEach(indices, id: \.self) { index in
let item = agreeMentItem[index]
agreeMentListitem(
number: item.number,
agreeMentTitle: item.agreeMentTitle,
agreeMentSubTitle: item.agreeMentSubTitle,
circleColor: item.color,
fontColor: item.color
)
.staggeredAppear(index: index, currentMaxIndex: $currentMaxIndex)
}
}
.scrollIndicators(.hidden)
}


@ViewBuilder
private func agreeMentListitem(
number: Int,
agreeMentTitle: String,
agreeMentSubTitle: String,
circleColor: Color,
fontColor: Color
) -> some View {
VStack {
HStack {
Circle()
.fill(circleColor.opacity(0.3))
.frame(width: 40, height: 40)
.overlay {
Text("\(number)")
.pretendardFont(family: .semiBold, size: 12)
.foregroundStyle(fontColor)
}

Spacer()
.frame(width: 10)

VStack(alignment: .leading) {
HStack {
Text(agreeMentTitle)
.pretendardFont(family: .regular, size: 12)
.foregroundStyle(.staticBlack)

Spacer()
}

Text(agreeMentSubTitle)
.pretendardFont(family: .regular, size: 12)
.foregroundStyle(.textPrimary)

}

Spacer()
}
.padding(.vertical, 16)
}
.cardStyle()
.padding(.horizontal, 16)
}
}

#Preview {
TeamAgreeMentView(coordinator: IntroduceCoordinator())
}
Loading