+ {{ curProb.instructions }} +
++ {{ translations["Show solution"] }} +
++ {{ curProb.solution }} +
+X-Git-Url: https://git.auder.net/js/rpsls.js?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=00ea7692fbe143f6ed24ead379beb850ee28a704;hb=582df3497b0f91dd4b645386a059eac9e98da1bb;hp=63f06e5568a0a6224f633be2edc2ece756583ecf;hpb=e081ffe361b06ca74db0a36bf72dd73602abf57b;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index 63f06e55..00ea7692 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -1,129 +1,332 @@ 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, + 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 }} +
+