diff --git a/app/pods/components/full-screen-contest-view/component.js b/app/pods/components/full-screen-contest-view/component.js index ba658dd..e468c09 100644 --- a/app/pods/components/full-screen-contest-view/component.js +++ b/app/pods/components/full-screen-contest-view/component.js @@ -1,5 +1,7 @@ import Component from '@ember/component'; +import { inject as service } from '@ember/service'; export default class FullScreenContestView extends Component { + @service monitorer showSubmitDialog = false } diff --git a/app/pods/components/full-screen-contest-view/template.hbs b/app/pods/components/full-screen-contest-view/template.hbs index c02e929..57362fc 100644 --- a/app/pods/components/full-screen-contest-view/template.hbs +++ b/app/pods/components/full-screen-contest-view/template.hbs @@ -99,4 +99,8 @@ -{{/if}} \ No newline at end of file +{{/if}} + + +
You Switched the tab. 10 minutes deducted.
+
\ No newline at end of file diff --git a/app/services/monitorer.js b/app/services/monitorer.js index b7fb928..d251206 100644 --- a/app/services/monitorer.js +++ b/app/services/monitorer.js @@ -7,6 +7,7 @@ export default Service.extend({ api: service(), store: service(), isEventListenerAdded: false, + tabSwitchTrigger: false, monitoredRoutes: [ 'contests.contest.attempt.content.problem', 'contests.contest.attempt.content.quiz', @@ -44,7 +45,7 @@ export default Service.extend({ fault_type: 'tab_switch' } }) - + this.setProperties('tabSwitchTrigger', true) await this.store.findRecord('contest-attempt', currentAttempt.id) }, diff --git a/app/styles/app.scss b/app/styles/app.scss index cfaf7dc..19956e4 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -228,6 +228,13 @@ body{ animation: pulse-animation-red 2s infinite; } +.bottom-bar { + position: fixed; + bottom: 0; + padding: 2rem 4rem; + width: 100vw; +} + // Animations @keyframes dots {