bugfix
This commit is contained in:
+2
-2
@@ -34,14 +34,14 @@
|
||||
<hr>
|
||||
</div>
|
||||
<div>
|
||||
<h2 v-on:click="showConfig = !showConfig" class="expand">List <small>{{showConfig ? '▼' : '▲'}}</small></h2>
|
||||
<h2 v-on:click="showConfig = !showConfig" class="expand">{{showConfig ? '▾' : '▸'}} List ({{ available.length }})</h2>
|
||||
<table class="config" v-if="showConfig">
|
||||
<tr v-for="(row, i) in available">
|
||||
<td><input placeholder="question" v-bind:value="row[0]" v-on:change="row[0] = $event.target.value"></td>
|
||||
<td><input placeholder="answer" v-bind:value="row[1]" v-on:change="row[1] = $event.target.value"></td>
|
||||
<td><button v-on:click="deleteRow(i)">Delete</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="urlLength < 2048">
|
||||
<td><input placeholder="question" v-bind:value="newRow[0]" v-on:change="newRow[0] = $event.target.value"></td>
|
||||
<td><input placeholder="answer" v-bind:value="newRow[1]" v-on:change="newRow[1] = $event.target.value"></td>
|
||||
<td><button v-on:click="addRow">Add</button></td>
|
||||
|
||||
@@ -32,6 +32,9 @@ const utils = {
|
||||
},
|
||||
shuffle: function (array) {
|
||||
const output = [...array];
|
||||
if (output.length < 2) {
|
||||
return output;
|
||||
}
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
const i1 = this.randindex(array);
|
||||
const i2 = this.randindex(array, i1);
|
||||
@@ -62,6 +65,9 @@ let app = {
|
||||
currentYear() {
|
||||
return new Date().getFullYear();
|
||||
},
|
||||
urlLength() {
|
||||
return window.location.toString().length;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showApp() {
|
||||
|
||||
Reference in New Issue
Block a user