Merge pull request #1305 from omnivore-app/chore/mac-app-resurrection

Mac App Updates
This commit is contained in:
Satindar Dhillon 2022-10-12 21:00:12 -07:00 committed by GitHub
commit 8c2089d1b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 19 deletions

View file

@ -64,6 +64,12 @@ struct SubscriptionsView: View {
)
.buttonStyle(RoundedRectButtonStyle())
}
} else if viewModel.subscriptions.isEmpty {
VStack(alignment: .center) {
Spacer()
Text("You have no current subscriptions.")
Spacer()
}
} else {
Group {
#if os(iOS)

View file

@ -42,24 +42,34 @@ struct EmailAuthView: View {
}
}
var body: some View {
NavigationView {
ZStack {
Color.appBackground.edgesIgnoringSafeArea(.all)
primaryContent
.frame(maxWidth: 300)
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif
.toolbar {
ToolbarItem(placement: .barTrailing) {
Button(
action: { presentationMode.wrappedValue.dismiss() },
label: { Image(systemName: "xmark").foregroundColor(.appGrayTextContrast) }
)
}
var innerBody: some View {
ZStack {
Color.appBackground.edgesIgnoringSafeArea(.all)
primaryContent
.frame(maxWidth: 300)
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif
.toolbar {
ToolbarItem(placement: .barTrailing) {
Button(
action: { presentationMode.wrappedValue.dismiss() },
label: { Image(systemName: "xmark").foregroundColor(.appGrayTextContrast) }
)
}
}
}
}
var body: some View {
#if os(iOS)
NavigationView {
innerBody
}
#else
innerBody
.frame(minWidth: 400, minHeight: 400)
.buttonStyle(PlainButtonStyle())
#endif
}
}

View file

@ -44,7 +44,7 @@ struct EmailLoginFormView: View {
VStack(spacing: 28) {
ScrollView(showsIndicators: false) {
if horizontalSizeClass == .regular {
Spacer(minLength: 150)
Spacer(minLength: isMacApp ? 50 : 150)
}
VStack {
VStack(alignment: .leading, spacing: 6) {

View file

@ -86,7 +86,7 @@ struct EmailSignupFormView: View {
VStack(spacing: 28) {
ScrollView(showsIndicators: false) {
if horizontalSizeClass == .regular {
Spacer(minLength: 150)
Spacer(minLength: isMacApp ? 50 : 150)
}
VStack {
// Email

View file

@ -43,7 +43,15 @@ struct WelcomeView: View {
headlineText
Button(
action: { showAboutPage = true },
action: {
#if os(iOS)
showAboutPage = true
#else
if let url = URL(string: "https://omnivore.app/about") {
NSWorkspace.shared.open(url)
}
#endif
},
label: {
HStack(spacing: 4) {
Text("Learn more")
@ -159,6 +167,9 @@ struct WelcomeView: View {
}
)
.padding(.vertical)
#if os(macOS)
.buttonStyle(PlainButtonStyle())
#endif
return
VStack(alignment: .center, spacing: 16) {