Full generation, file type cleanup
This commit is contained in:
@ -24,7 +24,7 @@ struct FileContentView: View {
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
} else {
|
||||
switch file.type {
|
||||
switch file.type.category {
|
||||
case .image:
|
||||
file.imageToDisplay
|
||||
.resizable()
|
||||
@ -39,7 +39,7 @@ struct FileContentView: View {
|
||||
.font(.title)
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
case .text, .code:
|
||||
case .text, .code, .asset:
|
||||
TextFileContentView(file: file)
|
||||
.id(file.id)
|
||||
case .video:
|
||||
@ -52,7 +52,7 @@ struct FileContentView: View {
|
||||
.font(.title)
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
case .other:
|
||||
case .resource:
|
||||
VStack {
|
||||
Image(systemSymbol: .docQuestionmark)
|
||||
.resizable()
|
||||
@ -62,6 +62,16 @@ struct FileContentView: View {
|
||||
.font(.title)
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
case .audio:
|
||||
VStack {
|
||||
Image(systemSymbol: .waveformPath)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: iconSize)
|
||||
Text("No preview available")
|
||||
.font(.title)
|
||||
}
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}.padding()
|
||||
|
Reference in New Issue
Block a user