new splash ascii stuff
This commit is contained in:
parent
4fc0c99977
commit
9792660a5b
|
@ -57,6 +57,7 @@
|
|||
<li
|
||||
@click="$store.commit('openModal', 'options')"
|
||||
class="ml-1 border-b"
|
||||
v-if="asciibirdMeta.length"
|
||||
>
|
||||
Options
|
||||
</li>
|
||||
|
@ -193,8 +194,8 @@
|
|||
@mouseup.right="openContextMenu"
|
||||
@contextmenu.prevent
|
||||
>
|
||||
<h1 class="text-4xl">ASCIIBIRD</h1>
|
||||
<h3>Right click to start</h3>
|
||||
<!-- <h1 class="text-4xl">ASCIIBIRD</h1>
|
||||
<h3>Right click to start</h3> -->
|
||||
|
||||
<BrushCanvas :blocks="splashAscii" />
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -53,12 +53,21 @@
|
|||
<span class="ml-5"> Size: {{ asciiStats.sizeCompressed }} ({{ asciiStats.sizeUncompressed }} / {{ asciiStats.sizePercentage }}%) </span> <br>
|
||||
|
||||
<span class="ml-5"> State Size: {{ asciiStats.stateSize }}</span> <br>
|
||||
|
||||
|
||||
<div class="mb-4 border-t-2">
|
||||
<div class="mt-1 p-2 bg-red-300 rounded-md cursor-pointer" @click="copyUriToClipboard()">Copy URI Encoded String</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</t-card>
|
||||
</vue-draggable-resizable>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { toolbarIcons, mircColours99, blockWidth, blockHeight } from '../ascii';
|
||||
import { toolbarIcons, mircColours99, blockWidth, blockHeight, exportMirc } from '../ascii';
|
||||
import LZString from "lz-string";
|
||||
|
||||
export default {
|
||||
created() {
|
||||
|
@ -171,6 +180,22 @@ export default {
|
|||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
copyUriToClipboard() {
|
||||
let ascii = LZString.compressToEncodedURIComponent(JSON.stringify(this.currentAsciiBlocks));
|
||||
|
||||
this.$copyText(ascii).then(
|
||||
(e) => {
|
||||
this.$toasted.show("Copied URI encoded ASCII for Splash Ascii!", {
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
(e) => {
|
||||
this.$toasted.show("Error when copying URI encoded ASCII!", {
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
onResize(x, y, w, h) {
|
||||
this.panel.x = x;
|
||||
this.panel.y = y;
|
||||
|
|
Loading…
Reference in New Issue