diff options
author | zeroinformatique | 2021-07-03 00:48:53 +0200 |
---|---|---|
committer | GitHub | 2021-07-03 00:48:53 +0200 |
commit | b6605e2c4ee73ac8b994624098344db5e44ac07d (patch) | |
tree | 5ed06cc5ecdabe070f6fdb9bc4f9a8a3b435cbe6 /viewer/src/components/item_handlers | |
parent | 08ac32103fb5f8cca1861267dfd07a7c0d2faf62 (diff) | |
parent | 1f0377c1b4c2959c73fe4e368673f057ef369917 (diff) | |
download | ldgallery-b6605e2c4ee73ac8b994624098344db5e44ac07d.tar.gz |
Merge pull request #302 from ldgallery/oz-types-normalization
viewer: types normalization
Diffstat (limited to 'viewer/src/components/item_handlers')
-rw-r--r-- | viewer/src/components/item_handlers/LdAudioViewer.vue | 5 | ||||
-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.vue | 3 | ||||
-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.vue | 3 | ||||
-rw-r--r-- | viewer/src/components/item_handlers/LdVideoViewer.vue | 3 |
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"> |
31 | import { Component, Prop, Vue } from "vue-property-decorator"; | 31 | import { AudioItem } from "@/@types/gallery"; |
32 | import Navigation from "@/services/navigation"; | 32 | import Navigation from "@/services/navigation"; |
33 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
33 | 34 | ||
34 | @Component | 35 | @Component |
35 | export default class LdAudioViewer extends Vue { | 36 | export 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"> |
25 | import { Component, Vue, Prop } from "vue-property-decorator"; | 25 | import { DirectoryItem } from "@/@types/gallery"; |
26 | import Navigation from "@/services/navigation"; | 26 | import Navigation from "@/services/navigation"; |
27 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
27 | 28 | ||
28 | @Component | 29 | @Component |
29 | export default class LdDirectory extends Vue { | 30 | export 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"> |
32 | import { Component, Prop, Vue } from "vue-property-decorator"; | 32 | import { OtherItem } from "@/@types/gallery"; |
33 | import Navigation from "@/services/navigation"; | 33 | import Navigation from "@/services/navigation"; |
34 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
34 | 35 | ||
35 | @Component | 36 | @Component |
36 | export default class LdDownload extends Vue { | 37 | export 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"> |
33 | import { PDFItem } from "@/@types/gallery"; | ||
33 | import { Component, Prop, Vue } from "vue-property-decorator"; | 34 | import { Component, Prop, Vue } from "vue-property-decorator"; |
34 | 35 | ||
35 | @Component | 36 | @Component |
36 | export default class LdPdfViewer extends Vue { | 37 | export 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"> |
45 | import { Component, Vue, Prop, Ref } from "vue-property-decorator"; | 45 | import { PictureItem } from "@/@types/gallery"; |
46 | import LdZoom from "@/services/ldzoom"; | ||
47 | import DragScrollClickFix from "@/services/dragscrollclickfix"; | 46 | import DragScrollClickFix from "@/services/dragscrollclickfix"; |
47 | import LdZoom from "@/services/ldzoom"; | ||
48 | import { Component, Prop, Ref, Vue } from "vue-property-decorator"; | ||
48 | 49 | ||
49 | @Component | 50 | @Component |
50 | export default class LdPicture extends Vue { | 51 | export 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"> |
30 | import { PlainTextItem } from "@/@types/gallery"; | ||
30 | import { Component, Prop, Vue } from "vue-property-decorator"; | 31 | import { Component, Prop, Vue } from "vue-property-decorator"; |
31 | 32 | ||
32 | @Component | 33 | @Component |
33 | export default class LdPlainTextViewer extends Vue { | 34 | export 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"> |
31 | import { VideoItem } from "@/@types/gallery"; | ||
31 | import { Component, Prop, Vue } from "vue-property-decorator"; | 32 | import { Component, Prop, Vue } from "vue-property-decorator"; |
32 | 33 | ||
33 | @Component | 34 | @Component |
34 | export default class LdVideoViewer extends Vue { | 35 | export 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; |