forked from AcaMate/AcaMate_iOS
[✨] 더보기 페이지 그리기 완료
This commit is contained in:
parent
f75751670c
commit
c6f224a9d9
Binary file not shown.
|
@ -14,26 +14,34 @@ struct HomeView: View {
|
|||
@State private var topViewState: Bool = false
|
||||
|
||||
//MARK: - 변경 값
|
||||
@State private var myType: UserType = .Student
|
||||
// @State private var myType: UserType = .Student
|
||||
@Binding var myType: UserType
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
ZStack {
|
||||
if !topViewState {
|
||||
VStack {
|
||||
Rectangle()
|
||||
.foregroundStyle(Color(.Other.cell))
|
||||
.frame(height: 100 + (scrollOffset.y < 0 ? scrollOffset.y * -1 : 0))
|
||||
.frame(maxWidth: .infinity)
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
Spacer(minLength: 1)
|
||||
}
|
||||
}
|
||||
|
||||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
||||
VStack(spacing: 0) {
|
||||
VStack(spacing: 24) {
|
||||
|
||||
TopProfileView(userType: .Student)
|
||||
.padding(.bottom,12)
|
||||
TopProfileView(myType: myType)
|
||||
|
||||
Group {
|
||||
AttendanceBoxView()
|
||||
|
||||
// CalendarBoxView(summaryCalDataList: [])
|
||||
CalendarBoxView(summaryCalDataList: [
|
||||
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다."),
|
||||
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다.")])
|
||||
|
||||
// ManagementBoxView(managementList: [])
|
||||
ManagementBoxView(managementList: [
|
||||
SummaryManagement(id: "01", title: "과목 명1", teacher: "A", ratio: 27, homework: 3),
|
||||
SummaryManagement(id: "02", title: "과목 명2", teacher: "B", ratio: 80, homework: 10),
|
||||
|
@ -41,7 +49,6 @@ struct HomeView: View {
|
|||
SummaryManagement(id: "04", title: "과목 명4", teacher: "D", ratio: 72, homework: 0),
|
||||
])
|
||||
|
||||
// NoticeBoxView(noticeList: [])
|
||||
NoticeBoxView(noticeList: [
|
||||
SummaryNotice(id: "00", title: "공지사항1", date: "2025-02-11", new: true),
|
||||
SummaryNotice(id: "01", title: "공지사항2", date: "2025-01-11", new: false),
|
||||
|
@ -62,8 +69,7 @@ struct HomeView: View {
|
|||
RoundedRectangle(cornerRadius: 8)
|
||||
.foregroundStyle(Color(.Other.cell))
|
||||
}
|
||||
.padding(EdgeInsets(top: 12, leading: 24, bottom: 12, trailing: 24))
|
||||
|
||||
.padding([.leading, .trailing], 24)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +85,8 @@ struct HomeView: View {
|
|||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.onAppear {
|
||||
// MARK: TO-DO
|
||||
// 여기도 수정봐야 함
|
||||
topVM.titleName = "Name"
|
||||
|
||||
if myType == .Student {
|
||||
|
|
|
@ -10,7 +10,7 @@ import SwiftUI
|
|||
struct TopProfileView: View {
|
||||
@StateObject var btnVM = ButtonViewModel()
|
||||
|
||||
var userType: UserType
|
||||
var myType: UserType
|
||||
|
||||
// MARK: TO-DO
|
||||
// 여기서 이름 떙겨오는것도 고민을 해야 함
|
||||
|
@ -68,7 +68,7 @@ struct TopProfileView: View {
|
|||
|
||||
// MARK: TO-DO
|
||||
// 여기에 가로스크롤 넣어야 할거 같음
|
||||
if userType == .Parent {
|
||||
if myType == .Parent {
|
||||
HStack(spacing: 0) {
|
||||
ForEach(Array(childIDList.enumerated()),id: \.offset){ index, id in
|
||||
CircleBtnView(vm: btnVM, id: id)
|
||||
|
@ -95,7 +95,7 @@ struct TopProfileView: View {
|
|||
// 마켓 버튼과 알림 버튼 동작 로직 구현하기
|
||||
|
||||
|
||||
switch self.userType {
|
||||
switch self.myType {
|
||||
case .Student:
|
||||
typeName = "학생"
|
||||
case .Parent:
|
||||
|
|
|
@ -17,16 +17,30 @@ struct ChattingView: View {
|
|||
TopView(topVM: topVM)
|
||||
|
||||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
||||
|
||||
VStack(spacing: 24) {
|
||||
Group {
|
||||
DashBoardView(image: Image(.Icon.group), title: "클래스") {
|
||||
|
||||
}
|
||||
DashBoardView(image: Image(.Icon.talk), title: "선생님과 1:1") {
|
||||
|
||||
}
|
||||
}
|
||||
.background {
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.foregroundStyle(Color(.Other.cell))
|
||||
}
|
||||
}
|
||||
.padding(24)
|
||||
}
|
||||
|
||||
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
.onAppear {
|
||||
topVM.titleName = ""
|
||||
topVM.setLeftBtn(size: CGPoint(x: 40, y: 40), action: leftAct)
|
||||
topVM.setRightBtn(size: CGPoint(x: 40, y: 40), action: rightAct)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ struct AppInfoView: View {
|
|||
.frame(width: 40, height: 40, alignment: .center)
|
||||
.padding(.trailing, 12)
|
||||
Text("설치 버전: \(currentVer)")
|
||||
.font(.nps(font: .bold, size: 20))
|
||||
.font(.nps(font: .bold, size: 16))
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
Spacer(minLength: 1)
|
||||
if currentVer == finalVer {
|
||||
|
|
|
@ -8,40 +8,45 @@
|
|||
import SwiftUI
|
||||
|
||||
struct DevInfoView: View {
|
||||
|
||||
private var attributeText: AttributedString {
|
||||
let longText = """
|
||||
아래 정보는 해당 프로그램에 관한 정보로서
|
||||
학원에 대한 문의는 더보기 > 고객센터 > 1:1 문의를 이용해주시기 바랍니다.
|
||||
"""
|
||||
var attributeText = AttributedString(longText)
|
||||
attributeText.font = .nps(size: 8)
|
||||
if let range = attributeText.range(of: "더보기 > 고객센터 > 1:1 문의") {
|
||||
attributeText[range].font = .nps(font: .bold, size: 8)
|
||||
}
|
||||
return attributeText
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 24) {
|
||||
Text("""
|
||||
아래 정보는 해당 프로그램에 관한 정보로서
|
||||
학원에 대한 문의는 더보기 > 고객센터 > 1:1 문의 이용해주시기 바랍니다.
|
||||
""")
|
||||
.font(.nps(size: 8))
|
||||
|
||||
Text(attributeText)
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
.lineLimit(2)
|
||||
.multilineTextAlignment(.center)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
|
||||
// .padding([.leading,.trailing],24)
|
||||
|
||||
Image(.Logo.appIcon).resizable()
|
||||
.frame(width: 40, height: 40,alignment: .leading)
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 8)
|
||||
.frame(width: 40, height: 40,alignment: .leading)
|
||||
.foregroundStyle(Color(.Normal.light))
|
||||
)
|
||||
|
||||
VStack(alignment: .leading, spacing: 12){
|
||||
Text("AcaMate")
|
||||
.font(.nps(font: .bold, size: 16))
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
|
||||
VStack(spacing: 4) {
|
||||
Text("문의: sean.kk@daum.net")
|
||||
.font(.nps(size: 12))
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
|
||||
Text("문의: sean.kk@daum.net")
|
||||
.font(.nps(size: 12))
|
||||
HStack(alignment: .center, spacing: 8) {
|
||||
Image(.Logo.appIcon).resizable()
|
||||
.frame(width: 40, height: 40,alignment: .leading)
|
||||
Text("AcaMate")
|
||||
.font(.nps(font: .bold, size: 16))
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
}
|
||||
// MARK: TO-DO
|
||||
// 이부분에 대한 내용은 후에 바꿀 예정
|
||||
Text(verbatim:"""
|
||||
문의: sean.kk@daum.net
|
||||
문의: sean.kk@daum.net
|
||||
""")
|
||||
.font(.nps(size: 12))
|
||||
.foregroundStyle(Color(.Text.detail))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,11 +9,10 @@ import SwiftUI
|
|||
|
||||
struct EtcView: View {
|
||||
@StateObject private var topVM = TopViewModel()
|
||||
|
||||
@State private var scrollOffset: CGPoint = .zero
|
||||
|
||||
|
||||
|
||||
|
||||
@Binding var myType: UserType
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
TopView(topVM: topVM)
|
||||
|
@ -21,7 +20,7 @@ struct EtcView: View {
|
|||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
||||
VStack(spacing: 24) {
|
||||
UserInfoView(userData: SummaryUser(profile: Image(.Icon.face), name: "이름", userID: "abcdefg", email: "abcdefg@gmail.com"))
|
||||
UserSettingView()
|
||||
UserSettingView(myType: myType)
|
||||
CsCenterView()
|
||||
TsCsView()
|
||||
AppInfoView()
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
import SwiftUI
|
||||
|
||||
struct UserSettingView: View {
|
||||
var myType: UserType
|
||||
|
||||
var body: some View {
|
||||
EtcBoxView(title: "설정") {
|
||||
VStack(spacing: 0){
|
||||
|
@ -24,6 +26,17 @@ struct UserSettingView: View {
|
|||
// 계정 관리 이동
|
||||
printLog("계정 관리 이동")
|
||||
}
|
||||
if myType == .Admin {
|
||||
DashedDivider()
|
||||
EtcCellView(title: "관리자 페이지") {
|
||||
|
||||
// MARK: TO-DO
|
||||
// 이거 분기 쳐서 특정 사용자 아니면 접근 못하게 막기
|
||||
|
||||
printLog("관리자 페이지 이동")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,13 +14,15 @@ struct MainView: View {
|
|||
@State var cancellables: Set<AnyCancellable> = []
|
||||
@Binding var naviState : NaviState
|
||||
|
||||
@State private var myType: UserType = .Student
|
||||
|
||||
var body: some View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
Group {
|
||||
switch appVM.menuName {
|
||||
case .Home:
|
||||
HomeView()
|
||||
HomeView(myType: $myType)
|
||||
case .Management:
|
||||
ManagementView()
|
||||
case .Chatting:
|
||||
|
@ -28,10 +30,10 @@ struct MainView: View {
|
|||
case .Calendar:
|
||||
CalendarView()
|
||||
case .Etc:
|
||||
EtcView()
|
||||
EtcView(myType: $myType)
|
||||
}
|
||||
}
|
||||
Spacer(minLength: 1)
|
||||
// Spacer(minLength: 1)
|
||||
|
||||
BottomView()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
|
15
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Group.imageset/Contents.json
vendored
Normal file
15
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Group.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"preserves-vector-representation" : true
|
||||
}
|
||||
}
|
BIN
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Group.imageset/Group.png
vendored
Normal file
BIN
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Group.imageset/Group.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
15
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Talk.imageset/Contents.json
vendored
Normal file
15
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Talk.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Talk.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"preserves-vector-representation" : true
|
||||
}
|
||||
}
|
BIN
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Talk.imageset/Talk.png
vendored
Normal file
BIN
AcaMate/6. Resources/Assets.xcassets/Image Folder/Icon/Talk.imageset/Talk.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 716 B |
BIN
AcaMate/6. Resources/Images/Icon/Group.png
Normal file
BIN
AcaMate/6. Resources/Images/Icon/Group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
AcaMate/6. Resources/Images/Icon/Talk.png
Normal file
BIN
AcaMate/6. Resources/Images/Icon/Talk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 716 B |
Loading…
Reference in New Issue
Block a user