mirror of
https://github.com/kkebo/DNSecure.git
synced 2026-03-11 08:54:36 +00:00
fix: refine layout of the bottom bar on the sidebar
This commit is contained in:
parent
9997724409
commit
3b29799e70
1 changed files with 14 additions and 6 deletions
|
|
@ -310,21 +310,21 @@ extension ContentView: View {
|
|||
EditButton()
|
||||
}
|
||||
ToolbarItem(placement: .status) {
|
||||
VStack {
|
||||
VStack(spacing: 0) {
|
||||
HStack {
|
||||
Circle()
|
||||
.frame(width: 10, height: 10)
|
||||
.foregroundStyle(self.isEnabled ? .green : .secondary)
|
||||
Text(self.isEnabled ? "Active" : "Inactive")
|
||||
#if targetEnvironment(macCatalyst)
|
||||
Text("-")
|
||||
Button("Refresh", action: self.updateStatus)
|
||||
#endif
|
||||
}
|
||||
if !self.isEnabled {
|
||||
Button("How to Activate") {
|
||||
Button {
|
||||
self.guideIsPresented = true
|
||||
} label: {
|
||||
Label("How to Activate", systemImage: "questionmark.circle")
|
||||
}
|
||||
.labelStyle(.titleAndIcon)
|
||||
.font(.caption)
|
||||
.sheet(isPresented: self.$guideIsPresented) {
|
||||
NavigationView {
|
||||
HowToActivateView()
|
||||
|
|
@ -345,6 +345,14 @@ extension ContentView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
#if targetEnvironment(macCatalyst)
|
||||
ToolbarItemGroup(placement: .bottomBar) {
|
||||
Spacer()
|
||||
Button(action: self.updateStatus) {
|
||||
Label("Refresh", systemImage: "arrow.clockwise")
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private func sidebarRow(at i: Int) -> some View {
|
||||
|
|
|
|||
Loading…
Reference in a new issue