Skip to content

Commit

Permalink
Reorder conditional Modals in ImportProfileModal to match the UX flow
Browse files Browse the repository at this point in the history
  • Loading branch information
VilppeRiskidev committed Oct 1, 2024
1 parent 2ff3703 commit c3cd5f7
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/components/profiles-modals/ImportProfileModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
</template>
</ModalCard>

<ModalCard v-else-if="activeStep === 'IMPORT_FILE'" key="IMPORT_FILE" :is-active="isOpen" @close-modal="closeModal">
<template v-slot:header>
<h2 class="modal-title">Loading file</h2>
</template>
<template v-slot:footer>
<p>A file selection window will appear. Once a profile has been selected it may take a few moments.</p>
</template>
</ModalCard>

<ModalCard v-else-if="activeStep === 'IMPORT_CODE'" key="IMPORT_CODE" :is-active="isOpen" @close-modal="closeModal">
<template v-slot:header>
<h2 class="modal-title">Enter the profile code</h2>
Expand Down Expand Up @@ -426,16 +435,6 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
</template>
</ModalCard>

<ModalCard v-else-if="activeStep === 'PROFILE_IS_BEING_IMPORTED'" key="PROFILE_IS_BEING_IMPORTED" :is-active="isOpen" :canClose="false">
<template v-slot:header>
<h2 class="modal-title">{{percentageImported}}% imported</h2>
</template>
<template v-slot:footer>
<p>This may take a while, as mods are being downloaded.<br>
Please do not close {{appName}}.</p>
</template>
</ModalCard>

<ModalCard v-else-if="activeStep === 'ADDING_PROFILE'" key="ADDING_PROFILE" :is-active="isOpen" @close-modal="closeModal">
<template v-slot:header>
<h2 v-if="importUpdateSelection === 'IMPORT'" class="modal-title">Import a profile</h2>
Expand Down Expand Up @@ -475,12 +474,13 @@ export default class ImportProfileModal extends mixins(ProfilesMixin) {
</template>
</ModalCard>

<ModalCard v-else-if="activeStep === 'IMPORT_FILE'" key="IMPORT_FILE" :is-active="isOpen" @close-modal="closeModal">
<ModalCard v-else-if="activeStep === 'PROFILE_IS_BEING_IMPORTED'" key="PROFILE_IS_BEING_IMPORTED" :is-active="isOpen" :canClose="false">
<template v-slot:header>
<h2 class="modal-title">Loading file</h2>
<h2 class="modal-title">{{percentageImported}}% imported</h2>
</template>
<template v-slot:footer>
<p>A file selection window will appear. Once a profile has been selected it may take a few moments.</p>
<p>This may take a while, as mods are being downloaded.<br>
Please do not close {{appName}}.</p>
</template>
</ModalCard>
</template>
Expand Down

0 comments on commit c3cd5f7

Please sign in to comment.