+ {{ curProb.instructions }} +
++ {{ translations["Show solution"] }} +
++ {{ curProb.solution }} +
+X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=897babbe7035886ff889e384ff86fa1100e48868;hb=936dc463c969f648ae0bc81074ff3272c7c99697;hp=bcd069cc389d7b2386514f5016f0af2d3b1df554;hpb=298c42e63ae321526693e9ce418c4113af36e025;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index bcd069cc..897babbe 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -1,138 +1,315 @@ Vue.component('my-problems', { data: function () { return { - problems: [], - 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 }} +
+