Skip to content

Commit

Permalink
Trimmed bottom bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind-Explorer committed Jul 18, 2022
1 parent 4600895 commit 83b74c5
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions PlayCover/View/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,27 @@ struct MainView: View {
VStack(alignment: .leading, spacing: 0) {
HStack {
Text("Notices").font(.headline).help("Important news and announcements")
Button {
withAnimation { noticesExpanded.toggle() }
} label: {
Image(systemName: "chevron.up")
.rotationEffect(Angle(degrees: noticesExpanded ? 180 : 0))
}
Spacer()
if !SystemConfig.isPlaySignActive {
HStack {
Button("Problems logging in?") { showSetup = true }
.buttonStyle(.borderedProminent).tint(.accentColor).controlSize(.large)
}
}
if !update.updateLink.isEmpty {
Button(action: { NSWorkspace.shared.open(URL(string: update.updateLink)!) }) {
HStack {
Image(systemName: "arrow.down.square.fill")
Text("Update app")
}
}.buttonStyle(UpdateButton()).controlSize(.large)
}
}
Text(StoreApp.notice)
.font(.body)
Expand All @@ -104,33 +125,7 @@ struct MainView: View {
}

HStack(spacing: 12) {
Button {
withAnimation { noticesExpanded.toggle() }
} label: {
Image(systemName: "chevron.up")
.rotationEffect(Angle(degrees: noticesExpanded ? 180 : 0))
}
Spacer()
if !SystemConfig.isPlaySignActive {
HStack {
Button("Problems logging in?") { showSetup = true }
.buttonStyle(.borderedProminent).tint(.accentColor).controlSize(.large)
}
}
Button(action: {
Log.shared.logdata.copyToClipBoard()
showToast.toggle()
}) {
Text("Copy logs")
}.controlSize(.large)
if !update.updateLink.isEmpty {
Button(action: { NSWorkspace.shared.open(URL(string: update.updateLink)!) }) {
HStack {
Image(systemName: "arrow.down.square.fill")
Text("Update app")
}
}.buttonStyle(UpdateButton()).controlSize(.large)
}
}.frame(maxWidth: .infinity)
#if DEBUG
Divider()
Expand Down

0 comments on commit 83b74c5

Please sign in to comment.