aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/item_handlers
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/components/item_handlers')
-rw-r--r--viewer/src/components/item_handlers/LdAudioViewer.vue5
-rw-r--r--viewer/src/components/item_handlers/LdDirectoryViewer.vue (renamed from viewer/src/components/item_handlers/LdDirectory.vue)9
-rw-r--r--viewer/src/components/item_handlers/LdDownloadViewer.vue (renamed from viewer/src/components/item_handlers/LdDownload.vue)7
-rw-r--r--viewer/src/components/item_handlers/LdPdfViewer.vue7
-rw-r--r--viewer/src/components/item_handlers/LdPictureViewer.vue (renamed from viewer/src/components/item_handlers/LdPicture.vue)9
-rw-r--r--viewer/src/components/item_handlers/LdPlainTextViewer.vue3
-rw-r--r--viewer/src/components/item_handlers/LdVideoViewer.vue7
7 files changed, 24 insertions, 23 deletions
diff --git a/viewer/src/components/item_handlers/LdAudioViewer.vue b/viewer/src/components/item_handlers/LdAudioViewer.vue
index 2e0f8dc..559b10a 100644
--- a/viewer/src/components/item_handlers/LdAudioViewer.vue
+++ b/viewer/src/components/item_handlers/LdAudioViewer.vue
@@ -28,12 +28,13 @@
28</template> 28</template>
29 29
30<script lang="ts"> 30<script lang="ts">
31import { Component, Prop, Vue } from "vue-property-decorator"; 31import { AudioItem } from "@/@types/gallery";
32import Navigation from "@/services/navigation"; 32import Navigation from "@/services/navigation";
33import { Component, Prop, Vue } from "vue-property-decorator";
33 34
34@Component 35@Component
35export default class LdAudioViewer extends Vue { 36export default class LdAudioViewer extends Vue {
36 @Prop({ required: true }) readonly item!: Gallery.Audio; 37 @Prop({ required: true }) readonly item!: AudioItem;
37 38
38 get itemResourceUrl(): string { 39 get itemResourceUrl(): string {
39 return this.$galleryStore.resourceRoot + this.item.properties.resource; 40 return this.$galleryStore.resourceRoot + this.item.properties.resource;
diff --git a/viewer/src/components/item_handlers/LdDirectory.vue b/viewer/src/components/item_handlers/LdDirectoryViewer.vue
index eec8011..2259f12 100644
--- a/viewer/src/components/item_handlers/LdDirectory.vue
+++ b/viewer/src/components/item_handlers/LdDirectoryViewer.vue
@@ -22,12 +22,13 @@
22</template> 22</template>
23 23
24<script lang="ts"> 24<script lang="ts">
25import { Component, Vue, Prop } from "vue-property-decorator"; 25import { DirectoryItem } from "@/@types/gallery";
26import Navigation from "@/services/navigation"; 26import Navigation from "@/services/navigation";
27import { Component, Prop, Vue } from "vue-property-decorator";
27 28
28@Component 29@Component
29export default class LdDirectory extends Vue { 30export default class LdDirectoryViewer extends Vue {
30 @Prop({ required: true }) readonly item!: Gallery.Directory; 31 @Prop({ required: true }) readonly item!: DirectoryItem;
31 32
32 mounted() { 33 mounted() {
33 this.$uiStore.toggleFullscreen(false); 34 this.$uiStore.toggleFullscreen(false);
@@ -38,5 +39,3 @@ export default class LdDirectory extends Vue {
38 } 39 }
39} 40}
40</script> 41</script>
41
42<style lang="scss"></style>
diff --git a/viewer/src/components/item_handlers/LdDownload.vue b/viewer/src/components/item_handlers/LdDownloadViewer.vue
index 7b09dab..60c7c49 100644
--- a/viewer/src/components/item_handlers/LdDownload.vue
+++ b/viewer/src/components/item_handlers/LdDownloadViewer.vue
@@ -29,12 +29,13 @@
29</template> 29</template>
30 30
31<script lang="ts"> 31<script lang="ts">
32import { Component, Prop, Vue } from "vue-property-decorator"; 32import { OtherItem } from "@/@types/gallery";
33import Navigation from "@/services/navigation"; 33import Navigation from "@/services/navigation";
34import { Component, Prop, Vue } from "vue-property-decorator";
34 35
35@Component 36@Component
36export default class LdDownload extends Vue { 37export default class LdDownloadViewer extends Vue {
37 @Prop({ required: true }) readonly item!: Gallery.Other; 38 @Prop({ required: true }) readonly item!: OtherItem;
38 39
39 get itemFileName(): string { 40 get itemFileName(): string {
40 return Navigation.getFileName(this.item); 41 return Navigation.getFileName(this.item);
diff --git a/viewer/src/components/item_handlers/LdPdfViewer.vue b/viewer/src/components/item_handlers/LdPdfViewer.vue
index 462c463..04cba0c 100644
--- a/viewer/src/components/item_handlers/LdPdfViewer.vue
+++ b/viewer/src/components/item_handlers/LdPdfViewer.vue
@@ -24,22 +24,21 @@
24 <!-- prefer native browser PDF viewer if available --> 24 <!-- prefer native browser PDF viewer if available -->
25 <object class="fill" :data="itemResourceUrl" type="application/pdf"> 25 <object class="fill" :data="itemResourceUrl" type="application/pdf">
26 <!-- TODO: fallback to PDF.js (https://github.com/pacien/ldgallery/issues/212) --> 26 <!-- TODO: fallback to PDF.js (https://github.com/pacien/ldgallery/issues/212) -->
27 <ld-download :item="item" /> 27 <ld-download-viewer :item="item" />
28 </object> 28 </object>
29 </div> 29 </div>
30</template> 30</template>
31 31
32<script lang="ts"> 32<script lang="ts">
33import { PDFItem } from "@/@types/gallery";
33import { Component, Prop, Vue } from "vue-property-decorator"; 34import { Component, Prop, Vue } from "vue-property-decorator";
34 35
35@Component 36@Component
36export default class LdPdfViewer extends Vue { 37export default class LdPdfViewer extends Vue {
37 @Prop({ required: true }) readonly item!: Gallery.PDF; 38 @Prop({ required: true }) readonly item!: PDFItem;
38 39
39 get itemResourceUrl(): string { 40 get itemResourceUrl(): string {
40 return this.$galleryStore.resourceRoot + this.item.properties.resource; 41 return this.$galleryStore.resourceRoot + this.item.properties.resource;
41 } 42 }
42} 43}
43</script> 44</script>
44
45<style lang="scss" module></style>
diff --git a/viewer/src/components/item_handlers/LdPicture.vue b/viewer/src/components/item_handlers/LdPictureViewer.vue
index e652afc..003ffe9 100644
--- a/viewer/src/components/item_handlers/LdPicture.vue
+++ b/viewer/src/components/item_handlers/LdPictureViewer.vue
@@ -42,13 +42,14 @@
42</template> 42</template>
43 43
44<script lang="ts"> 44<script lang="ts">
45import { Component, Vue, Prop, Ref } from "vue-property-decorator"; 45import { PictureItem } from "@/@types/gallery";
46import LdZoom from "@/services/ldzoom";
47import DragScrollClickFix from "@/services/dragscrollclickfix"; 46import DragScrollClickFix from "@/services/dragscrollclickfix";
47import LdZoom from "@/services/ldzoom";
48import { Component, Prop, Ref, Vue } from "vue-property-decorator";
48 49
49@Component 50@Component
50export default class LdPicture extends Vue { 51export default class LdPictureViewer extends Vue {
51 @Prop({ required: true }) readonly item!: Gallery.Picture; 52 @Prop({ required: true }) readonly item!: PictureItem;
52 @Ref() readonly containerElement!: HTMLDivElement; 53 @Ref() readonly containerElement!: HTMLDivElement;
53 @Ref() readonly imageElement!: Vue; 54 @Ref() readonly imageElement!: Vue;
54 55
diff --git a/viewer/src/components/item_handlers/LdPlainTextViewer.vue b/viewer/src/components/item_handlers/LdPlainTextViewer.vue
index cd26d9d..79465d5 100644
--- a/viewer/src/components/item_handlers/LdPlainTextViewer.vue
+++ b/viewer/src/components/item_handlers/LdPlainTextViewer.vue
@@ -27,11 +27,12 @@
27</template> 27</template>
28 28
29<script lang="ts"> 29<script lang="ts">
30import { PlainTextItem } from "@/@types/gallery";
30import { Component, Prop, Vue } from "vue-property-decorator"; 31import { Component, Prop, Vue } from "vue-property-decorator";
31 32
32@Component 33@Component
33export default class LdPlainTextViewer extends Vue { 34export default class LdPlainTextViewer extends Vue {
34 @Prop({ required: true }) readonly item!: Gallery.PlainText; 35 @Prop({ required: true }) readonly item!: PlainTextItem;
35 36
36 get itemResourceUrl(): string { 37 get itemResourceUrl(): string {
37 return this.$galleryStore.resourceRoot + this.item.properties.resource; 38 return this.$galleryStore.resourceRoot + this.item.properties.resource;
diff --git a/viewer/src/components/item_handlers/LdVideoViewer.vue b/viewer/src/components/item_handlers/LdVideoViewer.vue
index 2e3a43c..ed95bc2 100644
--- a/viewer/src/components/item_handlers/LdVideoViewer.vue
+++ b/viewer/src/components/item_handlers/LdVideoViewer.vue
@@ -22,17 +22,18 @@
22 <!-- intermediate container necessary to eliminate the scrollbar --> 22 <!-- intermediate container necessary to eliminate the scrollbar -->
23 <div class="fill no-scroll"> 23 <div class="fill no-scroll">
24 <video class="fill" :src="itemResourceUrl" :poster="thumbnailResourceUrl" preload="auto" controls> 24 <video class="fill" :src="itemResourceUrl" :poster="thumbnailResourceUrl" preload="auto" controls>
25 <ld-download :item="item" /> 25 <ld-download-viewer :item="item" />
26 </video> 26 </video>
27 </div> 27 </div>
28</template> 28</template>
29 29
30<script lang="ts"> 30<script lang="ts">
31import { VideoItem } from "@/@types/gallery";
31import { Component, Prop, Vue } from "vue-property-decorator"; 32import { Component, Prop, Vue } from "vue-property-decorator";
32 33
33@Component 34@Component
34export default class LdVideoViewer extends Vue { 35export default class LdVideoViewer extends Vue {
35 @Prop({ required: true }) readonly item!: Gallery.Video; 36 @Prop({ required: true }) readonly item!: VideoItem;
36 37
37 get itemResourceUrl(): string { 38 get itemResourceUrl(): string {
38 return this.$galleryStore.resourceRoot + this.item.properties.resource; 39 return this.$galleryStore.resourceRoot + this.item.properties.resource;
@@ -43,5 +44,3 @@ export default class LdVideoViewer extends Vue {
43 } 44 }
44} 45}
45</script> 46</script>
46
47<style lang="scss" module></style>