finish share menu
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij
2023-02-15 23:36:37 +01:00
parent daa2d339ce
commit 81b062ca0e
9 changed files with 92 additions and 64 deletions

View File

@@ -37,9 +37,12 @@
}}
</button>
<hr />
<button @click="shareObject">
<button v-if="!selectedAlbum.share._id" @click="shareEnable">
<awesome-icon icon="share" />Share this album
</button>
<button v-else @click="shareDisable">
<awesome-icon icon="share" />Remove share
</button>
</div>
</template>
</DropDown>
@@ -59,7 +62,6 @@
</span>
</p>
</div>
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center">
<awesome-icon icon="ellipsis-v" />
@@ -211,8 +213,11 @@ export default {
selectAlbum(album) {
this.$store.dispatch("albums/selectAlbum", album);
},
share() {
this.$store.dispatch("albums/share", this.selectedAlbum);
shareEnable() {
this.$store.dispatch("albums/shareEnable", this.selectedAlbum);
},
shareDisable() {
this.$store.dispatch("albums/shareDisable", this.selectedAlbum);
},
},
computed: {

View File

@@ -21,55 +21,60 @@
:class="{ active: isFavourite }"
@click="toggleFavourite"
/>
<div id="stats" class="z1 pa4">
<div class="flex-row">
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center" :title="visibility_text">
<awesome-icon :icon="visibility_icon" />
</button>
<template v-slot:dropdown-content>
<div>
<button
v-for="(item, i) in $store.state.system.lists.visibility"
:key="i"
@click="setVisibility(item)"
>
<awesome-icon :icon="getVisibilityIcon(item)" />{{
getVisibilityText(item)
}}
</button>
</div>
</template>
</DropDown>
<div class="grow flex-column">
<p class="ma4 center">
<span class="">
<b>{{ selectedBox.title }}</b>
<br />
<b>{{ box_videos.length }}</b> Videos
</span>
</p>
</div>
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center">
<awesome-icon icon="ellipsis-v" />
</button>
<template v-slot:dropdown-content>
<div>
<button @click="uploadNewCover">
<awesome-icon icon="image" />Set new Cover...
</button>
<button @click="resetCover">
<awesome-icon icon="eraser" />Reset Cover
</button>
<hr />
<button @click="mergeBox">
<awesome-icon icon="compress-alt" />Merge Boxes...
</button>
</div>
</template>
</DropDown>
<div id="stats" class="flex-row z1">
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center" :title="visibility_text">
<awesome-icon :icon="visibility_icon" />
</button>
<template v-slot:dropdown-content>
<div>
<button
v-for="(item, i) in $store.state.system.lists.visibility"
:key="i"
@click="setVisibility(item)"
>
<awesome-icon :icon="getVisibilityIcon(item)" />{{
getVisibilityText(item)
}}
</button>
<hr />
<button v-if="!selectedBox.share._id" @click="shareEnable">
<awesome-icon icon="share" />Share this box
</button>
<button v-else @click="shareDisable">
<awesome-icon icon="share" />Remove share
</button>
</div>
</template>
</DropDown>
<div class="grow flex-column">
<p class="ma4 center">
<span class="">
<b>{{ selectedBox.title }}</b>
<br />
<b>{{ box_videos.length }}</b> Videos
</span>
</p>
</div>
<DropDown v-if="$store.getters['user/isAdministrator']">
<button class="flat center">
<awesome-icon icon="ellipsis-v" />
</button>
<template v-slot:dropdown-content>
<div>
<button @click="uploadNewCover">
<awesome-icon icon="image" />Set new Cover...
</button>
<button @click="resetCover">
<awesome-icon icon="eraser" />Reset Cover
</button>
<hr />
<button @click="mergeBox">
<awesome-icon icon="compress-alt" />Merge Boxes...
</button>
</div>
</template>
</DropDown>
</div>
</div>
@@ -168,8 +173,11 @@ export default {
resetCover() {
this.$store.dispatch("boxes/resetCover", this.selectedBox);
},
share() {
this.$store.dispatch("boxes/share", this.selectedBox);
shareEnable() {
this.$store.dispatch("boxes/shareEnable", this.selectedBox);
},
shareDisable() {
this.$store.dispatch("boxes/shareDisable", this.selectedBox);
},
},
computed: {