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/assets/styles/_colors.scss | 12 +++ src/site/assets/styles/style.scss | 6 +- 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 +++++++++++++++++++++++ src/site/store/images.js | 27 ++++++ src/site/store/tags.js | 40 +++++++++ 9 files changed, 336 insertions(+), 60 deletions(-) create mode 100644 src/site/components/image-modal/AlbumInfo.vue create mode 100644 src/site/components/image-modal/TagInfo.vue create mode 100644 src/site/store/tags.js (limited to 'src') diff --git a/src/site/assets/styles/_colors.scss b/src/site/assets/styles/_colors.scss index 0bc7c5e..e8b17c4 100644 --- a/src/site/assets/styles/_colors.scss +++ b/src/site/assets/styles/_colors.scss @@ -69,3 +69,15 @@ $sidebar-box-shadow: none; $menu-item-color: $textColor; $menu-item-hover-color: $textColorHighlight; $menu-item-active-background-color: $backgroundAccent; + +// dropdown +$dropdown-content-background-color: $background; +$dropdown-item-hover-background-color: $backgroundAccentLighter; +$dropdown-item-color: $textColor; +$dropdown-item-hover-color: $textColorHighlight; +$dropdown-item-active-color: $textColorHighlight; +$dropdown-item-active-background-color: hsl(171, 100%, 41%); // $primary + +// tags +$tag-background-color: $base-2; +$tag-color: $textColor; diff --git a/src/site/assets/styles/style.scss b/src/site/assets/styles/style.scss index 026f277..4ad0471 100644 --- a/src/site/assets/styles/style.scss +++ b/src/site/assets/styles/style.scss @@ -360,7 +360,7 @@ table.table { margin: 0 !important; } -.fucking-opl-shut-up { +.has-centered-items { display: flex; justify-content: center; align-items: center; @@ -399,3 +399,7 @@ table.table { } } } + +.dropdown-content a { + text-decoration: none; +} 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 @@