aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/item_handlers
diff options
context:
space:
mode:
authorZero~Informatique2021-07-02 22:53:16 +0200
committerZero~Informatique2021-07-03 00:05:22 +0200
commit9165cc1efcf7791f78b61b2c51a9de651b1b09aa (patch)
tree111cfdc74ddaf7b19ff27508f16ab84694b27670 /viewer/src/components/item_handlers
parent08ac32103fb5f8cca1861267dfd07a7c0d2faf62 (diff)
downloadldgallery-9165cc1efcf7791f78b61b2c51a9de651b1b09aa.tar.gz
viewer: types normalization - gallery.d.ts
GitHub: closes #301
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)7
-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.vue3
-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.vue3
7 files changed, 22 insertions, 15 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..7440f54 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);
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..e55989a 100644
--- a/viewer/src/components/item_handlers/LdPdfViewer.vue
+++ b/viewer/src/components/item_handlers/LdPdfViewer.vue
@@ -30,11 +30,12 @@
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;
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..a203b13 100644
--- a/viewer/src/components/item_handlers/LdVideoViewer.vue
+++ b/viewer/src/components/item_handlers/LdVideoViewer.vue
@@ -28,11 +28,12 @@
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;