Skip to content

Commit

Permalink
Merge pull request #4 from learningequality/app-support
Browse files Browse the repository at this point in the history
App support
  • Loading branch information
jamalex authored May 26, 2020
2 parents 9a3dfc0 + 64d0ea0 commit 5d05c61
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions kolibri/plugins/learn/assets/src/views/ExamPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,24 @@
</KPageContainer>

<BottomAppBar :dir="bottomBarLayoutDirection" :maxWidth="null">
<UiIconButton
v-if="windowBreakpoint === 0"
:aria-label="$tr('nextQuestion')"
size="large"
type="secondary"
class="footer-button"
:disabled="questionNumber === exam.question_count - 1"
@click="goToQuestion(questionNumber + 1)"
>
<mat-svg
name="arrow_forward"
category="navigation"
:style="{fill: $themeTokens.primary}"
/>
</UiIconButton>
<KButton
:disabled="questionNumber===exam.question_count-1"
v-else
:disabled="questionNumber === exam.question_count - 1"
:primary="true"
class="footer-button"
:dir="layoutDirReset"
Expand All @@ -54,8 +70,24 @@
{{ $tr('nextQuestion') }}
<KIcon icon="forward" color="white" class="forward-icon" />
</KButton>
<UiIconButton
v-if="windowBreakpoint === 0"
:aria-label="$tr('previousQuestion')"
size="large"
type="secondary"
class="footer-button left-align"
:disabled="questionNumber === 0"
@click="goToQuestion(questionNumber - 1)"
>
<mat-svg
name="arrow_back"
category="navigation"
:style="{fill: $themeTokens.primary}"
/>
</UiIconButton>
<KButton
:disabled="questionNumber===0"
v-else
:disabled="questionNumber === 0"
:primary="true"
class="footer-button"
:dir="layoutDirReset"
Expand Down Expand Up @@ -135,6 +167,7 @@
import debounce from 'lodash/debounce';
import BottomAppBar from 'kolibri.coreVue.components.BottomAppBar';
import UiAlert from 'kolibri.coreVue.components.UiAlert';
import UiIconButton from 'kolibri.coreVue.components.UiIconButton';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import { ClassesPageNames } from '../../constants';
Expand All @@ -150,6 +183,7 @@
components: {
AnswerHistory,
UiAlert,
UiIconButton,
BottomAppBar,
},
mixins: [responsiveWindowMixin, commonCoreStrings],
Expand Down

0 comments on commit 5d05c61

Please sign in to comment.