@@ -185,12 +183,10 @@
import { mapState } from 'vuex';
import Waterfall from './waterfall/Waterfall.vue';
-import WaterfallItem from './waterfall/WaterfallItem.vue';
export default {
components: {
Waterfall,
- WaterfallItem,
},
props: {
files: {
@@ -253,13 +249,13 @@ export default {
const data = await this.$search.do(this.searchTerm, ['name', 'original', 'type', 'albums:name']);
console.log('> Search result data', data);
},
- deleteFile(file, index) {
- this.$buefy.dialog.confirm({
+ deleteFile(file) {
+ this.$emit('delete', file);
+ /* this.$buefy.dialog.confirm({
title: 'Deleting file',
message: 'Are you sure you want to
delete this file?',
confirmText: 'Delete File',
type: 'is-danger',
- hasIcon: true,
onConfirm: async () => {
const response = await this.$axios.$delete(`file/${file.id}`);
if (this.showList) {
@@ -274,7 +270,7 @@ export default {
}
return this.$buefy.toast.open(response.message);
},
- });
+ }); */
},
isAlbumSelected(id) {
if (!this.showingModalForFile) return false;
@@ -311,10 +307,6 @@ export default {
const foundIndex = this.hoveredItems.indexOf(id);
if (foundIndex > -1) return;
this.hoveredItems.push(id);
- /// XXX: THIS IS NOT OK!
- this.$nextTick(() => {
- this.$refs.video.forEach((e) => e.play().catch(() => {}));
- });
},
mouseOut(id) {
console.log('out', id);
diff --git a/src/site/components/grid/waterfall/Waterfall.vue b/src/site/components/grid/waterfall/Waterfall.vue
index cccc3ac..a83a275 100644
--- a/src/site/components/grid/waterfall/Waterfall.vue
+++ b/src/site/components/grid/waterfall/Waterfall.vue
@@ -1,14 +1,14 @@
-
-
+
+
+
+
+
+
diff --git a/src/site/components/grid/waterfall/WaterfallItem.vue b/src/site/components/grid/waterfall/WaterfallItem.vue
index 2a5c69a..a49c58c 100644
--- a/src/site/components/grid/waterfall/WaterfallItem.vue
+++ b/src/site/components/grid/waterfall/WaterfallItem.vue
@@ -1,9 +1,3 @@
-
-
@@ -80,3 +74,9 @@ export default {
},
};
+
+
diff --git a/src/site/components/imageInfo/ImageInfo.vue b/src/site/components/imageInfo/ImageInfo.vue
new file mode 100644
index 0000000..e69de29
--
cgit v1.2.3
From 5d61b4d000a114857e4519be25c5834f510d450f Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Tue, 7 Jul 2020 02:50:03 +0300
Subject: feat: refactor waterfall to be more efficient
---
src/site/components/grid/Grid.vue | 5 +
src/site/components/grid/waterfall/Waterfall.vue | 266 ++++++++-------------
.../components/grid/waterfall/WaterfallItem.vue | 72 ------
3 files changed, 99 insertions(+), 244 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index e6a8c64..f98108e 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -25,6 +25,7 @@
v-if="showWaterfall"
:gutterWidth="10"
:gutterHeight="4"
+ :options="{fitWidth: true}"
:itemWidth="width"
:items="gridFiles">
@@ -451,6 +452,10 @@ div.actions {
display: none;
}
+.waterfall {
+ margin: 0 auto;
+}
+
.waterfall-item:hover {
div.actions {
opacity: 1;
diff --git a/src/site/components/grid/waterfall/Waterfall.vue b/src/site/components/grid/waterfall/Waterfall.vue
index a83a275..79a330a 100644
--- a/src/site/components/grid/waterfall/Waterfall.vue
+++ b/src/site/components/grid/waterfall/Waterfall.vue
@@ -1,51 +1,20 @@
-
-
+
+
-
-
diff --git a/src/site/components/grid/waterfall/WaterfallItem.vue b/src/site/components/grid/waterfall/WaterfallItem.vue
index a49c58c..c5cade1 100644
--- a/src/site/components/grid/waterfall/WaterfallItem.vue
+++ b/src/site/components/grid/waterfall/WaterfallItem.vue
@@ -3,80 +3,8 @@
-
-
-
--
cgit v1.2.3
From 1a8b6602e094289a4f477c33e432e0f5e1587b45 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Wed, 8 Jul 2020 03:13:51 +0300
Subject: refactor: change uploader component to use vuex
---
src/site/components/uploader/Uploader.vue | 74 ++++++++++++++++++-------------
1 file changed, 42 insertions(+), 32 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/uploader/Uploader.vue b/src/site/components/uploader/Uploader.vue
index 1b03ff8..c7be372 100644
--- a/src/site/components/uploader/Uploader.vue
+++ b/src/site/components/uploader/Uploader.vue
@@ -1,7 +1,9 @@
-
-
-
-
-
Link
@@ -43,14 +52,16 @@
-
-
-
+
-
-
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 42dcc6b..84c0b11 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -163,7 +163,7 @@
-
+
Search result data', data);
+ console.log('> Search result data', data); // eslint-disable-line no-console
},
deleteFile(file) {
// this.$emit('delete', file);
diff --git a/src/site/components/loading/CubeShadow.vue b/src/site/components/loading/CubeShadow.vue
index af31dac..bbfdb52 100644
--- a/src/site/components/loading/CubeShadow.vue
+++ b/src/site/components/loading/CubeShadow.vue
@@ -1,5 +1,6 @@
-
@@ -8,16 +9,16 @@ export default {
props: {
size: {
type: String,
- default: '60px'
+ default: '60px',
},
background: {
type: String,
- default: '#9C27B0'
+ default: '#9C27B0',
},
duration: {
type: String,
- default: '1.8s'
- }
+ default: '1.8s',
+ },
},
computed: {
styles() {
@@ -25,10 +26,10 @@ export default {
width: this.size,
height: this.size,
backgroundColor: this.background,
- animationDuration: this.duration
+ animationDuration: this.duration,
};
- }
- }
+ },
+ },
};
diff --git a/src/site/components/loading/Origami.vue b/src/site/components/loading/Origami.vue
index d1b523d..cd1c087 100644
--- a/src/site/components/loading/Origami.vue
+++ b/src/site/components/loading/Origami.vue
@@ -1,7 +1,9 @@
-
-
@@ -18,21 +20,21 @@ export default {
props: {
size: {
type: String,
- default: '40px'
- }
+ default: '40px',
+ },
},
computed: {
innerStyles() {
- let size = parseInt(this.size);
+ const size = parseInt(this.size, 10);
return { transform: `scale(${(size / 60)})` };
},
styles() {
return {
width: this.size,
- height: this.size
+ height: this.size,
};
- }
- }
+ },
+ },
};
diff --git a/src/site/components/loading/PingPong.vue b/src/site/components/loading/PingPong.vue
index ac33e28..d562e9f 100644
--- a/src/site/components/loading/PingPong.vue
+++ b/src/site/components/loading/PingPong.vue
@@ -1,12 +1,14 @@
-
@@ -17,22 +19,22 @@ export default {
props: {
size: {
type: String,
- default: '60px'
- }
+ default: '60px',
+ },
},
computed: {
innerStyles() {
- let size = parseInt(this.size);
+ const size = parseInt(this.size, 10);
return { transform: `scale(${size / 250})` };
},
styles() {
return {
width: this.size,
- height: this.size
+ height: this.size,
};
- }
- }
-}
+ },
+ },
+};
diff --git a/src/site/components/imageInfo/ImageInfo.vue b/src/site/components/imageInfo/ImageInfo.vue
deleted file mode 100644
index e69de29..0000000
--
cgit v1.2.3
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 @@
+
@@ -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 @@
@@ -13,6 +13,7 @@
import WaterfallItem from './WaterfallItem.vue';
const isBrowser = typeof window !== 'undefined';
+// eslint-disable-next-line global-require
const Masonry = isBrowser ? window.Masonry || require('masonry-layout') : null;
const imagesloaded = isBrowser ? require('imagesloaded') : null;
diff --git a/src/site/components/image-modal/AlbumInfo.vue b/src/site/components/image-modal/AlbumInfo.vue
new file mode 100644
index 0000000..9d57e55
--- /dev/null
+++ b/src/site/components/image-modal/AlbumInfo.vue
@@ -0,0 +1,73 @@
+
+
+
+ Albums ({{ selectedOptions.length }})
+
+
+
+
+ {{ album. name }}
+
+
+
+
+
diff --git a/src/site/components/image-modal/ImageInfo.vue b/src/site/components/image-modal/ImageInfo.vue
index c9dba1a..c3f0041 100644
--- a/src/site/components/image-modal/ImageInfo.vue
+++ b/src/site/components/image-modal/ImageInfo.vue
@@ -1,10 +1,13 @@
-
-
+
+
+
+
+
-
+
File information
@@ -90,21 +93,16 @@
+
- Albums
+ Tags
+
- Tags
+ Albums
-
-
-
+
@@ -114,17 +112,27 @@
@@ -176,4 +187,18 @@ export default {
.divider:first-child {
margin: 10px 0 25px;
}
+
+.col-vid {
+ width: 100%;
+}
+
+.image-col {
+ align-items: start;
+}
+
+.data-col {
+ @media screen and (min-width: 769px) {
+ padding-right: 1.5rem;
+ }
+}
diff --git a/src/site/components/image-modal/TagInfo.vue b/src/site/components/image-modal/TagInfo.vue
new file mode 100644
index 0000000..2054e6a
--- /dev/null
+++ b/src/site/components/image-modal/TagInfo.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3
From 93478a334b526703797cd3d759a70c18e6c6bb5a Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Tue, 21 Jul 2020 15:45:28 +0300
Subject: fix: make modal use full height on mobile
---
src/site/components/grid/Grid.vue | 14 ++++++++------
src/site/components/image-modal/ImageInfo.vue | 3 +++
2 files changed, 11 insertions(+), 6 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index d29160f..7170709 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -148,12 +148,6 @@
-
- Load more
-
@@ -495,4 +489,12 @@ div.actions {
i.mdi {
font-size: 16px;
}
+
+.imageinfo-modal{
+ ::v-deep .modal-content {
+ @media screen and (max-width: 768px) {
+ min-height: 100vh;
+ }
+ }
+}
diff --git a/src/site/components/image-modal/ImageInfo.vue b/src/site/components/image-modal/ImageInfo.vue
index c3f0041..485a8aa 100644
--- a/src/site/components/image-modal/ImageInfo.vue
+++ b/src/site/components/image-modal/ImageInfo.vue
@@ -200,5 +200,8 @@ export default {
@media screen and (min-width: 769px) {
padding-right: 1.5rem;
}
+ @media screen and (max-width: 769px) {
+ padding-bottom: 3rem;
+ }
}
--
cgit v1.2.3
From 1a4744de3cfe74524cd0415416fa9da0a322e86c Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Wed, 22 Jul 2020 02:12:24 +0300
Subject: feat: show selected albums first when modal is first opened
fix: change the color of the dropdown for tags to match the base theme
chore: pass props into some of the components instead of fetching from store inside of components
---
src/site/components/image-modal/AlbumInfo.vue | 33 +++++++++++++++++++++------
src/site/components/image-modal/ImageInfo.vue | 7 ++++--
src/site/components/image-modal/TagInfo.vue | 12 ++--------
3 files changed, 33 insertions(+), 19 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/image-modal/AlbumInfo.vue b/src/site/components/image-modal/AlbumInfo.vue
index 9d57e55..8974a11 100644
--- a/src/site/components/image-modal/AlbumInfo.vue
+++ b/src/site/components/image-modal/AlbumInfo.vue
@@ -13,12 +13,12 @@
- {{ album. name }}
+ {{ album.name }}
@@ -37,18 +37,37 @@ export default {
type: Array,
default: () => [],
},
+ albums: {
+ type: Array,
+ default: () => [],
+ },
},
data() {
return {
- selectedOptions: this.imageAlbums.map((e) => e.id),
+ selectedOptions: [],
+ orderedAlbums: [],
};
},
- computed: {
- ...mapState({
- albums: (state) => state.albums.tinyDetails,
- }),
+ created() {
+ this.orderedAlbums = this.getOrderedAlbums();
+ // we're sorting here instead of computed because we want sort on creation
+ // then the array's values should be frozen
+ this.selectedOptions = this.imageAlbums.map((e) => e.id);
},
methods: {
+ getOrderedAlbums() {
+ return [...this.albums].sort(
+ (a, b) => {
+ const selectedA = this.imageAlbums.findIndex(({ name }) => name === a.name) !== -1;
+ const selectedB = this.imageAlbums.findIndex(({ name }) => name === b.name) !== -1;
+
+ if (selectedA !== selectedB) {
+ return selectedA ? -1 : 1;
+ }
+ return a.name.localeCompare(b.name);
+ },
+ );
+ },
isAlbumSelected(id) {
if (!this.showingModalForFile) return false;
const found = this.showingModalForFile.albums.find((el) => el.id === id);
diff --git a/src/site/components/image-modal/ImageInfo.vue b/src/site/components/image-modal/ImageInfo.vue
index 485a8aa..0562e1f 100644
--- a/src/site/components/image-modal/ImageInfo.vue
+++ b/src/site/components/image-modal/ImageInfo.vue
@@ -102,7 +102,7 @@
Albums
-
+
@@ -134,7 +134,10 @@ export default {
default: () => ([]),
},
},
- computed: mapState(['images']),
+ computed: mapState({
+ images: (state) => state.images,
+ tinyDetails: (state) => state.albums.tinyDetails,
+ }),
methods: {
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 Bytes';
diff --git a/src/site/components/image-modal/TagInfo.vue b/src/site/components/image-modal/TagInfo.vue
index 2054e6a..a337148 100644
--- a/src/site/components/image-modal/TagInfo.vue
+++ b/src/site/components/image-modal/TagInfo.vue
@@ -88,16 +88,8 @@ export default {
.taginp {
::v-deep .dropdown-content {
- background-color: hsl(0, 0%, 100%);
-
- .dropdown-item {
- color: hsl(0, 0%, 29%);
-
- &:hover {
- color: hsl(0, 0%, 4%);
- background-color: hsl(0, 0%, 90%);
- }
- }
+ background-color: #323846;
+ box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
}
--
cgit v1.2.3
From 01c04298b0fdcd7165f5532de57e407a853c748b Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Wed, 22 Jul 2020 02:12:40 +0300
Subject: fix: add no-active class
---
src/site/components/navbar/Navbar.vue | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'src/site/components')
diff --git a/src/site/components/navbar/Navbar.vue b/src/site/components/navbar/Navbar.vue
index 0f82200..1b1f10e 100644
--- a/src/site/components/navbar/Navbar.vue
+++ b/src/site/components/navbar/Navbar.vue
@@ -137,4 +137,8 @@ export default {
}
}
}
+
+ .no-active {
+ text-decoration: none !important;
+ }
--
cgit v1.2.3
From 279234a081e5ea772978732ae5d2e45d8adcd741 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Wed, 22 Jul 2020 02:14:06 +0300
Subject: feat: add new search input
For now, it clones the autocomplete from buefy, untill a PR or resolution to the opened issue about not being able to manipulate how the suggestions are applied is found
---
src/site/components/search-input/SearchInput.vue | 516 +++++++++++++++++++++++
src/site/components/search/Search.vue | 119 ++++++
2 files changed, 635 insertions(+)
create mode 100644 src/site/components/search-input/SearchInput.vue
create mode 100644 src/site/components/search/Search.vue
(limited to 'src/site/components')
diff --git a/src/site/components/search-input/SearchInput.vue b/src/site/components/search-input/SearchInput.vue
new file mode 100644
index 0000000..abc433a
--- /dev/null
+++ b/src/site/components/search-input/SearchInput.vue
@@ -0,0 +1,516 @@
+
+
+ $emit('icon-click', event)" />
+
+
+
+
+
+
+
+
diff --git a/src/site/components/search/Search.vue b/src/site/components/search/Search.vue
new file mode 100644
index 0000000..57226a9
--- /dev/null
+++ b/src/site/components/search/Search.vue
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+ {{ props.option.name }}:
+
+ {{ props.option.valueFormat }}
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3
From 39e9941ded8de4e41048781daa80de0838c01c19 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Thu, 23 Jul 2020 04:08:31 +0300
Subject: feat: Add hiding to recommendations as a prop
fix: change some of the regexes to remove , and ; as separator support because the query parser doesn't understad them and I don't feel like dealing with all the edge cases introduces by it
---
src/site/components/search/Search.vue | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/search/Search.vue b/src/site/components/search/Search.vue
index 57226a9..72a5707 100644
--- a/src/site/components/search/Search.vue
+++ b/src/site/components/search/Search.vue
@@ -12,7 +12,8 @@
placeholder="Search"
type="search"
open-on-focus
- @typing="handleTyping">
+ @typing="handleTyping"
+ @keydown.native.enter="onSubmit">
{{ props.option.name }}:
@@ -37,6 +38,12 @@ export default {
components: {
SearchInput,
},
+ props: {
+ hiddenHints: {
+ type: Array,
+ default: () => [],
+ },
+ },
data() {
return {
query: '',
@@ -66,11 +73,17 @@ export default {
'valueFormat': 'specific date',
'hint': '',
},
+ {
+ 'name': 'file',
+ 'valueFormat': 'generated name',
+ 'hint': '',
+ },
],
filteredHints: [],
};
},
created() {
+ this.hints = this.hints.filter(({ name }) => this.hiddenHints.indexOf(name) === -1);
this.filteredHints = this.hints; // fixes the issue where on pageload, suggestions wont load
},
methods: {
@@ -83,15 +96,19 @@ export default {
handleTyping(qry) {
qry = qry || '';
// get the last word or group of words
- const lastWord = (qry.match(/("[^"]*")|[^;, ]+/g) || ['']).pop().toLowerCase();
+ let lastWord = (qry.match(/("[^"]*")|[^\s]+/g) || ['']).pop().toLowerCase();
// if there's an open/unbalanced quote, don't autosuggest
if (/^[^"]*("[^"]*"[^"]*)*(")[^"]*$/.test(qry)) { this.filteredHints = []; return; }
// don't autosuggest if we have an open query but no text yet
- if (/:[\s|;|,]?$/gi.test(qry)) { this.filteredHints = []; return; }
+ if (/:\s+$/gi.test(qry)) { this.filteredHints = []; return; }
// if the above query didn't match (all quotes are balanced
// and the previous tag has value
// check if we're about to start a new tag
- if (/[\s|;|,]+$/gi.test(qry)) { this.filteredHints = this.hints; return; }
+ if (/\s+$/gi.test(qry)) { this.filteredHints = this.hints; return; }
+
+ // ignore starting `-` from lastword, because - is used to
+ // exclude something, so -alb should autosuggest album
+ lastWord = lastWord.replace(/^-/, '');
// if we got here, then we handled all special cases
// now take last word, and check if we can autosuggest a tag
@@ -100,11 +117,11 @@ export default {
.toLowerCase()
.indexOf(lastWord) === 0);
},
- sanitizeQuery(qry) {
- // \w+:\s+? to transform 'tag: 123' into 'tag:123'
- },
- onSubmit() {
- this.$emit('search', this.query);
+ onSubmit(event) {
+ if (event.key === 'Enter') {
+ if (/:$/gi.test(this.query)) { return; }
+ }
+ this.$emit('search', this.query, event);
},
},
};
--
cgit v1.2.3
From 151c360740aac5733759888220d91a1d3713b6e1 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Fri, 2 Oct 2020 22:16:34 +0300
Subject: feat: allow administrators to create custom links for albums
---
src/site/components/album/AlbumDetails.vue | 58 +++++++++++++++++++++++++++++-
src/site/components/sidebar/Sidebar.vue | 2 +-
2 files changed, 58 insertions(+), 2 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/album/AlbumDetails.vue b/src/site/components/album/AlbumDetails.vue
index b411f13..ac6eba5 100644
--- a/src/site/components/album/AlbumDetails.vue
+++ b/src/site/components/album/AlbumDetails.vue
@@ -58,7 +58,30 @@
+
+
+
+ Create new link
+
+
+
+
+
+
+
+
+
+ Custom link
+
+
+
+
this.$handler.executeAction('albums/createCustomLink', { albumId, value }),
+ });
+ },
isDeleting(identifier) {
return this.isDeletingLinks.indexOf(identifier) > -1;
},
@@ -182,6 +217,11 @@ export default {
diff --git a/src/site/components/sidebar/Sidebar.vue b/src/site/components/sidebar/Sidebar.vue
index d586122..2e8ca9e 100644
--- a/src/site/components/sidebar/Sidebar.vue
+++ b/src/site/components/sidebar/Sidebar.vue
@@ -22,7 +22,7 @@
tag="nuxt-link"
to="/dashboard/tags"
exact />
-
+
Administration
--
cgit v1.2.3
From 4a3fef2b9931266d40c1d9e88748fd2aa623dc79 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Thu, 12 Nov 2020 22:58:34 +0200
Subject: chore: update buefy to 0.9
---
src/site/components/album/AlbumDetails.vue | 77 ++++++++++++++++--------------
src/site/components/grid/Grid.vue | 77 ++++++++++++++----------------
2 files changed, 77 insertions(+), 77 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/album/AlbumDetails.vue b/src/site/components/album/AlbumDetails.vue
index ac6eba5..2d0bb5d 100644
--- a/src/site/components/album/AlbumDetails.vue
+++ b/src/site/components/album/AlbumDetails.vue
@@ -5,46 +5,49 @@
-
-
-
- {{ props.row.identifier }}
-
-
+
+
+ {{ props.row.identifier }}
+
+
-
- {{ props.row.views }}
-
+
+ {{ props.row.views }}
+
-
-
-
+
+
+
+
+
+
+ Delete link
+
+
-
-
- Delete link
-
-
-
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 7170709..1fa3167 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -92,48 +92,45 @@
-
-
-
- {{ props.row.url }}
-
-
-
-
-
- {{ album.name }}
-
-
- ,
-
-
+
+ {{ props.row.url }}
+
+
+
+
+
+ {{ album.name }}
+
+
+ ,
+
+
- {{ props.row.username }}
-
+ {{ props.row.username }}
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -226,7 +223,7 @@ export default {
return require('@/assets/images/blank.png');
},
gridFiles() {
- return this.files;
+ return (this.files || []).filter((v) => !v.hideFromList);
},
},
created() {
--
cgit v1.2.3
From 90001c2df56d58e69fd199a518ae7f3e4ed327fc Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Thu, 24 Dec 2020 10:40:50 +0200
Subject: chore: remove trailing commas
---
src/site/components/album/AlbumDetails.vue | 22 ++++++-------
src/site/components/album/AlbumEntry.vue | 14 ++++-----
src/site/components/footer/Footer.vue | 8 ++---
src/site/components/grid/Grid.vue | 36 +++++++++++-----------
src/site/components/grid/waterfall/Waterfall.vue | 26 ++++++++--------
.../components/grid/waterfall/WaterfallItem.vue | 2 +-
src/site/components/home/links/Links.vue | 29 ++++++++++++-----
src/site/components/image-modal/AlbumInfo.vue | 20 ++++++------
src/site/components/image-modal/ImageInfo.vue | 16 +++++-----
src/site/components/image-modal/TagInfo.vue | 16 +++++-----
src/site/components/loading/CubeShadow.vue | 14 ++++-----
src/site/components/loading/Origami.vue | 10 +++---
src/site/components/loading/PingPong.vue | 10 +++---
src/site/components/loading/RotateSquare.vue | 10 +++---
src/site/components/navbar/Navbar.vue | 10 +++---
src/site/components/search-input/SearchInput.vue | 22 ++++++-------
src/site/components/search/Search.vue | 26 ++++++++--------
src/site/components/sidebar/Sidebar.vue | 6 ++--
src/site/components/uploader/Uploader.vue | 22 ++++++-------
19 files changed, 166 insertions(+), 153 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/album/AlbumDetails.vue b/src/site/components/album/AlbumDetails.vue
index 2d0bb5d..4067853 100644
--- a/src/site/components/album/AlbumDetails.vue
+++ b/src/site/components/album/AlbumDetails.vue
@@ -120,17 +120,17 @@ export default {
props: {
albumId: {
type: Number,
- default: 0,
+ default: 0
},
details: {
type: Object,
- default: () => ({}),
- },
+ default: () => ({})
+ }
},
data() {
return {
isCreatingLink: false,
- isDeletingLinks: [],
+ isDeletingLinks: []
};
},
computed: mapState(['config', 'auth']),
@@ -141,20 +141,20 @@ export default {
updateLinkOptionsAction: 'albums/updateLinkOptions',
createLinkAction: 'albums/createLink',
createCustomLinkAction: 'albums/createCustomLink',
- alert: 'alert/set',
+ alert: 'alert/set'
}),
promptDeleteAlbum(id) {
this.$buefy.dialog.confirm({
type: 'is-danger',
message: 'Are you sure you want to delete this album?',
- onConfirm: () => this.deleteAlbum(id),
+ onConfirm: () => this.deleteAlbum(id)
});
},
promptDeleteAlbumLink(albumId, identifier) {
this.$buefy.dialog.confirm({
type: 'is-danger',
message: 'Are you sure you want to delete this album link?',
- onConfirm: () => this.deleteAlbumLink(albumId, identifier),
+ onConfirm: () => this.deleteAlbumLink(albumId, identifier)
});
},
async deleteAlbum(id) {
@@ -204,16 +204,16 @@ export default {
message: 'Custom link identifier',
inputAttrs: {
placeholder: '',
- maxlength: 10,
+ maxlength: 10
},
trapFocus: true,
- onConfirm: (value) => this.$handler.executeAction('albums/createCustomLink', { albumId, value }),
+ onConfirm: (value) => this.$handler.executeAction('albums/createCustomLink', { albumId, value })
});
},
isDeleting(identifier) {
return this.isDeletingLinks.indexOf(identifier) > -1;
- },
- },
+ }
+ }
};
diff --git a/src/site/components/album/AlbumEntry.vue b/src/site/components/album/AlbumEntry.vue
index 2723b49..1e1b2cf 100644
--- a/src/site/components/album/AlbumEntry.vue
+++ b/src/site/components/album/AlbumEntry.vue
@@ -63,22 +63,22 @@ import AlbumDetails from '~/components/album/AlbumDetails.vue';
export default {
components: {
- AlbumDetails,
+ AlbumDetails
},
props: {
album: {
type: Object,
- default: () => ({}),
- },
+ default: () => ({})
+ }
},
computed: {
...mapGetters({
isExpandedGetter: 'albums/isExpanded',
- getDetails: 'albums/getDetails',
+ getDetails: 'albums/getDetails'
}),
isExpanded() {
return this.isExpandedGetter(this.album.id);
- },
+ }
},
methods: {
async toggleDetails(album) {
@@ -86,8 +86,8 @@ export default {
await this.$store.dispatch('albums/fetchDetails', album.id);
}
this.$store.commit('albums/toggleExpandedState', album.id);
- },
- },
+ }
+ }
};
diff --git a/src/site/components/footer/Footer.vue b/src/site/components/footer/Footer.vue
index 19d18f2..b409cf5 100644
--- a/src/site/components/footer/Footer.vue
+++ b/src/site/components/footer/Footer.vue
@@ -81,8 +81,8 @@ export default {
...mapState({
version: (state) => state.config.version,
serviceName: (state) => state.config.serviceName,
- token: (state) => state.auth.token,
- }),
+ token: (state) => state.auth.token
+ })
},
methods: {
createShareXThing() {
@@ -102,8 +102,8 @@ export default {
}`;
const sharexBlob = new Blob([sharexFile], { type: 'application/octet-binary' });
saveAs(sharexBlob, `${location.hostname}.sxcu`);
- },
- },
+ }
+ }
};
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue
index 1fa3167..3a15335 100644
--- a/src/site/components/grid/Grid.vue
+++ b/src/site/components/grid/Grid.vue
@@ -162,37 +162,37 @@ import ImageInfo from '~/components/image-modal/ImageInfo.vue';
export default {
components: {
Waterfall,
- ImageInfo,
+ ImageInfo
},
props: {
files: {
type: Array,
- default: () => [],
+ default: () => []
},
total: {
type: Number,
- default: 0,
+ default: 0
},
fixed: {
type: Boolean,
- default: false,
+ default: false
},
isPublic: {
type: Boolean,
- default: false,
+ default: false
},
width: {
type: Number,
- default: 150,
+ default: 150
},
enableSearch: {
type: Boolean,
- default: true,
+ default: true
},
enableToolbar: {
type: Boolean,
- default: true,
- },
+ default: true
+ }
},
data() {
return {
@@ -208,15 +208,15 @@ export default {
modalData: {
file: null,
tags: null,
- albums: null,
- },
+ albums: null
+ }
};
},
computed: {
...mapState({
user: (state) => state.auth.user,
albums: (state) => state.albums.tinyDetails,
- images: (state) => state.images,
+ images: (state) => state.images
}),
blank() {
// eslint-disable-next-line global-require, import/no-unresolved
@@ -224,7 +224,7 @@ export default {
},
gridFiles() {
return (this.files || []).filter((v) => !v.hideFromList);
- },
+ }
},
created() {
// TODO: Create a middleware for this
@@ -251,7 +251,7 @@ export default {
} catch (e) {
this.$store.dispatch('alert/set', { text: e.message, error: true }, { root: true });
}
- },
+ }
});
},
isAlbumSelected(id) {
@@ -279,12 +279,12 @@ export default {
if (add) {
response = await this.$store.dispatch('images/addToAlbum', {
albumId: id,
- fileId: this.showingModalForFile.id,
+ fileId: this.showingModalForFile.id
});
} else {
response = await this.$store.dispatch('images/removeFromAlbum', {
albumId: id,
- fileId: this.showingModalForFile.id,
+ fileId: this.showingModalForFile.id
});
}
@@ -332,8 +332,8 @@ export default {
},
isHovered(id) {
return this.hoveredItems.includes(id);
- },
- },
+ }
+ }
};
diff --git a/src/site/components/grid/waterfall/Waterfall.vue b/src/site/components/grid/waterfall/Waterfall.vue
index 762cbbd..af2af3f 100644
--- a/src/site/components/grid/waterfall/Waterfall.vue
+++ b/src/site/components/grid/waterfall/Waterfall.vue
@@ -20,29 +20,29 @@ const imagesloaded = isBrowser ? require('imagesloaded') : null;
export default {
name: 'Waterfall',
components: {
- WaterfallItem,
+ WaterfallItem
},
props: {
options: {
type: Object,
- default: () => {},
+ default: () => {}
},
items: {
type: Array,
- default: () => [],
+ default: () => []
},
itemWidth: {
type: Number,
- default: 150,
+ default: 150
},
gutterWidth: {
type: Number,
- default: 10,
+ default: 10
},
gutterHeight: {
type: Number,
- default: 4,
- },
+ default: 4
+ }
},
mounted() {
this.initializeMasonry();
@@ -62,7 +62,7 @@ export default {
node,
() => {
this.masonry.layout();
- },
+ }
);
},
performLayout() {
@@ -101,7 +101,7 @@ export default {
removed,
appended,
prepended,
- moved,
+ moved
};
},
initializeMasonry() {
@@ -111,8 +111,8 @@ export default {
{
columnWidth: this.itemWidth,
gutter: this.gutterWidth,
- ...this.options,
- },
+ ...this.options
+ }
);
this.domChildren = this.getNewDomChildren();
}
@@ -122,8 +122,8 @@ export default {
const children = this.options && this.options.itemSelector
? node.querySelectorAll(this.options.itemSelector) : node.children;
return Array.prototype.slice.call(children);
- },
- },
+ }
+ }
};
diff --git a/src/site/components/grid/waterfall/WaterfallItem.vue b/src/site/components/grid/waterfall/WaterfallItem.vue
index c5cade1..2a18606 100644
--- a/src/site/components/grid/waterfall/WaterfallItem.vue
+++ b/src/site/components/grid/waterfall/WaterfallItem.vue
@@ -5,6 +5,6 @@
diff --git a/src/site/components/home/links/Links.vue b/src/site/components/home/links/Links.vue
index 41bd271..b20649f 100644
--- a/src/site/components/home/links/Links.vue
+++ b/src/site/components/home/links/Links.vue
@@ -1,6 +1,7 @@
diff --git a/src/site/components/image-modal/ImageInfo.vue b/src/site/components/image-modal/ImageInfo.vue
index 0562e1f..73b6339 100644
--- a/src/site/components/image-modal/ImageInfo.vue
+++ b/src/site/components/image-modal/ImageInfo.vue
@@ -118,25 +118,25 @@ import Taginfo from './TagInfo.vue';
export default {
components: {
Taginfo,
- Albuminfo,
+ Albuminfo
},
props: {
file: {
type: Object,
- default: () => ({}),
+ default: () => ({})
},
albums: {
type: Array,
- default: () => ([]),
+ default: () => ([])
},
tags: {
type: Array,
- default: () => ([]),
- },
+ default: () => ([])
+ }
},
computed: mapState({
images: (state) => state.images,
- tinyDetails: (state) => state.albums.tinyDetails,
+ tinyDetails: (state) => state.albums.tinyDetails
}),
methods: {
formatBytes(bytes, decimals = 2) {
@@ -152,8 +152,8 @@ export default {
},
isVideo(type) {
return type.startsWith('video');
- },
- },
+ }
+ }
};
diff --git a/src/site/components/image-modal/TagInfo.vue b/src/site/components/image-modal/TagInfo.vue
index a337148..59d01f5 100644
--- a/src/site/components/image-modal/TagInfo.vue
+++ b/src/site/components/image-modal/TagInfo.vue
@@ -23,24 +23,24 @@ export default {
props: {
imageId: {
type: Number,
- default: 0,
+ default: 0
},
imageTags: {
type: Array,
- default: () => [],
- },
+ default: () => []
+ }
},
data() {
return {
- filteredTags: [],
+ filteredTags: []
};
},
computed: {
...mapState({
- tags: (state) => state.tags.tagsList,
+ tags: (state) => state.tags.tagsList
}),
selectedTags() { return this.imageTags.map((e) => e.name); },
- lowercaseTags() { return this.imageTags.map((e) => e.name.toLowerCase()); },
+ lowercaseTags() { return this.imageTags.map((e) => e.name.toLowerCase()); }
},
methods: {
getFilteredTags(str) {
@@ -78,8 +78,8 @@ export default {
},
tagRemoved(tag) {
this.$handler.executeAction('images/removeTag', { fileId: this.imageId, tagName: tag });
- },
- },
+ }
+ }
};
diff --git a/src/site/components/loading/CubeShadow.vue b/src/site/components/loading/CubeShadow.vue
index bbfdb52..71b5da5 100644
--- a/src/site/components/loading/CubeShadow.vue
+++ b/src/site/components/loading/CubeShadow.vue
@@ -9,16 +9,16 @@ export default {
props: {
size: {
type: String,
- default: '60px',
+ default: '60px'
},
background: {
type: String,
- default: '#9C27B0',
+ default: '#9C27B0'
},
duration: {
type: String,
- default: '1.8s',
- },
+ default: '1.8s'
+ }
},
computed: {
styles() {
@@ -26,10 +26,10 @@ export default {
width: this.size,
height: this.size,
backgroundColor: this.background,
- animationDuration: this.duration,
+ animationDuration: this.duration
};
- },
- },
+ }
+ }
};
diff --git a/src/site/components/loading/Origami.vue b/src/site/components/loading/Origami.vue
index cd1c087..59c5d8f 100644
--- a/src/site/components/loading/Origami.vue
+++ b/src/site/components/loading/Origami.vue
@@ -20,8 +20,8 @@ export default {
props: {
size: {
type: String,
- default: '40px',
- },
+ default: '40px'
+ }
},
computed: {
innerStyles() {
@@ -31,10 +31,10 @@ export default {
styles() {
return {
width: this.size,
- height: this.size,
+ height: this.size
};
- },
- },
+ }
+ }
};
diff --git a/src/site/components/loading/PingPong.vue b/src/site/components/loading/PingPong.vue
index d562e9f..c04ae72 100644
--- a/src/site/components/loading/PingPong.vue
+++ b/src/site/components/loading/PingPong.vue
@@ -19,8 +19,8 @@ export default {
props: {
size: {
type: String,
- default: '60px',
- },
+ default: '60px'
+ }
},
computed: {
innerStyles() {
@@ -30,10 +30,10 @@ export default {
styles() {
return {
width: this.size,
- height: this.size,
+ height: this.size
};
- },
- },
+ }
+ }
};
diff --git a/src/site/components/loading/RotateSquare.vue b/src/site/components/loading/RotateSquare.vue
index 089e01a..7bc9bb0 100644
--- a/src/site/components/loading/RotateSquare.vue
+++ b/src/site/components/loading/RotateSquare.vue
@@ -9,18 +9,18 @@ export default {
props: {
size: {
type: String,
- default: '40px',
- },
+ default: '40px'
+ }
},
computed: {
styles() {
return {
width: this.size,
height: this.size,
- display: 'inline-block',
+ display: 'inline-block'
};
- },
- },
+ }
+ }
};
diff --git a/src/site/components/navbar/Navbar.vue b/src/site/components/navbar/Navbar.vue
index 1b1f10e..22d41d4 100644
--- a/src/site/components/navbar/Navbar.vue
+++ b/src/site/components/navbar/Navbar.vue
@@ -73,22 +73,22 @@ export default {
props: {
isWhite: {
type: Boolean,
- default: false,
- },
+ default: false
+ }
},
data() {
return { hamburger: false };
},
computed: {
...mapGetters({ loggedIn: 'auth/isLoggedIn' }),
- ...mapState(['config']),
+ ...mapState(['config'])
},
methods: {
async logOut() {
await this.$store.dispatch('auth/logout');
this.$router.replace('/login');
- },
- },
+ }
+ }
};
diff --git a/src/site/components/search-input/SearchInput.vue b/src/site/components/search-input/SearchInput.vue
index abc433a..1c5b983 100644
--- a/src/site/components/search-input/SearchInput.vue
+++ b/src/site/components/search-input/SearchInput.vue
@@ -90,11 +90,11 @@ export default {
value: [Number, String],
data: {
type: Array,
- default: () => [],
+ default: () => []
},
field: {
type: String,
- default: 'value',
+ default: 'value'
},
keepFirst: Boolean,
clearOnSelect: Boolean,
@@ -106,12 +106,12 @@ export default {
maxHeight: [String, Number],
dropdownPosition: {
type: String,
- default: 'auto',
+ default: 'auto'
},
iconRight: String,
iconRightClickable: Boolean,
appendToBody: Boolean,
- customSelector: Function,
+ customSelector: Function
},
data() {
return {
@@ -125,7 +125,7 @@ export default {
style: {},
_isAutocomplete: true,
_elementRef: 'input',
- _bodyEl: undefined, // Used to append to body
+ _bodyEl: undefined // Used to append to body
};
},
computed: {
@@ -202,9 +202,9 @@ export default {
// eslint-disable-next-line no-nested-ternary
maxHeight: this.maxHeight === undefined
// eslint-disable-next-line no-restricted-globals
- ? null : (isNaN(this.maxHeight) ? this.maxHeight : `${this.maxHeight}px`),
+ ? null : (isNaN(this.maxHeight) ? this.maxHeight : `${this.maxHeight}px`)
};
- },
+ }
},
watch: {
/**
@@ -258,7 +258,7 @@ export default {
if (this.keepFirst) {
this.selectFirstOption(value);
}
- },
+ }
},
created() {
if (typeof window !== 'undefined') {
@@ -507,10 +507,10 @@ export default {
left: `${left}px`,
width: `${trigger.clientWidth}px`,
maxWidth: `${trigger.clientWidth}px`,
- zIndex: '99',
+ zIndex: '99'
};
}
- },
- },
+ }
+ }
};
diff --git a/src/site/components/search/Search.vue b/src/site/components/search/Search.vue
index 72a5707..778474c 100644
--- a/src/site/components/search/Search.vue
+++ b/src/site/components/search/Search.vue
@@ -36,13 +36,13 @@ import SearchInput from '~/components/search-input/SearchInput.vue';
export default {
components: {
- SearchInput,
+ SearchInput
},
props: {
hiddenHints: {
type: Array,
- default: () => [],
- },
+ default: () => []
+ }
},
data() {
return {
@@ -51,35 +51,35 @@ export default {
{
'name': 'tag',
'valueFormat': 'name',
- 'hint': '',
+ 'hint': ''
},
{
'name': 'album',
'valueFormat': 'name',
- 'hint': '',
+ 'hint': ''
},
{
'name': 'before',
'valueFormat': 'specific date',
- 'hint': '',
+ 'hint': ''
},
{
'name': 'during',
'valueFormat': 'specific date',
- 'hint': '',
+ 'hint': ''
},
{
'name': 'after',
'valueFormat': 'specific date',
- 'hint': '',
+ 'hint': ''
},
{
'name': 'file',
'valueFormat': 'generated name',
- 'hint': '',
- },
+ 'hint': ''
+ }
],
- filteredHints: [],
+ filteredHints: []
};
},
created() {
@@ -122,8 +122,8 @@ export default {
if (/:$/gi.test(this.query)) { return; }
}
this.$emit('search', this.query, event);
- },
- },
+ }
+ }
};
diff --git a/src/site/components/sidebar/Sidebar.vue b/src/site/components/sidebar/Sidebar.vue
index 2e8ca9e..e0c8fa2 100644
--- a/src/site/components/sidebar/Sidebar.vue
+++ b/src/site/components/sidebar/Sidebar.vue
@@ -48,7 +48,7 @@ import { mapState } from 'vuex';
export default {
computed: mapState({
- user: (state) => state.auth.user,
+ user: (state) => state.auth.user
}),
methods: {
isRouteActive(id) {
@@ -56,8 +56,8 @@ export default {
return true;
}
return false;
- },
- },
+ }
+ }
};
diff --git a/src/site/components/uploader/Uploader.vue b/src/site/components/uploader/Uploader.vue
index 7e2d446..2740bee 100644
--- a/src/site/components/uploader/Uploader.vue
+++ b/src/site/components/uploader/Uploader.vue
@@ -88,15 +88,15 @@ export default {
files: [],
dropzoneOptions: {},
showDropzone: false,
- selectedAlbum: null,
+ selectedAlbum: null
};
},
computed: {
...mapState({
config: (state) => state.config,
- albums: (state) => state.albums.tinyDetails,
+ albums: (state) => state.albums.tinyDetails
}),
- ...mapGetters({ loggedIn: 'auth/isLoggedIn', token: 'auth/getToken' }),
+ ...mapGetters({ loggedIn: 'auth/isLoggedIn', token: 'auth/getToken' })
},
watch: {
loggedIn() {
@@ -104,7 +104,7 @@ export default {
},
selectedAlbum() {
this.updateDropzoneConfig();
- },
+ }
},
mounted() {
this.dropzoneOptions = {
@@ -127,7 +127,7 @@ export default {
maxFilesize: this.config.maxFileSize,
previewTemplate: this.$refs.template.innerHTML,
dictDefaultMessage: 'Drag & Drop your files or click to browse',
- headers: { Accept: 'application/vnd.lolisafe.json' },
+ headers: { Accept: 'application/vnd.lolisafe.json' }
};
this.showDropzone = true;
if (this.loggedIn) this.getAlbums();
@@ -154,7 +154,7 @@ export default {
this.$refs.el.setOption('headers', {
Accept: 'application/vnd.lolisafe.json',
Authorization: this.token ? `Bearer ${this.token}` : '',
- albumId: this.selectedAlbum ? this.selectedAlbum : null,
+ albumId: this.selectedAlbum ? this.selectedAlbum : null
});
},
@@ -170,7 +170,7 @@ export default {
dropzoneError(file, message, xhr) {
this.$store.dispatch('alert', {
text: 'There was an error uploading this file. Check the console.',
- error: true,
+ error: true
});
// eslint-disable-next-line no-console
console.error(file, message, xhr);
@@ -182,8 +182,8 @@ export default {
original: file.name,
size: file.size,
type: file.type,
- count: file.upload.totalChunkCount,
- }],
+ count: file.upload.totalChunkCount
+ }]
});
this.processResult(file, data);
@@ -205,8 +205,8 @@ export default {
this.$clipboard(response.url);
});
*/
- },
- },
+ }
+ }
};
diff --git a/src/site/components/image-modal/AlbumInfo.vue b/src/site/components/image-modal/AlbumInfo.vue
index 17c375a..8aeb02e 100644
--- a/src/site/components/image-modal/AlbumInfo.vue
+++ b/src/site/components/image-modal/AlbumInfo.vue
@@ -24,22 +24,20 @@
diff --git a/src/site/components/navbar/Navbar.vue b/src/site/components/navbar/Navbar.vue
index c0b8668..65db69f 100644
--- a/src/site/components/navbar/Navbar.vue
+++ b/src/site/components/navbar/Navbar.vue
@@ -11,14 +11,6 @@
Home
-
-
- Docs
-
-
Date: Fri, 25 Dec 2020 20:45:22 +0900
Subject: Rebrand
---
src/site/components/footer/Footer.vue | 6 ++--
src/site/components/home/links/Links.vue | 6 ++--
src/site/components/image-modal/ImageInfo.vue | 42 +++++++++++++--------------
src/site/components/image-modal/TagInfo.vue | 2 +-
src/site/components/search/Search.vue | 4 +--
src/site/components/uploader/Uploader.vue | 4 +--
6 files changed, 32 insertions(+), 32 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/footer/Footer.vue b/src/site/components/footer/Footer.vue
index 3e7fda3..7d65505 100644
--- a/src/site/components/footer/Footer.vue
+++ b/src/site/components/footer/Footer.vue
@@ -3,7 +3,7 @@
@@ -55,7 +55,7 @@ export default {
"FileFormName": "files[]",
"Headers": {
"authorization": "Bearer ${this.token}",
- "accept": "application/vnd.lolisafe.json"
+ "accept": "application/vnd.chibisafe.json"
},
"ResponseType": "Text",
"URL": "$json:url$",
diff --git a/src/site/components/home/links/Links.vue b/src/site/components/home/links/Links.vue
index 7be76f2..05915b9 100644
--- a/src/site/components/home/links/Links.vue
+++ b/src/site/components/home/links/Links.vue
@@ -1,12 +1,12 @@
-
+
@@ -9,14 +9,14 @@
-
+
File information
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ file.id }}
@@ -24,8 +24,8 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ file.name }}
@@ -34,8 +34,8 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ file.original }}
@@ -44,8 +44,8 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ file.ip }}
@@ -54,8 +54,8 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ formatBytes(file.size) }}
@@ -77,8 +77,8 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
{{ file.hash }}
@@ -87,19 +87,19 @@
+ type="is-chibisafe"
+ class="chibisafe-on-border">
-
+
Tags
-
+
Albums
@@ -167,7 +167,7 @@ export default {
.fake-input {
font-size: 1rem !important;
height: 2.5rem;
- border-color: #323846; /* $lolisafe */
+ border-color: #323846; /* $chibisafe */
max-width: 100%;
width: 100%;
border-radius: 4px;
diff --git a/src/site/components/image-modal/TagInfo.vue b/src/site/components/image-modal/TagInfo.vue
index 756a32d..fb65343 100644
--- a/src/site/components/image-modal/TagInfo.vue
+++ b/src/site/components/image-modal/TagInfo.vue
@@ -3,7 +3,7 @@
-
+
Search
diff --git a/src/site/components/uploader/Uploader.vue b/src/site/components/uploader/Uploader.vue
index 6d17e4a..70acf91 100644
--- a/src/site/components/uploader/Uploader.vue
+++ b/src/site/components/uploader/Uploader.vue
@@ -127,7 +127,7 @@ export default {
maxFilesize: this.config.maxFileSize,
previewTemplate: this.$refs.template.innerHTML,
dictDefaultMessage: 'Drag & Drop your files or click to browse',
- headers: { Accept: 'application/vnd.lolisafe.json' }
+ headers: { Accept: 'application/vnd.chibisafe.json' }
};
this.showDropzone = true;
if (this.loggedIn) this.getAlbums();
@@ -152,7 +152,7 @@ export default {
*/
updateDropzoneConfig() {
this.$refs.el.setOption('headers', {
- Accept: 'application/vnd.lolisafe.json',
+ Accept: 'application/vnd.chibisafe.json',
Authorization: this.token ? `Bearer ${this.token}` : '',
albumId: this.selectedAlbum ? this.selectedAlbum : null
});
--
cgit v1.2.3
From e97fee48441717f3b508ac855339d0fb8210be53 Mon Sep 17 00:00:00 2001
From: Pitu
Date: Sun, 27 Dec 2020 04:27:56 +0900
Subject: Fixes chunked uploads not being saved to albums or thumbnails
---
src/site/components/uploader/Uploader.vue | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'src/site/components')
diff --git a/src/site/components/uploader/Uploader.vue b/src/site/components/uploader/Uploader.vue
index 70acf91..f180546 100644
--- a/src/site/components/uploader/Uploader.vue
+++ b/src/site/components/uploader/Uploader.vue
@@ -184,6 +184,10 @@ export default {
type: file.type,
count: file.upload.totalChunkCount
}]
+ }, {
+ headers: {
+ albumId: this.selectedAlbum ? this.selectedAlbum : null
+ }
});
this.processResult(file, data);
--
cgit v1.2.3
From 24edf8f4fde96500e9cb23806f4826904144ebc8 Mon Sep 17 00:00:00 2001
From: Pitu
Date: Sun, 27 Dec 2020 20:17:28 +0900
Subject: fix: mobile styling
---
src/site/components/footer/Footer.vue | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/footer/Footer.vue b/src/site/components/footer/Footer.vue
index 7d65505..38e3f07 100644
--- a/src/site/components/footer/Footer.vue
+++ b/src/site/components/footer/Footer.vue
@@ -83,9 +83,10 @@ export default {
.container {
.column {
- margin-right: 2rem;
- &.bottom-up {
- @media screen and (min-width: 1025px) {
+ text-align: center;
+ @media screen and (min-width: 1025px) {
+ margin-right: 2rem;
+ &.bottom-up {
display: flex;
flex-direction: column;
justify-content: flex-end;
--
cgit v1.2.3
From edb3bed98864e34695a5ae0093c414a2b578073a Mon Sep 17 00:00:00 2001
From: Pitu
Date: Mon, 28 Dec 2020 00:10:59 +0900
Subject: feat: Add warning to nsfw albums
---
src/site/components/album/AlbumDetails.vue | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
(limited to 'src/site/components')
diff --git a/src/site/components/album/AlbumDetails.vue b/src/site/components/album/AlbumDetails.vue
index ef07670..10925df 100644
--- a/src/site/components/album/AlbumDetails.vue
+++ b/src/site/components/album/AlbumDetails.vue
@@ -98,6 +98,13 @@
+
+
+
a.id === this.albumId).nsfw;
+ }
+ },
+ mounted() {
+ console.log(this.isNsfw);
+ },
methods: {
...mapActions({
deleteAlbumAction: 'albums/deleteAlbum',
@@ -141,6 +156,7 @@ export default {
updateLinkOptionsAction: 'albums/updateLinkOptions',
createLinkAction: 'albums/createLink',
createCustomLinkAction: 'albums/createCustomLink',
+ toggleNsfw: 'albums/toggleNsfw',
alert: 'alert/set'
}),
promptDeleteAlbum(id) {
@@ -199,6 +215,17 @@ export default {
this.alert({ text: e.message, error: true });
}
},
+ async toggleNsfw() {
+ try {
+ const response = await this.toggleNsfw({
+ albumId: this.albumId,
+ nsfw: !this.isNsfw
+ });
+ this.alert({ text: response.message, error: false });
+ } catch (e) {
+ this.alert({ text: e.message, error: true });
+ }
+ },
async createCustomLink(albumId) {
this.$buefy.dialog.prompt({
message: 'Custom link identifier',
--
cgit v1.2.3
From 13058d99d658c0920ce75b79d6b24df18a873ea9 Mon Sep 17 00:00:00 2001
From: Zephyrrus
Date: Sun, 27 Dec 2020 18:18:06 +0200
Subject: fix: nsfw album toggle doesn't propagate the changes properly fix:
add nsfw flag to the booleanFields in knex postProcessResponse
---
src/site/components/album/AlbumDetails.vue | 19 +++++++++----------
src/site/components/album/AlbumEntry.vue | 3 ++-
2 files changed, 11 insertions(+), 11 deletions(-)
(limited to 'src/site/components')
diff --git a/src/site/components/album/AlbumDetails.vue b/src/site/components/album/AlbumDetails.vue
index 10925df..81819b2 100644
--- a/src/site/components/album/AlbumDetails.vue
+++ b/src/site/components/album/AlbumDetails.vue
@@ -100,9 +100,7 @@
@@ -132,6 +130,10 @@ export default {
details: {
'type': Object,
'default': () => ({})
+ },
+ nsfw: {
+ 'type': Boolean,
+ 'default': false
}
},
data() {
@@ -141,10 +143,7 @@ export default {
};
},
computed: {
- ...mapState(['config', 'auth']),
- isNsfw() {
- return this.$store.state.albums.list.find(a => a.id === this.albumId).nsfw;
- }
+ ...mapState(['config', 'auth'])
},
mounted() {
console.log(this.isNsfw);
@@ -156,7 +155,7 @@ export default {
updateLinkOptionsAction: 'albums/updateLinkOptions',
createLinkAction: 'albums/createLink',
createCustomLinkAction: 'albums/createCustomLink',
- toggleNsfw: 'albums/toggleNsfw',
+ toggleNsfwAction: 'albums/toggleNsfw',
alert: 'alert/set'
}),
promptDeleteAlbum(id) {
@@ -217,9 +216,9 @@ export default {
},
async toggleNsfw() {
try {
- const response = await this.toggleNsfw({
+ const response = await this.toggleNsfwAction({
albumId: this.albumId,
- nsfw: !this.isNsfw
+ nsfw: !this.nsfw
});
this.alert({ text: response.message, error: false });
} catch (e) {
diff --git a/src/site/components/album/AlbumEntry.vue b/src/site/components/album/AlbumEntry.vue
index b8a5cb2..8947fa5 100644
--- a/src/site/components/album/AlbumEntry.vue
+++ b/src/site/components/album/AlbumEntry.vue
@@ -53,7 +53,8 @@
+ :album-id="album.id"
+ :nsfw="album.nsfw" />
--
cgit v1.2.3
From b77c0a57cc089a554ee874ae9ff5ff53e6b5eb99 Mon Sep 17 00:00:00 2001
From: Pitu
Date: Mon, 4 Jan 2021 00:48:34 +0900
Subject: feat: add testing capabilities
---
src/site/components/footer/Footer.test.js | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 src/site/components/footer/Footer.test.js
(limited to 'src/site/components')
diff --git a/src/site/components/footer/Footer.test.js b/src/site/components/footer/Footer.test.js
new file mode 100644
index 0000000..379f939
--- /dev/null
+++ b/src/site/components/footer/Footer.test.js
@@ -0,0 +1,25 @@
+/* eslint-disable no-undef */
+import { shallowMount, createLocalVue } from '@vue/test-utils';
+import Component from './Footer.vue';
+import Vuex from 'vuex';
+
+const localVue = createLocalVue();
+localVue.use(Vuex);
+
+describe('Footer.vue', () => {
+ const store = new Vuex.Store({
+ getters: {
+ 'auth/isLoggedIn': () => false
+ },
+ state: {
+ config: {}
+ }
+ });
+
+ it('Should render chibisafe as the instance title', () => {
+ const wrapper = shallowMount(Component, { store, localVue });
+
+ const title = wrapper.find('h4');
+ expect(title.text()).toBe('chibisafe');
+ });
+});
--
cgit v1.2.3