diff options
author | Zero~Informatique | 2020-01-30 21:24:15 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-01-30 21:24:15 +0100 |
commit | 42105af46681d81959a5d5a9a16ec9e98463a92e (patch) | |
tree | 9a7e32da0c3ebcc41199cd2667ca1da113b93d21 /viewer/src/components | |
parent | 16d319ac092aea56ac9f872129d23fface4b379d (diff) | |
download | ldgallery-42105af46681d81959a5d5a9a16ec9e98463a92e.tar.gz |
viewer: new breadcrumb. navigation buttons. and styling improvements
Diffstat (limited to 'viewer/src/components')
-rw-r--r-- | viewer/src/components/LdProposition.vue | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue index 9a32e0a..f653e4d 100644 --- a/viewer/src/components/LdProposition.vue +++ b/viewer/src/components/LdProposition.vue | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | <template> | 20 | <template> |
21 | <div> | 21 | <div> |
22 | <div v-for="proposed in proposedTags" :key="proposed.rawTag" class="proposition"> | 22 | <div v-for="proposed in proposedTags" :key="proposed.rawTag" class="proposition link"> |
23 | <fa-icon icon="minus" @click="add(Operation.SUBSTRACTION, proposed.rawTag)" /> | 23 | <fa-icon icon="minus" @click="add(Operation.SUBSTRACTION, proposed.rawTag)" /> |
24 | <span | 24 | <span |
25 | @click="add(Operation.INTERSECTION, proposed.rawTag)" | 25 | @click="add(Operation.INTERSECTION, proposed.rawTag)" |
@@ -51,13 +51,12 @@ export default class LdTagInput extends Vue { | |||
51 | .forEach(rawTag => (propositions[rawTag] = (propositions[rawTag] ?? 0) + 1)); | 51 | .forEach(rawTag => (propositions[rawTag] = (propositions[rawTag] ?? 0) + 1)); |
52 | } else { | 52 | } else { |
53 | // Tags count from the whole gallery | 53 | // Tags count from the whole gallery |
54 | Object.entries(this.$galleryStore.tags) | 54 | Object.entries(this.$galleryStore.tags).forEach(entry => (propositions[entry[0]] = entry[1].items.length)); |
55 | .forEach(entry => (propositions[entry[0]] = entry[1].items.length)); | ||
56 | } | 55 | } |
57 | 56 | ||
58 | return Object.entries(propositions) | 57 | return Object.entries(propositions) |
59 | .sort((a,b) => b[1] - a[1]) | 58 | .sort((a, b) => b[1] - a[1]) |
60 | .map(entry => ({rawTag: entry[0], count: entry[1]})); | 59 | .map(entry => ({ rawTag: entry[0], count: entry[1] })); |
61 | } | 60 | } |
62 | 61 | ||
63 | extractDistinctItems(currentTags: Tag.Search[]): Gallery.Item[] { | 62 | extractDistinctItems(currentTags: Tag.Search[]): Gallery.Item[] { |
@@ -79,12 +78,13 @@ export default class LdTagInput extends Vue { | |||
79 | </script> | 78 | </script> |
80 | 79 | ||
81 | <style lang="scss"> | 80 | <style lang="scss"> |
81 | @import "@/assets/scss/theme.scss"; | ||
82 | |||
82 | .proposition { | 83 | .proposition { |
83 | display: flex; | 84 | display: flex; |
84 | justify-content: space-between; | 85 | justify-content: space-between; |
85 | align-items: center; | 86 | align-items: center; |
86 | margin: 10px; | 87 | margin: 10px; |
87 | color: lightcyan; | ||
88 | cursor: pointer; | 88 | cursor: pointer; |
89 | } | 89 | } |
90 | .proposition span { | 90 | .proposition span { |