Add audio files and audio embeds

This commit is contained in:
sarah committed 2026-10-14 19:40:33 +02:00
1 parent d86e33fd4a
commit 2d5ab15f52
10 files changed
+73 -7

No files matched your search

+4 -3
View File
@@ -193,9 +193,10 @@ class FileView(ft.Container):
return ft.Column(Views or [View], scroll=ft.ScrollMode.AUTO, expand=True)
def _InfoView(self) -> ft.Control:
Icon = ft.Icons.MOVIE_OUTLINED if self.FileType == "video" else ft.Icons.INSERT_DRIVE_FILE_OUTLINED
Note = ("Videos play in your system's video player: use Open Externally."
if self.FileType == "video" else "SaraView can't show this type of file. Use Open Externally.")
Icon, Note = {
"video": (ft.Icons.MOVIE_OUTLINED, "Videos play in your system's video player: use Open Externally."),
"audio": (ft.Icons.MUSIC_NOTE_OUTLINED, "Audio plays in your system's music player: use Open Externally."),
}.get(self.FileType, (ft.Icons.INSERT_DRIVE_FILE_OUTLINED, "SaraView can't show this type of file. Use Open Externally."))
return ft.Column(
[
ft.Icon(Icon, size=64, color=Palette.Mauve),