mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-10 16:25:26 +00:00
Fixes for iPad layout
This commit is contained in:
parent
1a351eaa7c
commit
d9b166339d
6 changed files with 26 additions and 23 deletions
|
@ -76,7 +76,6 @@ public struct AccountDetailView: View {
|
||||||
listsListView
|
listsListView
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .maxColumnWidth)
|
|
||||||
}
|
}
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(theme.primaryBackgroundColor)
|
.background(theme.primaryBackgroundColor)
|
||||||
|
|
|
@ -67,7 +67,6 @@ public struct ConversationsListView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .maxColumnWidth)
|
|
||||||
}
|
}
|
||||||
.padding(.top, .layoutPadding)
|
.padding(.top, .layoutPadding)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public extension CGFloat {
|
public extension CGFloat {
|
||||||
static let layoutPadding: CGFloat = 20
|
static var layoutPadding: CGFloat = 20
|
||||||
static let dividerPadding: CGFloat = 2
|
static let dividerPadding: CGFloat = 2
|
||||||
static let statusColumnsSpacing: CGFloat = 8
|
static let statusColumnsSpacing: CGFloat = 8
|
||||||
static let maxColumnWidth: CGFloat = 650
|
static let maxColumnWidth: CGFloat = 650
|
||||||
|
|
|
@ -14,27 +14,31 @@ public struct ErrorView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
public var body: some View {
|
public var body: some View {
|
||||||
VStack {
|
HStack {
|
||||||
Image(systemName: "exclamationmark.triangle.fill")
|
Spacer()
|
||||||
.resizable()
|
VStack {
|
||||||
.aspectRatio(contentMode: .fit)
|
Image(systemName: "exclamationmark.triangle.fill")
|
||||||
.frame(maxHeight: 50)
|
.resizable()
|
||||||
Text(title)
|
.aspectRatio(contentMode: .fit)
|
||||||
.font(.scaledTitle)
|
.frame(maxHeight: 50)
|
||||||
|
Text(title)
|
||||||
|
.font(.scaledTitle)
|
||||||
|
.padding(.top, 16)
|
||||||
|
Text(message)
|
||||||
|
.font(.scaledSubheadline)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
|
.foregroundColor(.gray)
|
||||||
|
Button {
|
||||||
|
onButtonPress()
|
||||||
|
} label: {
|
||||||
|
Text(buttonTitle)
|
||||||
|
}
|
||||||
|
.buttonStyle(.bordered)
|
||||||
.padding(.top, 16)
|
.padding(.top, 16)
|
||||||
Text(message)
|
|
||||||
.font(.scaledSubheadline)
|
|
||||||
.multilineTextAlignment(.center)
|
|
||||||
.foregroundColor(.gray)
|
|
||||||
Button {
|
|
||||||
onButtonPress()
|
|
||||||
} label: {
|
|
||||||
Text(buttonTitle)
|
|
||||||
}
|
}
|
||||||
.buttonStyle(.bordered)
|
.padding(.top, 100)
|
||||||
.padding(.top, 16)
|
.padding(.layoutPadding)
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
.padding(.top, 100)
|
|
||||||
.padding(.layoutPadding)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ public struct StatusesListView<Fetcher>: View where Fetcher: StatusesFetcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
|
.listRowSeparator(.hidden)
|
||||||
|
|
||||||
case let .display(statuses, nextPageState):
|
case let .display(statuses, nextPageState):
|
||||||
ForEach(statuses, id: \.viewId) { status in
|
ForEach(statuses, id: \.viewId) { status in
|
||||||
|
|
|
@ -61,7 +61,7 @@ class TimelineViewModel: ObservableObject, StatusesFetcher {
|
||||||
pendingStatusesObserver?.pendingStatuses = []
|
pendingStatusesObserver?.pendingStatuses = []
|
||||||
statusesState = .loading
|
statusesState = .loading
|
||||||
statuses = try await client.get(endpoint: timeline.endpoint(sinceId: nil,
|
statuses = try await client.get(endpoint: timeline.endpoint(sinceId: nil,
|
||||||
maxId: nil,
|
maxId: "109762933377057565",
|
||||||
minId: nil,
|
minId: nil,
|
||||||
offset: statuses.count))
|
offset: statuses.count))
|
||||||
withAnimation {
|
withAnimation {
|
||||||
|
|
Loading…
Reference in a new issue