diff --git a/client/src/common/fileTypes.ts b/client/src/common/fileTypes.ts index 9633a20ff76..602fea618f8 100644 --- a/client/src/common/fileTypes.ts +++ b/client/src/common/fileTypes.ts @@ -11,6 +11,7 @@ enum FileContentType { Document = 'document', Text = 'text', PdfDocument = 'pdf-document', + Presentation = 'presentation', Unknown = 'unknown', } @@ -25,6 +26,7 @@ const DOCUMENTS = ['docx']; const PDF_DOCUMENTS = ['pdf']; const AUDIOS = ['wav', 'mp3', 'ogg']; const VIDEOS = ['mp4', 'mpeg', 'webm']; +const PRESENTATIONS = ['pptx']; // For generic text/plain const TEXTS = [ @@ -80,7 +82,7 @@ async function getMimeTypeFromBuffer(data: Uint8Array): Promise import { routerGoBack } from '@/router'; +import useFileOpener from '@/services/pathOpener'; import { IonButton, IonIcon, IonLabel } from '@ionic/vue'; import { chevronBack } from 'ionicons/icons'; import { useWindowSize } from 'megashark-lib'; const { isLargeDisplay } = useWindowSize(); +const fileOpener = useFileOpener(); defineProps<{ short: boolean; }>(); + +async function goBack(): Promise { + fileOpener.pathOpened(); + await routerGoBack(); +}