mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-30 13:14:20 +00:00
ajout de feedback sur les ajouts/suppressions dans les bibliothèques et consolidation. see #20
This commit is contained in:
parent
183c7fcaa5
commit
dfb0967b07
16 changed files with 105 additions and 27 deletions
|
|
@ -40,7 +40,7 @@
|
|||
<v-icon v-else>mdi-printer</v-icon>
|
||||
</v-btn>
|
||||
<v-btn class="d-print-none mr-2" small depressed link icon :to="{ path: '/creation-d-objet-magique/', query: { key: item.key } }"><v-icon>mdi-pencil</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="$store.commit('myMagicItems/removeMagicItem', item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="removeMagicItem(item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<h2 class="d-flex align-center">
|
||||
<div class="mr-4">{{ magicItem.title }}</div>
|
||||
<v-btn class="d-print-none mr-2" small depressed link :to="{ path: '/creation-de-sort/', query: { key: magicItem.key } }"><v-icon left>mdi-pencil</v-icon> Modifier</v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed @click="$store.commit('myMagicItems/removeMagicItem', magicItem)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed @click="removeMagicItem(magicItem)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
|
||||
</h2>
|
||||
<MagicItem :magicItem="magicItem" :isList="true" :hideTitle="true" />
|
||||
</div>
|
||||
|
|
@ -117,6 +117,11 @@ export default {
|
|||
},
|
||||
onClickRow (row, item) {
|
||||
item.expand(!item.isExpanded)
|
||||
},
|
||||
removeMagicItem (magicItem) {
|
||||
this.$store.commit('myMagicItems/removeMagicItem', magicItem)
|
||||
this.$store.commit('setSnackbarText', "L'objet magique " + magicItem.title + " a été supprimé de votre bibliothèque")
|
||||
this.$store.commit('setIsOpenSnackbar', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<v-icon v-else>mdi-printer</v-icon>
|
||||
</v-btn>
|
||||
<v-btn class="d-print-none mr-2" small depressed link icon :to="{ path: '/creation-de-monstre-pnj/', query: { key: item.key } }"><v-icon>mdi-pencil</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="$store.commit('myMonsters/removeMonster', item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="removeMonster(item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<h1 class="d-flex align-center">
|
||||
<div class="mr-4">{{ monster.title }}</div>
|
||||
<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="$store.commit('myMonsters/removeMonster', monster)"><v-icon left>mdi-delete</v-icon> Supprimer</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" />
|
||||
</div>
|
||||
|
|
@ -131,6 +131,11 @@ export default {
|
|||
},
|
||||
onClickRow (row, item) {
|
||||
item.expand(!item.isExpanded)
|
||||
},
|
||||
removeMonster (monster) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
<v-icon v-else>mdi-printer</v-icon>
|
||||
</v-btn>
|
||||
<v-btn class="d-print-none mr-2" small depressed link icon :to="{ path: '/creation-de-sort/', query: { key: item.key } }"><v-icon>mdi-pencil</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="$store.commit('mySpells/removeSpell', item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed icon @click="removeSpell(item)"><v-icon>mdi-delete</v-icon></v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<h3 class="d-flex align-center title">
|
||||
<div class="mr-4">{{ spell.title }}</div>
|
||||
<v-btn class="d-print-none mr-2" small depressed link :to="{ path: '/creation-de-sort/', query: { key: spell.key } }"><v-icon left>mdi-pencil</v-icon> Modifier</v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed @click="$store.commit('mySpells/removeSpell', spell)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
|
||||
<v-btn color="error" class="d-print-none" small depressed @click="removeSpell(spell)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
|
||||
</h3>
|
||||
<Spell :spell="spell" :isList="true" :hideTitle="true" />
|
||||
</template>
|
||||
|
|
@ -192,6 +192,11 @@ export default {
|
|||
},
|
||||
onClickRow (row, item) {
|
||||
item.expand(!item.isExpanded)
|
||||
},
|
||||
removeSpell (spell) {
|
||||
this.$store.commit('mySpells/removeSpell', spell)
|
||||
this.$store.commit('setSnackbarText', "Le sort " + spell.title + " a été supprimé de votre grimoire")
|
||||
this.$store.commit('setIsOpenSnackbar', true)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue