fix ui
This commit is contained in:
parent
ba775af7b9
commit
eeb82d7152
@ -87,6 +87,7 @@ struct DateNavView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding([.leading, .trailing], 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -300,7 +300,9 @@ extension DetailView {
|
|||||||
} placeholder: {
|
} placeholder: {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
}
|
}
|
||||||
|
.frame(width: 90, height: 70)
|
||||||
.overlay {
|
.overlay {
|
||||||
|
if !episode.num_name.isEmpty {
|
||||||
VStack {
|
VStack {
|
||||||
HStack {
|
HStack {
|
||||||
Text(episode.num_name)
|
Text(episode.num_name)
|
||||||
@ -316,6 +318,9 @@ extension DetailView {
|
|||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding([.top, .leading], 8)
|
.padding([.top, .leading], 8)
|
||||||
|
} else {
|
||||||
|
EmptyView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(episode.name)
|
Text(episode.name)
|
||||||
|
|||||||
@ -299,6 +299,8 @@ extension IndexView {
|
|||||||
.background(Color(hex: "#F2F2F2"), ignoresSafeAreaEdges: .top)
|
.background(Color(hex: "#F2F2F2"), ignoresSafeAreaEdges: .top)
|
||||||
|
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
|
|
||||||
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
HStack(alignment: .center) {
|
HStack(alignment: .center) {
|
||||||
Spacer()
|
Spacer()
|
||||||
Text("番剧补完计划")
|
Text("番剧补完计划")
|
||||||
@ -311,7 +313,6 @@ extension IndexView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 基于日期的更新列表
|
// 基于日期的更新列表
|
||||||
ScrollView(.vertical, showsIndicators: false) {
|
|
||||||
VStack(alignment: .center, spacing: 10) {
|
VStack(alignment: .center, spacing: 10) {
|
||||||
ForEach(indexModel.updateDramaGroups, id: \.group_id) { group in
|
ForEach(indexModel.updateDramaGroups, id: \.group_id) { group in
|
||||||
DramaGroupView(group: group) {
|
DramaGroupView(group: group) {
|
||||||
@ -330,7 +331,7 @@ extension IndexView {
|
|||||||
|
|
||||||
let frame = geometry.frame(in: .global)
|
let frame = geometry.frame(in: .global)
|
||||||
let screenBounds = UIScreen.main.bounds
|
let screenBounds = UIScreen.main.bounds
|
||||||
let contextFrame = geometry.frame(in: .named("scrollView"))
|
let contextFrame = geometry.frame(in: .named("indexScrollView"))
|
||||||
|
|
||||||
if screenBounds.height - frame.minY > 50 && contextFrame.minY > 0 && !isMoreLoading {
|
if screenBounds.height - frame.minY > 50 && contextFrame.minY > 0 && !isMoreLoading {
|
||||||
Task {
|
Task {
|
||||||
@ -346,7 +347,7 @@ extension IndexView {
|
|||||||
ProgressView()
|
ProgressView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.coordinateSpace(name: "scrollView")
|
.coordinateSpace(name: "indexScrollView")
|
||||||
.refreshable {
|
.refreshable {
|
||||||
guard !self.isPrevLoading && !self.showDateNavPopover else {
|
guard !self.isPrevLoading && !self.showDateNavPopover else {
|
||||||
return
|
return
|
||||||
@ -372,14 +373,9 @@ extension IndexView {
|
|||||||
.alert(isPresented: $showPrompt) {
|
.alert(isPresented: $showPrompt) {
|
||||||
Alert(title: Text("提示"), message: Text(self.promptMessage), dismissButton: .default(Text("OK")))
|
Alert(title: Text("提示"), message: Text(self.promptMessage), dismissButton: .default(Text("OK")))
|
||||||
}
|
}
|
||||||
.onAppear {
|
.task {
|
||||||
Task {
|
|
||||||
await self.indexModel.loadData(userId: self.userId)
|
await self.indexModel.loadData(userId: self.userId)
|
||||||
}
|
}
|
||||||
withUnsafePointer(to: indexModel) { pointer in
|
|
||||||
print(pointer)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -397,7 +393,7 @@ extension IndexView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
HStack(alignment: .center, spacing: 5) {
|
LazyHStack(alignment: .center, spacing: 5) {
|
||||||
ForEach(dramaItem.episodes) { item in
|
ForEach(dramaItem.episodes) { item in
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
GeometryReader { geometry in
|
GeometryReader { geometry in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user