+ {{ curProb.instructions }} +
++ {{ translations["Show solution"] }} +
++ {{ curProb.solution }} +
+X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fproblems.js;h=e3ab998d0fda67ee450e02a26eaaeea86bd44939;hb=8ef618ef05070642849f50861399116c2d69a816;hp=d9265a36fcecb7a4df65d24d88f18d7bcef6f6f8;hpb=77fa6d1fe6306f1f9dcd3c363bba8965b602d237;p=vchess.git diff --git a/public/javascripts/components/problems.js b/public/javascripts/components/problems.js index d9265a36..e3ab998d 100644 --- a/public/javascripts/components/problems.js +++ b/public/javascripts/components/problems.js @@ -1,54 +1,106 @@ Vue.component('my-problems', { data: function () { return { - problems: problemArray, //initial value - newProblem: { + userId: user.id, + problems: [], //oldest first + myProblems: [], //same, but only mine + display: "list", //or "myList" + curIdx: -1, //index in (current) problems array + showSolution: false, + // 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 }} +
+