From 18bb451f793677a5bbfdc2c14128bae33c66dfde Mon Sep 17 00:00:00 2001 From: Zephyrrus Date: Mon, 20 Jul 2020 23:01:45 +0300 Subject: feat: implement all-in-one file detail viewer, tag editor and album selection modal --- src/site/components/grid/Grid.vue | 71 +++++++--------- src/site/components/grid/waterfall/Waterfall.vue | 3 +- src/site/components/image-modal/AlbumInfo.vue | 73 ++++++++++++++++ src/site/components/image-modal/ImageInfo.vue | 61 ++++++++++---- src/site/components/image-modal/TagInfo.vue | 103 +++++++++++++++++++++++ 5 files changed, 252 insertions(+), 59 deletions(-) create mode 100644 src/site/components/image-modal/AlbumInfo.vue create mode 100644 src/site/components/image-modal/TagInfo.vue (limited to 'src/site/components') diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index 1e427fc..d29160f 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -6,6 +6,7 @@ +
@@ -66,27 +67,22 @@ @mouseleave.self.stop.prevent="item.preview && mouseOut(item.id)"> - + - - - - - - + - + - + - +
@@ -120,19 +116,19 @@ - + - + - + - + @@ -159,33 +155,10 @@ Load more
- - + + + -
@@ -263,7 +236,9 @@ export default { }, }, created() { + // TODO: Create a middleware for this this.getAlbums(); + this.getTags(); }, methods: { async search() { @@ -348,6 +323,13 @@ export default { this.isAlbumsModalActive = true; }, + async getTags() { + try { + await this.$store.dispatch('tags/fetch'); + } catch (e) { + this.$store.dispatch('alert/set', { text: e.message, error: true }, { root: true }); + } + }, mouseOver(id) { const foundIndex = this.hoveredItems.indexOf(id); if (foundIndex > -1) return; @@ -504,4 +486,13 @@ div.actions { opacity: 1; } } + +.imageinfo-modal::-webkit-scrollbar { + width: 0px; /* Remove scrollbar space */ + background: transparent; /* Optional: just make scrollbar invisible */ +} + +i.mdi { + font-size: 16px; +} diff --git a/src/site/components/grid/waterfall/Waterfall.vue b/src/site/components/grid/waterfall/Waterfall.vue index 79a330a..762cbbd 100644 --- a/src/site/components/grid/waterfall/Waterfall.vue +++ b/src/site/components/grid/waterfall/Waterfall.vue @@ -1,7 +1,7 @@