X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=9117ebfc2e10de3b4235c0fa5152b31037d81886;hp=3bd13f63baf8856259deca647cfece614feaef7f;hb=b5fb8e693dc82037eec2617a7dc49d838a9a8441;hpb=86c9843cd04717d61f373ebaf3a1fdf21fd5a60f diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index 3bd13f63..9117ebfc 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -16,7 +16,8 @@ Vue.component('my-problems', { + v-for="(p,idx) in sortedProblems" + v-bind:prob="p" v-bind:preview="false" v-bind:key="idx">
@@ -32,18 +33,22 @@ Vue.component('my-problems', {

Safe HTML tags allowed

- // TODO: we don't want exactly the same display (-date +solution) - - + + + +
+ + +
@@ -99,6 +104,8 @@ Vue.component('my-problems', { instructions: this.newProblem.instructions, solution: this.newProblem.solution, }, response => { + this.newProblem.added = Date.now(); + this.problems.push(JSON.parse(JSON.stringify(this.newProblem))); document.getElementById("modal-newproblem").checked = false; this.newProblem.stage = "nothing"; });