Skip to content

Commit

Permalink
Merge pull request #299 from APP-iOS3rd/release/1.0.2
Browse files Browse the repository at this point in the history
Chore(297) 버전 1.0.2 - 책다리 to main
  • Loading branch information
Jihunkim95 authored Apr 2, 2024
2 parents 0bd1158 + 7bc6c40 commit 57a6c41
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 95 deletions.
8 changes: 4 additions & 4 deletions BookBridge/BookBridge.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 202403213;
CURRENT_PROJECT_VERSION = 2024032901;
DEVELOPMENT_ASSET_PATHS = "\"BookBridge/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KVX67TSKSQ;
Expand All @@ -2018,7 +2018,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.bookBridge;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -2042,7 +2042,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 202403213;
CURRENT_PROJECT_VERSION = 2024032901;
DEVELOPMENT_ASSET_PATHS = "\"BookBridge/Preview Content\"";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = KVX67TSKSQ;
Expand All @@ -2066,7 +2066,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
MARKETING_VERSION = 1.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.bookBridge;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ extension NaverAuthManager {
guard let id = object["id"] as? String else { return }
guard let nickname = object["nickname"] as? String else { return }
guard let email = object["email"] as? String else { return }
guard let profileimage = object["profile_image"] as? String else { return }

/*
guard let profileimage = object["profile_image"] as? String else { return }
guard let name = object["name"] as? String else { return }
guard let gender = object["gender"] as? String else { return }
guard let age = object["age"] as? String else { return }
Expand Down
68 changes: 28 additions & 40 deletions BookBridge/BookBridge/Views/HomeTap/HomeTapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ import SwiftUI

struct HomeTapView: View {
@EnvironmentObject private var pathModel: TabPathViewModel

@StateObject var viewModel: HomeViewModel
@StateObject var locationManager = LocationManager.shared

@State var isInsideXmark: Bool = false
@State var isOutsideXmark: Bool = false
@State private var text = ""
@State private var showRecentSearchView = false
@State private var offsetY: CGFloat = 0
@State private var currentOffset: CGFloat = 0
@State private var nextOffset: CGFloat = 0

@Binding var tapCategory: TapCategory

var body: some View {
ZStack {
VStack{
VStack {
HStack {
HStack{
Image(systemName: "magnifyingglass")
Expand Down Expand Up @@ -93,38 +94,16 @@ struct HomeTapView: View {
}
.padding(.vertical, 10)
.padding(.horizontal, 20)

ScrollView(.vertical, showsIndicators: false) {
switch tapCategory {
case .find: //TODO: imageLinks 부분 받아오기
if text.isEmpty {
ForEach(viewModel.findNoticeBoards) { element in
if element.hopeBook.isEmpty {
// NavigationLink {
//
// PostView(noticeBoard: element)
// } label: {
// VStack{
// HomeListItemView(
// author: "",
// date: element.date,
// id: element.id,
// imageLinks: [],
// isChange: element.isChange,
// locate: element.noticeLocation,
// title: element.noticeBoardTitle,
// userId: element.userId,
// location: element.noticeLocationName,
// detail: element.noticeBoardDetail
// )
//
// Divider()
// }
//
// }

if element.hopeBook.isEmpty {
Button {
pathModel.paths.append(.postview(noticeboard: element))
} label: {
} label: {
VStack{
HomeListItemView(
author: "",
Expand All @@ -146,6 +125,7 @@ struct HomeTapView: View {
}

}
.offset(x: currentOffset)
} else {
//TODO: 나중에 썸네일 이미지, 저자 바꾸기

Expand All @@ -171,6 +151,7 @@ struct HomeTapView: View {
}

}
.offset(x: currentOffset)

}
}
Expand Down Expand Up @@ -202,6 +183,7 @@ struct HomeTapView: View {
Divider()
}
}
.offset(x: currentOffset)
} else {
//TODO: 나중에 썸네일 이미지, 저자 바꾸기
Button {
Expand All @@ -226,6 +208,7 @@ struct HomeTapView: View {
}

}
.offset(x: currentOffset)

}
}
Expand Down Expand Up @@ -258,6 +241,7 @@ struct HomeTapView: View {
Divider()
}
}
.offset(x: nextOffset)
}
.padding(.horizontal)
.padding(.bottom, 10)
Expand Down Expand Up @@ -288,6 +272,7 @@ struct HomeTapView: View {
Divider()
}
}
.offset(x: currentOffset)
}
.padding(.horizontal)
.padding(.bottom, 10)
Expand Down Expand Up @@ -439,25 +424,28 @@ struct HomeTapView: View {

var dragGesture: some Gesture {
DragGesture()
.onChanged({ value in
offsetY = value.translation.width * 0.5
})
.onEnded({ value in
.onChanged { value in
let translation = value.translation.width
currentOffset = translation // 현재 보여지는 화면
nextOffset = translation // 다음 화면
}
.onEnded { value in
let translation = value.translation.width

withAnimation(.easeInOut) {
if translation > 0 {
if translation > 10 {
withAnimation {
if translation > 0 { // 오른쪽으로 드래그
if tapCategory == .change {
tapCategory = .find
}
} else {
if translation < -10 {
} else { // 왼쪽으로 드래그
if tapCategory == .find {
tapCategory = .change
}
}
offsetY = .zero
nextOffset = 0
currentOffset = 0
}
})
}
}
}
}

2 changes: 1 addition & 1 deletion BookBridge/BookBridge/Views/MyPage/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct SettingView: View {
Spacer()

//TODO: 버전 업데이트 마다 바꾸기
Text("v1.0.1")
Text("v1.0.2")
.font(.system(size: 17))
.foregroundStyle(.black)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct ChangePostingModifyView: View {
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1)
.padding(1)
)
.padding(.bottom, 20)

Expand All @@ -48,12 +49,13 @@ struct ChangePostingModifyView: View {
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1)
.padding(1)
)
if viewModel.noticeBoard.noticeBoardDetail.isEmpty {
VStack {
HStack {
Text("상세 내용을 작성해주세요. 부적절하거나 불쾌감을 줄 수 있는 컨텐츠를 게시할 경우 제재를 받을 수 있습니다.")
.foregroundStyle(.tertiary)
.foregroundStyle(Color(uiColor: .placeholderText))
Spacer()
}
.padding()
Expand Down
4 changes: 3 additions & 1 deletion BookBridge/BookBridge/Views/Post/FindPostingModifyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct FindPostingModifyView: View {
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1)
.padding(1)
)
.padding(.bottom, 30)

Expand All @@ -41,12 +42,13 @@ struct FindPostingModifyView: View {
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(Color.gray, lineWidth: 1)
.padding(1)
)
if viewModel.noticeBoard.noticeBoardDetail.isEmpty {
VStack {
HStack {
Text("상세 내용을 작성해주세요. 부적절하거나 불쾌감을 줄 수 있는 컨텐츠를 게시할 경우 제재를 받을 수 있습니다.")
.foregroundStyle(.tertiary)
.foregroundStyle(Color(uiColor: .placeholderText))
Spacer()
}
.padding()
Expand Down
Loading

0 comments on commit 57a6c41

Please sign in to comment.