diff --git a/app/pods/components/intermediate-contest-view/component.js b/app/pods/components/intermediate-contest-view/component.js index 71bb4ac..72f3a8b 100644 --- a/app/pods/components/intermediate-contest-view/component.js +++ b/app/pods/components/intermediate-contest-view/component.js @@ -5,6 +5,7 @@ import { restartableTask, dropTask } from 'ember-concurrency-decorators'; import { timeout } from 'ember-concurrency'; import { inject as service } from '@ember/service'; import moment from 'moment'; +import ENV from 'hackerblocks/config/environment'; export default class IntermediateContestComponent extends Component { @service store @@ -114,4 +115,8 @@ export default class IntermediateContestComponent extends Component { console.log(err) }) } + + @action async openTestInNewWindow() { + window.open(`${ENV.publicUrl}contests/${this.contest.id}/attempt/`, 'popup') + } } diff --git a/app/pods/components/intermediate-contest-view/template.hbs b/app/pods/components/intermediate-contest-view/template.hbs index 90aac82..9206669 100644 --- a/app/pods/components/intermediate-contest-view/template.hbs +++ b/app/pods/components/intermediate-contest-view/template.hbs @@ -60,19 +60,21 @@