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
|
@State private var topViewState: Bool = false
|
||||||
|
|
||||||
//MARK: - 변경 값
|
//MARK: - 변경 값
|
||||||
@State private var myType: UserType = .Student
|
// @State private var myType: UserType = .Student
|
||||||
|
@Binding var myType: UserType
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
ZStack {
|
ZStack {
|
||||||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
if !topViewState {
|
||||||
VStack(spacing: 0) {
|
VStack {
|
||||||
|
Rectangle()
|
||||||
|
.foregroundStyle(Color(.Other.cell))
|
||||||
|
.frame(height: 100 + (scrollOffset.y < 0 ? scrollOffset.y * -1 : 0))
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.edgesIgnoringSafeArea(.all)
|
||||||
|
Spacer(minLength: 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TopProfileView(userType: .Student)
|
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
||||||
.padding(.bottom,12)
|
VStack(spacing: 24) {
|
||||||
|
|
||||||
|
TopProfileView(myType: myType)
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
AttendanceBoxView()
|
AttendanceBoxView()
|
||||||
|
|
||||||
// CalendarBoxView(summaryCalDataList: [])
|
|
||||||
CalendarBoxView(summaryCalDataList: [
|
CalendarBoxView(summaryCalDataList: [
|
||||||
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다."),
|
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다."),
|
||||||
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다.")])
|
SummaryCalendar(id: "123", date: "2025-02-28", summary: "요약내용입니다.")])
|
||||||
|
|
||||||
// ManagementBoxView(managementList: [])
|
|
||||||
ManagementBoxView(managementList: [
|
ManagementBoxView(managementList: [
|
||||||
SummaryManagement(id: "01", title: "과목 명1", teacher: "A", ratio: 27, homework: 3),
|
SummaryManagement(id: "01", title: "과목 명1", teacher: "A", ratio: 27, homework: 3),
|
||||||
SummaryManagement(id: "02", title: "과목 명2", teacher: "B", ratio: 80, homework: 10),
|
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),
|
SummaryManagement(id: "04", title: "과목 명4", teacher: "D", ratio: 72, homework: 0),
|
||||||
])
|
])
|
||||||
|
|
||||||
// NoticeBoxView(noticeList: [])
|
|
||||||
NoticeBoxView(noticeList: [
|
NoticeBoxView(noticeList: [
|
||||||
SummaryNotice(id: "00", title: "공지사항1", date: "2025-02-11", new: true),
|
SummaryNotice(id: "00", title: "공지사항1", date: "2025-02-11", new: true),
|
||||||
SummaryNotice(id: "01", title: "공지사항2", date: "2025-01-11", new: false),
|
SummaryNotice(id: "01", title: "공지사항2", date: "2025-01-11", new: false),
|
||||||
|
@ -62,8 +69,7 @@ struct HomeView: View {
|
||||||
RoundedRectangle(cornerRadius: 8)
|
RoundedRectangle(cornerRadius: 8)
|
||||||
.foregroundStyle(Color(.Other.cell))
|
.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)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
// MARK: TO-DO
|
||||||
|
// 여기도 수정봐야 함
|
||||||
topVM.titleName = "Name"
|
topVM.titleName = "Name"
|
||||||
|
|
||||||
if myType == .Student {
|
if myType == .Student {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import SwiftUI
|
||||||
struct TopProfileView: View {
|
struct TopProfileView: View {
|
||||||
@StateObject var btnVM = ButtonViewModel()
|
@StateObject var btnVM = ButtonViewModel()
|
||||||
|
|
||||||
var userType: UserType
|
var myType: UserType
|
||||||
|
|
||||||
// MARK: TO-DO
|
// MARK: TO-DO
|
||||||
// 여기서 이름 떙겨오는것도 고민을 해야 함
|
// 여기서 이름 떙겨오는것도 고민을 해야 함
|
||||||
|
@ -68,7 +68,7 @@ struct TopProfileView: View {
|
||||||
|
|
||||||
// MARK: TO-DO
|
// MARK: TO-DO
|
||||||
// 여기에 가로스크롤 넣어야 할거 같음
|
// 여기에 가로스크롤 넣어야 할거 같음
|
||||||
if userType == .Parent {
|
if myType == .Parent {
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
ForEach(Array(childIDList.enumerated()),id: \.offset){ index, id in
|
ForEach(Array(childIDList.enumerated()),id: \.offset){ index, id in
|
||||||
CircleBtnView(vm: btnVM, id: id)
|
CircleBtnView(vm: btnVM, id: id)
|
||||||
|
@ -95,7 +95,7 @@ struct TopProfileView: View {
|
||||||
// 마켓 버튼과 알림 버튼 동작 로직 구현하기
|
// 마켓 버튼과 알림 버튼 동작 로직 구현하기
|
||||||
|
|
||||||
|
|
||||||
switch self.userType {
|
switch self.myType {
|
||||||
case .Student:
|
case .Student:
|
||||||
typeName = "학생"
|
typeName = "학생"
|
||||||
case .Parent:
|
case .Parent:
|
||||||
|
|
|
@ -17,16 +17,30 @@ struct ChattingView: View {
|
||||||
TopView(topVM: topVM)
|
TopView(topVM: topVM)
|
||||||
|
|
||||||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
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)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
topVM.titleName = ""
|
topVM.titleName = ""
|
||||||
topVM.setLeftBtn(size: CGPoint(x: 40, y: 40), action: leftAct)
|
topVM.setLeftBtn(size: CGPoint(x: 40, y: 40), action: leftAct)
|
||||||
topVM.setRightBtn(size: CGPoint(x: 40, y: 40), action: rightAct)
|
topVM.setRightBtn(size: CGPoint(x: 40, y: 40), action: rightAct)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct AppInfoView: View {
|
||||||
.frame(width: 40, height: 40, alignment: .center)
|
.frame(width: 40, height: 40, alignment: .center)
|
||||||
.padding(.trailing, 12)
|
.padding(.trailing, 12)
|
||||||
Text("설치 버전: \(currentVer)")
|
Text("설치 버전: \(currentVer)")
|
||||||
.font(.nps(font: .bold, size: 20))
|
.font(.nps(font: .bold, size: 16))
|
||||||
.foregroundStyle(Color(.Text.detail))
|
.foregroundStyle(Color(.Text.detail))
|
||||||
Spacer(minLength: 1)
|
Spacer(minLength: 1)
|
||||||
if currentVer == finalVer {
|
if currentVer == finalVer {
|
||||||
|
|
|
@ -8,40 +8,45 @@
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct DevInfoView: View {
|
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 {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 24) {
|
VStack(alignment: .leading, spacing: 24) {
|
||||||
Text("""
|
|
||||||
아래 정보는 해당 프로그램에 관한 정보로서
|
Text(attributeText)
|
||||||
학원에 대한 문의는 더보기 > 고객센터 > 1:1 문의 이용해주시기 바랍니다.
|
|
||||||
""")
|
|
||||||
.font(.nps(size: 8))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
.foregroundStyle(Color(.Text.detail))
|
||||||
.lineLimit(2)
|
.lineLimit(2)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .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){
|
VStack(alignment: .leading, spacing: 12){
|
||||||
Text("AcaMate")
|
HStack(alignment: .center, spacing: 8) {
|
||||||
.font(.nps(font: .bold, size: 16))
|
Image(.Logo.appIcon).resizable()
|
||||||
.foregroundStyle(Color(.Text.detail))
|
.frame(width: 40, height: 40,alignment: .leading)
|
||||||
|
Text("AcaMate")
|
||||||
VStack(spacing: 4) {
|
.font(.nps(font: .bold, size: 16))
|
||||||
Text("문의: sean.kk@daum.net")
|
|
||||||
.font(.nps(size: 12))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
|
|
||||||
Text("문의: sean.kk@daum.net")
|
|
||||||
.font(.nps(size: 12))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
.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,10 +9,9 @@ import SwiftUI
|
||||||
|
|
||||||
struct EtcView: View {
|
struct EtcView: View {
|
||||||
@StateObject private var topVM = TopViewModel()
|
@StateObject private var topVM = TopViewModel()
|
||||||
|
|
||||||
@State private var scrollOffset: CGPoint = .zero
|
@State private var scrollOffset: CGPoint = .zero
|
||||||
|
|
||||||
|
@Binding var myType: UserType
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
|
@ -21,7 +20,7 @@ struct EtcView: View {
|
||||||
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
OffsetObservableScrollView(showsIndicators: false, scrollOffset: $scrollOffset) { proxy in
|
||||||
VStack(spacing: 24) {
|
VStack(spacing: 24) {
|
||||||
UserInfoView(userData: SummaryUser(profile: Image(.Icon.face), name: "이름", userID: "abcdefg", email: "abcdefg@gmail.com"))
|
UserInfoView(userData: SummaryUser(profile: Image(.Icon.face), name: "이름", userID: "abcdefg", email: "abcdefg@gmail.com"))
|
||||||
UserSettingView()
|
UserSettingView(myType: myType)
|
||||||
CsCenterView()
|
CsCenterView()
|
||||||
TsCsView()
|
TsCsView()
|
||||||
AppInfoView()
|
AppInfoView()
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct UserSettingView: View {
|
struct UserSettingView: View {
|
||||||
|
var myType: UserType
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
EtcBoxView(title: "설정") {
|
EtcBoxView(title: "설정") {
|
||||||
VStack(spacing: 0){
|
VStack(spacing: 0){
|
||||||
|
@ -24,6 +26,17 @@ struct UserSettingView: View {
|
||||||
// 계정 관리 이동
|
// 계정 관리 이동
|
||||||
printLog("계정 관리 이동")
|
printLog("계정 관리 이동")
|
||||||
}
|
}
|
||||||
|
if myType == .Admin {
|
||||||
|
DashedDivider()
|
||||||
|
EtcCellView(title: "관리자 페이지") {
|
||||||
|
|
||||||
|
// MARK: TO-DO
|
||||||
|
// 이거 분기 쳐서 특정 사용자 아니면 접근 못하게 막기
|
||||||
|
|
||||||
|
printLog("관리자 페이지 이동")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,15 @@ struct MainView: View {
|
||||||
@State var cancellables: Set<AnyCancellable> = []
|
@State var cancellables: Set<AnyCancellable> = []
|
||||||
@Binding var naviState : NaviState
|
@Binding var naviState : NaviState
|
||||||
|
|
||||||
|
@State private var myType: UserType = .Student
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Group {
|
Group {
|
||||||
switch appVM.menuName {
|
switch appVM.menuName {
|
||||||
case .Home:
|
case .Home:
|
||||||
HomeView()
|
HomeView(myType: $myType)
|
||||||
case .Management:
|
case .Management:
|
||||||
ManagementView()
|
ManagementView()
|
||||||
case .Chatting:
|
case .Chatting:
|
||||||
|
@ -28,10 +30,10 @@ struct MainView: View {
|
||||||
case .Calendar:
|
case .Calendar:
|
||||||
CalendarView()
|
CalendarView()
|
||||||
case .Etc:
|
case .Etc:
|
||||||
EtcView()
|
EtcView(myType: $myType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(minLength: 1)
|
// Spacer(minLength: 1)
|
||||||
|
|
||||||
BottomView()
|
BottomView()
|
||||||
.frame(maxWidth: .infinity)
|
.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