.col-sm-12.col-md-10.col-md-offset-2
#topPage
span.vname {{ curproblem.vname }}
- span.uname {{ "(" + curproblem.uname + ")" }}
+ span.uname ({{ curproblem.uname }})
button.marginleft(@click="backToList()") {{ st.tr["Back to list"] }}
button.nomargin(
v-if="st.user.id == curproblem.uid"
th {{ st.tr["Instructions"] }}
th {{ st.tr["Number"] }}
tr(
- v-for="p in problems"
+ v-for="p in sortedProblems"
v-show="displayProblem(p)"
@click="setHrefPid(p)"
)
this.showOne = false
},
},
+ computed: {
+ sortedProblems: function() {
+ // Newest first:
+ return this.problems.sort( (p1,p2) => p2.added - p1.added);
+ },
+ },
methods: {
setVname: function(prob) {
prob.vname = this.st.variants.find(v => v.id == prob.vid).name;