X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fclient_OLD%2Fjavascripts%2Fcomponents%2FproblemSummary.js;fp=client%2Fclient_OLD%2Fjavascripts%2Fcomponents%2FproblemSummary.js;h=54602e054a13c86d588834944b3d42a4c213a465;hb=625022fdcf750f0aff8fcd699f7e9b89730e1d10;hp=0000000000000000000000000000000000000000;hpb=b955c65b942d09d24b5c3bed0d755d4f2f8f71f1;p=vchess.git diff --git a/client/client_OLD/javascripts/components/problemSummary.js b/client/client_OLD/javascripts/components/problemSummary.js new file mode 100644 index 00000000..54602e05 --- /dev/null +++ b/client/client_OLD/javascripts/components/problemSummary.js @@ -0,0 +1,34 @@ +// Preview a problem on variant page +Vue.component('my-problem-summary', { + props: ['prob','userid','preview'], + template: ` +
+
+
+
+

+

+

{{ timestamp2date(prob.added) }}

+ +
+ + +
+
+
+ `, + methods: { + getDiagram: function(fen) { + const fenParsed = V.ParseFen(fen); + return getDiagram({ + position: fenParsed.position, + turn: fenParsed.turn, + // No need for flags here + }); + }, + timestamp2date(ts) { + return getDate(new Date(ts)); + }, + }, +})