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