+ {{ curProb.instructions }} +
++ {{ translations["Show solution"] }} +
++ {{ curProb.solution }} +
+X-Git-Url: https://git.auder.net/doc/index.css?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=6f03fd973bae4330c0eba1dceada95e00dee5669;hb=60d9063fdfcd4b7628fbc0e0fc594f083bda8761;hp=9288a393a6f9135cd325273cc36a3a30c775d7db;hpb=247356cde3f4e36004942c5f57187d667f7ef27c;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index 9288a393..6f03fd97 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -1,129 +1,333 @@ Vue.component('my-problems', { + props: ["queryHash","settings"], data: function () { return { - problems: problemArray, //initial value - newProblem: { + userId: user.id, + problems: [], //oldest first + myProblems: [], //same, but only mine + singletons: [], //requested problems (using #num) + display: "others", //or "mine" + curProb: null, //(reference to) current displayed problem (if any) + showSolution: false, + nomoreMessage: "", + pbNum: 0, //to navigate directly to some problem + // New problem (to upload), or existing problem to edit: + modalProb: { + id: 0, //defined if it's an edit fen: "", instructions: "", solution: "", - stage: "nothing", //or "preview" after new problem is filled + preview: false, }, }; }, template: `
+ {{ curProb.instructions }} +
++ {{ curProb.solution }} +
+