Clean up Editor controls, add button to download deck png

This commit is contained in:
Adam Goldsmith 2019-01-06 09:54:04 -05:00
parent b209dd4572
commit c414f096cf

View File

@ -4,13 +4,19 @@
<div id="controls">
<div>
<button type="button" @click="upload"> Save Deck </button>
Download:
<button type="button" @click="jsonInputDownload">
Download Input JSON
Input JSON
</button>
<button type="button"
@click="downloadFile('/decks/' + deckID + '.tts.json', deckInfo.meta.name + '.tts.json')">
Download Tabletop Output JSON
@click="downloadFile(`/decks/${deckID}.tts.json`, deckInfo.meta.name + '.tts.json')">
Tabletop Output JSON
</button>
<button type="button"
@click="downloadFile(`/decks/${deckID}.png`, deckInfo.meta.name + '.png')">
Deck PNG
</button>
</div>
@ -20,11 +26,8 @@
</label>
</div>
<form>
<div>
<label> Deck Name: <input type="text" v-model="deckInfo.meta.name"> </label>
</div>
<div>
<label> Deck Type:
<select v-model="deckInfo.meta.type">
<option value="hero">hero</option>
@ -33,7 +36,6 @@
</select>
</label>
</div>
</form>
</div>
<div id="cardEditor" v-if="selected">