mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-18 05:22:11 +00:00
More cleanup.
This commit is contained in:
parent
54d7fbe88d
commit
94689ae70d
@ -74,13 +74,7 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
|||||||
.toolbar {
|
.toolbar {
|
||||||
updateNotice
|
updateNotice
|
||||||
agentNotice
|
agentNotice
|
||||||
ToolbarItem {
|
newItem
|
||||||
Button(action: {
|
|
||||||
showingCreation = true
|
|
||||||
}, label: {
|
|
||||||
Image(systemName: "plus")
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +108,19 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var newItem: ToolbarItem<Void, AnyView> {
|
||||||
|
guard storeList.modifiableStore?.isAvailable ?? false else {
|
||||||
|
return ToolbarItem { AnyView(Spacer()) }
|
||||||
|
}
|
||||||
|
return ToolbarItem {
|
||||||
|
AnyView(Button(action: {
|
||||||
|
showingCreation = true
|
||||||
|
}, label: {
|
||||||
|
Image(systemName: "plus")
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var agentNotice: ToolbarItem<Void, AnyView> {
|
var agentNotice: ToolbarItem<Void, AnyView> {
|
||||||
guard agentStatusChecker.running else {
|
guard agentStatusChecker.running else {
|
||||||
return ToolbarItem { AnyView(Spacer()) }
|
return ToolbarItem { AnyView(Spacer()) }
|
||||||
|
@ -101,7 +101,7 @@ struct SetupStepCommandView: View {
|
|||||||
.background(Color(white: 0, opacity: 0.10))
|
.background(Color(white: 0, opacity: 0.10))
|
||||||
.cornerRadius(10)
|
.cornerRadius(10)
|
||||||
.onDrag {
|
.onDrag {
|
||||||
return NSItemProvider(item: NSData(data: text.data(using: .utf8)!), typeIdentifier: kUTTypeUTF8PlainText as String)
|
NSItemProvider(item: NSData(data: text.data(using: .utf8)!), typeIdentifier: kUTTypeUTF8PlainText as String)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user