mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-30 13:14:20 +00:00
ajout des liens de partage dans les bibliothèques personnelles + réparation des bibliothèques
This commit is contained in:
parent
d111a52ee7
commit
a8170ba02e
6 changed files with 46 additions and 6 deletions
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<template v-slot:expanded-item="{ headers, item }">
|
||||
<td :colspan="headers.length" class="pa-4">
|
||||
<Monster class="column-count-2" :monster="item" />
|
||||
<Monster class="column-count-2" :monster="getMonster(item)" />
|
||||
</td>
|
||||
</template>
|
||||
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<div class="text-no-wrap">
|
||||
<v-btn class="d-print-none" v-if="item.custom" small depressed icon @click="share(item)"><v-icon>mdi-share-variant</v-icon></v-btn>
|
||||
<v-btn class="d-print-none mr-2" small depressed icon @click.stop="toggleHidePrint(item)">
|
||||
<v-icon v-if="isHiddenPrint(item)">mdi-printer-off</v-icon>
|
||||
<v-icon v-else>mdi-printer</v-icon>
|
||||
|
|
@ -63,7 +64,7 @@
|
|||
<v-btn class="d-print-none mr-2" small depressed link :to="{ path: '/creation-de-monstre-pnj/', query: { key: monster.key } }"><v-icon left>mdi-pencil</v-icon> Modifier</v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed @click="removeMonster(monster)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
|
||||
</h1>
|
||||
<Monster :monster="monster" :isList="true" :hideTitle="true" />
|
||||
<Monster :monster="getMonster(monster)" :isList="true" :hideTitle="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -136,6 +137,17 @@ export default {
|
|||
this.$store.commit('myMonsters/removeMonster', monster)
|
||||
this.$store.commit('setSnackbarText', "Le monstre " + monster.title + " a été supprimé de votre bestiaire")
|
||||
this.$store.commit('setIsOpenSnackbar', true)
|
||||
},
|
||||
share (item) {
|
||||
this.$store.commit('setShareURI', encode(item))
|
||||
this.$store.commit('setIsOpenShareHomebrewDialog', true)
|
||||
},
|
||||
getMonster (item) {
|
||||
if (!item.custom && item.path) {
|
||||
let monster = this.$site.pages.find((el) => el.path === item.path || el.path === item.path + "/")
|
||||
return monster
|
||||
}
|
||||
return item
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue