diff options
author | Zero~Informatique | 2020-01-10 22:03:30 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-01-10 22:03:30 +0100 |
commit | d25b5a87668bba43e81342f7385a1097653c5311 (patch) | |
tree | 074e0b3c84728c09821329a24fc5eb2f575e2145 /viewer/src/views | |
parent | 89bcb2dbe5b5e6eb8e8ba13ceecee2770dfe4cd4 (diff) | |
download | ldgallery-d25b5a87668bba43e81342f7385a1097653c5311.tar.gz |
Code review code improvements
Diffstat (limited to 'viewer/src/views')
-rw-r--r-- | viewer/src/views/Gallery.vue | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/viewer/src/views/Gallery.vue b/viewer/src/views/Gallery.vue index a53df3d..1c98877 100644 --- a/viewer/src/views/Gallery.vue +++ b/viewer/src/views/Gallery.vue | |||
@@ -1,8 +1,8 @@ | |||
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <gallery-search v-if="$uiStore.isModeSearch" :items="currentSearch" /> | 3 | <gallery-search v-if="$uiStore.isModeSearch" :items="currentSearch" /> |
4 | <gallery-directory v-else-if="isDirectory" :directory="$galleryStore.currentItem" /> | 4 | <gallery-directory v-else-if="checkType('directory')" :directory="$galleryStore.currentItem" /> |
5 | <gallery-picture v-else-if="isPicture" :picture="$galleryStore.currentItem" /> | 5 | <gallery-picture v-else-if="checkType('picture')" :picture="$galleryStore.currentItem" /> |
6 | <div v-else>{{$t("gallery.unknowntype")}}</div> | 6 | <div v-else>{{$t("gallery.unknowntype")}}</div> |
7 | </div> | 7 | </div> |
8 | </template> | 8 | </template> |
@@ -30,14 +30,6 @@ export default class Gallery extends Vue { | |||
30 | this.$galleryStore.setCurrentPath(this.pathMatch); | 30 | this.$galleryStore.setCurrentPath(this.pathMatch); |
31 | } | 31 | } |
32 | 32 | ||
33 | get isDirectory(): boolean { | ||
34 | return this.checkType("directory"); | ||
35 | } | ||
36 | |||
37 | get isPicture(): boolean { | ||
38 | return this.checkType("picture"); | ||
39 | } | ||
40 | |||
41 | // Results of the search (by tags) | 33 | // Results of the search (by tags) |
42 | get currentSearch(): Gallery.Item[] { | 34 | get currentSearch(): Gallery.Item[] { |
43 | const byOperation = this.extractTagsByOperation(this.$uiStore.currentTags); | 35 | const byOperation = this.extractTagsByOperation(this.$uiStore.currentTags); |