Skip to content

Commit

Permalink
πŸ”€Β :: (#499) λ§ˆμ΄νŽ˜μ΄μ§€ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
juyeong525 authored May 29, 2023
2 parents 9c2da2b + f084e0a commit 50832d0
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "material-symbols_photo-camera-outline.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"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.
1 change: 1 addition & 0 deletions Application/Sources/ResoucesCode/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ extension Image {
static let onboardingXquare = Image("Onboarding-Xquare")

// Icon
static let camera = Image("Camera")
static let application = Image("Application")
static let bell = Image("Bell")
static let bellWithBadge = Image("Bell.badge")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class XquareRouterFactory: RouterFactory {
fetchReleaseNoteUseCase: reportServiceDependency.fetchReleaseNoteUseCase
)
self.releaseNoteView = ReleaseNoteView(viewModel: releaseNoteViewModel)

}
// swiftlint:enable function_body_length

Expand Down
4 changes: 2 additions & 2 deletions Application/Sources/Scene/Entire/EntireView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ struct EntireView: View, XNavigationAndTabContent {
ServiceSectionButtonView(
headerText: "μ•±",
services: [
(text: "λ‘œκ·Έμ•„μ›ƒ", action: { viewModel.showLogoutAlert = true })
// (text: "μ—…λ°μ΄νŠΈ 사항", action: { xquareRouter.navigateTo(.releaseNote) })
(text: "λ‘œκ·Έμ•„μ›ƒ", action: { viewModel.showLogoutAlert = true }),
(text: "μ—…λ°μ΄νŠΈ 사항", action: { xquareRouter.navigateTo(.releaseNote) })
])
Spacer()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct MyInformationView: View {
.padding(.leading, 16)
.frame(height: 44)
.background(Color.GrayScale.gray50)
.cornerRadius(8)
.overlay { RoundedRectangle(cornerRadius: 8).stroke(Color.GrayScale.gray300) }
}
.padding(.bottom, 20)
Expand Down
32 changes: 13 additions & 19 deletions Application/Sources/Scene/MyPage/MyPageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,17 @@ struct MyPageView: View {
alignment: .center,
spacing: 0
) {
Spacer()
.frame(height: 34)
ProfileImageView(
Spacer().frame(height: 20)
MyProfileView(
imageUrl: viewModel.profileImagrUrl,
uiimage: $viewModel.profileImage
uiimage: $viewModel.profileImage,
name: viewModel.name,
gradeClassNum: viewModel.gradeClassNum,
xPhotosIsPresented: $viewModel.xPhotosIsPresented
)
Button {
viewModel.xPhotosIsPresented = true
} label: {
Text("λ³€κ²½ν•˜κΈ°")
.sdText(type: .body4, textColor: .GrayScale.gray900)
}
.padding(.bottom, 6)
MyInformationView(title: "이름", content: viewModel.name)
MyInformationView(title: "생년월일", content: viewModel.birthDay)
MyInformationView(title: "ν•™λ…„ 반 번호", content: viewModel.gradeClassNum)
MyInformationView(title: "아이디", content: viewModel.id)
MyInformationView(title: "생년월일", content: viewModel.birthDay)
Spacer()
Button(action: {
viewModel.showLogoutAlert = true
}, label: {
Expand All @@ -39,12 +33,8 @@ struct MyPageView: View {
.background(Color.System.red50)
.cornerRadius(8)
})
Spacer()
.padding(.bottom, 40)
}
.sdPhotoPicker(
isPresented: $viewModel.xPhotosIsPresented,
selection: $viewModel.profileImage
)
.sdAlert(isPresented: $viewModel.showLogoutAlert) {
SDAlert(
title: "정말 νšŒμ›νƒˆν‡΄ ν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ?",
Expand All @@ -55,6 +45,10 @@ struct MyPageView: View {
})
)
}
.sdPhotoPicker(
isPresented: $viewModel.xPhotosIsPresented,
selection: $viewModel.profileImage
)
.onChange(of: viewModel.profileImage, perform: { _ in
viewModel.uploadImage()
})
Expand Down
36 changes: 36 additions & 0 deletions Application/Sources/Scene/MyPage/MyProfile/MyProfileView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import SwiftUI

import SemicolonDesign

struct MyProfileView: View {
var imageUrl: URL?
@Binding var uiimage: UIImage
var name: String
var gradeClassNum: String
@Binding var xPhotosIsPresented: Bool
var body: some View {
HStack(alignment: .center, spacing: 16) {
ZStack(alignment: .bottomTrailing) {
ProfileImageView(
imageUrl: imageUrl,
uiimage: $uiimage
)
Image.camera
.resizable()
.scaledToFill()
.frame(width: 20, height: 20)
}.onTapGesture {
xPhotosIsPresented = true
}
VStack(alignment: .leading, spacing: 0) {
Text(name)
.sdText(type: .body1, textColor: .GrayScale.gray900)
Text(gradeClassNum)
.sdText(type: .body2, textColor: .GrayScale.gray900)
}
Spacer()
}
.padding(.bottom, 20)
.padding(.leading, 4)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ struct ProfileImageView: View {
image
.resizable()
.scaledToFill()
.frame(width: 60, height: 60)
} placeholder: {
Image("DefaultImage")
}
.frame(width: 60, height: 60)
.cornerRadius(30)
.padding(.bottom, 6)
} else {
Image(uiImage: uiimage)
.resizable()
.scaledToFill()
.frame(width: 60, height: 60)
.cornerRadius(30)
.padding(.bottom, 6)
}
}
}

0 comments on commit 50832d0

Please sign in to comment.