Improve buttons
This commit is contained in:
@ -51,20 +51,24 @@ struct FileDetailView: View {
|
||||
text: "A file that can be used in a post or page")
|
||||
|
||||
GenericPropertyView(title: "Actions") {
|
||||
HStack(spacing: 10) {
|
||||
ButtonIcon(.folder, action: showFileInFinder)
|
||||
ButtonIcon(.arrowClockwise, action: markFileAsChanged)
|
||||
if file.isExternallyStored {
|
||||
ButtonIcon(.squareAndArrowDown, action: replaceFile)
|
||||
} else {
|
||||
ButtonIcon(.arrowLeftArrowRight, action: replaceFile)
|
||||
ButtonIcon(.squareDashed, action: convertToExternal)
|
||||
}
|
||||
ButtonIcon(.trash, action: deleteFile)
|
||||
.foregroundStyle(.red)
|
||||
ColoredButton(icon: .folder, text: "Show in folder", action: showFileInFinder)
|
||||
ColoredButton(icon: .arrowClockwise, text: "Mark file as changed", action: markFileAsChanged)
|
||||
if file.isExternallyStored {
|
||||
ColoredButton(
|
||||
icon: .squareAndArrowDown,
|
||||
text: "Convert to internal file",
|
||||
action: replaceFile)
|
||||
} else {
|
||||
ColoredButton(
|
||||
icon: .arrowLeftArrowRight,
|
||||
text: "Replace file",
|
||||
action: replaceFile)
|
||||
ColoredButton(
|
||||
icon: .squareDashed,
|
||||
text: "Convert to external file",
|
||||
action: convertToExternal)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.foregroundStyle(.blue)
|
||||
ColoredButton(delete: deleteFile)
|
||||
}
|
||||
|
||||
IdPropertyView(
|
||||
|
Reference in New Issue
Block a user