Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web/satellite/vuetify-poc: support PDF previewing
This change allows supported platforms to preview PDFs in the object browser. Resolves #6397 Change-Id: I6078914f0ddf5f620514e27e51d24ba8c11a2786
- Loading branch information
Showing
2 changed files
with
73 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...llite/vuetify-poc/src/components/dialogs/filePreviewComponents/FilePreviewPlaceholder.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (C) 2023 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
<template> | ||
<div class="h-100 w-100 d-flex flex-column align-center justify-center"> | ||
<p class="mb-5">{{ file?.Key || '' }}</p> | ||
<p class="text-h5 mb-5 font-weight-bold">No preview available</p> | ||
<v-btn | ||
@click="() => emits('download')" | ||
> | ||
<template #prepend> | ||
<img src="@poc/assets/icon-download.svg" width="22" alt="Download"> | ||
</template> | ||
{{ `Download (${prettyBytes(file?.Size || 0)})` }} | ||
</v-btn> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
import { VBtn } from 'vuetify/components'; | ||
import prettyBytes from 'pretty-bytes'; | ||
import { BrowserObject } from '@/store/modules/objectBrowserStore'; | ||
const props = defineProps<{ | ||
file: BrowserObject, | ||
}>(); | ||
const emits = defineEmits<{ | ||
download: []; | ||
}>(); | ||
</script> |