diff options
| author | Pitu <[email protected]> | 2018-09-17 04:38:25 -0300 |
|---|---|---|
| committer | Pitu <[email protected]> | 2018-09-17 04:38:25 -0300 |
| commit | c2c6e99878853fafdbd5e708c3163921f8529ae1 (patch) | |
| tree | 8313268655c19bc74497172ee1d0642a52e93984 /src/site/components/grid | |
| parent | This route should handle more stuff, so it does now (diff) | |
| download | host.fuwn.me-c2c6e99878853fafdbd5e708c3163921f8529ae1.tar.xz host.fuwn.me-c2c6e99878853fafdbd5e708c3163921f8529ae1.zip | |
Public albums wooo!
Diffstat (limited to 'src/site/components/grid')
| -rw-r--r-- | src/site/components/grid/Grid.vue | 77 |
1 files changed, 47 insertions, 30 deletions
diff --git a/src/site/components/grid/Grid.vue b/src/site/components/grid/Grid.vue index 09922c9..50e626b 100644 --- a/src/site/components/grid/Grid.vue +++ b/src/site/components/grid/Grid.vue @@ -82,36 +82,46 @@ <WaterfallItem v-for="(item, index) in files" v-if="showWaterfall && item.thumb" :key="index" + :width="width" move-class="item-move"> - <img :src="`${item.thumb}`"> - <div :class="{ fixed }" - class="actions"> - <b-tooltip label="Link" - position="is-top"> - <a :href="`${item.url}`" - target="_blank"> - <i class="icon-web-code"/> - </a> - </b-tooltip> - <b-tooltip label="Albums" - position="is-top"> - <a @click="manageAlbums(item)"> - <i class="icon-interface-window"/> - </a> - </b-tooltip> - <b-tooltip label="Tags" - position="is-top"> - <a @click="manageTags(item)"> - <i class="icon-ecommerce-tag-c"/> - </a> - </b-tooltip> - <b-tooltip label="Delete" - position="is-top"> - <a @click="deleteFile(item, index)"> - <i class="icon-editorial-trash-a-l"/> - </a> - </b-tooltip> - </div> + <template v-if="isPublic"> + <a :href="`${item.url}`" + target="_blank"> + <img :src="`${item.thumb}`"> + </a> + </template> + <template v-else> + <img :src="`${item.thumb}`"> + <div v-if="!isPublic" + :class="{ fixed }" + class="actions"> + <b-tooltip label="Link" + position="is-top"> + <a :href="`${item.url}`" + target="_blank"> + <i class="icon-web-code"/> + </a> + </b-tooltip> + <b-tooltip label="Albums" + position="is-top"> + <a @click="manageAlbums(item)"> + <i class="icon-interface-window"/> + </a> + </b-tooltip> + <b-tooltip label="Tags" + position="is-top"> + <a @click="manageTags(item)"> + <i class="icon-ecommerce-tag-c"/> + </a> + </b-tooltip> + <b-tooltip label="Delete" + position="is-top"> + <a @click="deleteFile(item, index)"> + <i class="icon-editorial-trash-a-l"/> + </a> + </b-tooltip> + </div> + </template> </WaterfallItem> </Waterfall> </template> @@ -132,12 +142,19 @@ export default { fixed: { type: Boolean, default: false + }, + isPublic: { + type: Boolean, + default: false + }, + width: { + type: Number, + default: 150 } }, data() { return { showWaterfall: true }; }, - mounted() {}, methods: { deleteFile(file, index) { this.$dialog.confirm({ |