X-Git-Url: https://git.auder.net/doc/screen_pairings_scoring.png?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2FproblemSummary.js;h=08109effeafb7a8941d393116c0c88a837d7925a;hb=a6403027a66411ead248aab0369bf3ee3a75d8ec;hp=5f0fd44bf36a371ff1c2ae3c51dccf152b34af87;hpb=247356cde3f4e36004942c5f57187d667f7ef27c;p=vchess.git diff --git a/public/javascripts/components/problemSummary.js b/public/javascripts/components/problemSummary.js index 5f0fd44b..08109eff 100644 --- a/public/javascripts/components/problemSummary.js +++ b/public/javascripts/components/problemSummary.js @@ -1,6 +1,6 @@ -// Show a problem summary on variant page or new problem preview -Vue.component('my-problem-summary', { - props: ['prob','preview'], +// Preview a problem on variant page +Vue.component('my-problem-preview', { + props: ['prob','userid'], template: `

-

+

{{ timestamp2date(prob.added) }}

- +
+ + +
`, methods: { - translate: function(text) { - return translations[text]; - }, getDiagram: function(fen) { const fenParsed = V.ParseFen(fen); return getDiagram({ @@ -29,9 +29,5 @@ Vue.component('my-problem-summary', { timestamp2date(ts) { return getDate(new Date(ts)); }, - // Propagate "show problem" event to parent component (my-problems) - showProblem: function() { - this.$emit('show-problem'); - }, }, })