bugfix
This commit is contained in:
+2
-2
@@ -34,14 +34,14 @@
|
|||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
<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">
|
<table class="config" v-if="showConfig">
|
||||||
<tr v-for="(row, i) in available">
|
<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="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><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>
|
<td><button v-on:click="deleteRow(i)">Delete</button></td>
|
||||||
</tr>
|
</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="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><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>
|
<td><button v-on:click="addRow">Add</button></td>
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ const utils = {
|
|||||||
},
|
},
|
||||||
shuffle: function (array) {
|
shuffle: function (array) {
|
||||||
const output = [...array];
|
const output = [...array];
|
||||||
|
if (output.length < 2) {
|
||||||
|
return output;
|
||||||
|
}
|
||||||
for (let i = 0; i < array.length; i++) {
|
for (let i = 0; i < array.length; i++) {
|
||||||
const i1 = this.randindex(array);
|
const i1 = this.randindex(array);
|
||||||
const i2 = this.randindex(array, i1);
|
const i2 = this.randindex(array, i1);
|
||||||
@@ -62,6 +65,9 @@ let app = {
|
|||||||
currentYear() {
|
currentYear() {
|
||||||
return new Date().getFullYear();
|
return new Date().getFullYear();
|
||||||
},
|
},
|
||||||
|
urlLength() {
|
||||||
|
return window.location.toString().length;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showApp() {
|
showApp() {
|
||||||
|
|||||||
Reference in New Issue
Block a user