+ {{ curProb.instructions }} +
++ {{ translations["Show solution"] }} +
++ {{ curProb.solution }} +
+X-Git-Url: https://git.auder.net/assets/current/%7B%7B%20path%28%27mixstore_store_package_view%27%2C%20%7B%20id:%20key%20%7D%29%20%7D%7D?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=00ea7692fbe143f6ed24ead379beb850ee28a704;hb=582df3497b0f91dd4b645386a059eac9e98da1bb;hp=60aa9c430833caa145aa522d7060a9e6e3a9d91b;hpb=a9f262f38d7ae9ea4c935c549309bd2f773aa6c2;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index 60aa9c43..00ea7692 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -1,11 +1,18 @@ Vue.component('my-problems', { + props: ["queryHash","settings"], data: function () { return { + userId: user.id, problems: [], //oldest first - myProblems: [], //same - curProblems: [], //assigned to either of the ones above - curIdx: 0, //index in (current) problems array - newProblem: { + 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, + 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: "", @@ -16,217 +23,310 @@ Vue.component('my-problems', { template: `
+ {{ curProb.instructions }} +
++ {{ curProb.solution }} +
+