1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-12-17 07:30:47 +00:00

amélioration des aides de jeu

This commit is contained in:
Maxime Moraine 2020-05-22 20:36:06 +02:00
parent 4cb6e1d07b
commit a854071c7d
4 changed files with 25 additions and 7 deletions

View file

@ -3,7 +3,7 @@
<div class="d-flex flex-wrap align-center d-print-none">
<Breadcrumb class="mr-auto mb-4" />
<div class="d-flex flex-wrap align-center">
<v-btn color="primary" class="mr-4 mb-4" depressed link to="/mon-grimoire/">Mon Grimoire</v-btn>
<MySpellsButton class="mr-4" />
<v-btn color="primary" class="mb-4" depressed link to="/grimoire/">Grimoire</v-btn>
</div>
</div>
@ -110,6 +110,8 @@ import { saveAs } from 'file-saver'
import { CLASSES } from '../../data/classes'
import { SPELLSCHOOLS, SPELLLEVELS } from '../../data/spells'
import { getUrlParameter } from '@theme/util/filterHelpers'
import slugify from 'slugify'
slugify.extend({"'": '-'})
export default {
name: 'CreateSpellLayout',
@ -174,9 +176,13 @@ export default {
methods: {
download () {
let filename = "sort.json"
if (this.spell.title !== '') {
filename = slugify(this.spell.title, {lower: true, strict: true}) + '.json'
}
saveAs(new Blob([JSON.stringify(this.spell)], {
type: "text/plain;charset=utf-8"
}), "sort.json")
}), filename)
},
upload (e) {