fix(modals): maybe got it?!?

This commit is contained in:
Sabe Jones
2018-11-02 16:27:08 -05:00
parent 818d5e4eb6
commit b6b03751c4
2 changed files with 12 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ b-modal#avatar-modal(title="", :size='editing ? "lg" : "md"', :hide-header='true
h3(v-once) {{$t('welcomeTo')}} h3(v-once) {{$t('welcomeTo')}}
.svg-icon.logo(v-html='icons.logoPurple') .svg-icon.logo(v-html='icons.logoPurple')
.avatar-section.row(v-if='modalPage > 1 || user.auth.local.email', :class='{"page-2": modalPage === 2}') .avatar-section.row(v-if='modalPage > 1', :class='{"page-2": modalPage === 2}')
.col-6.offset-3 .col-6.offset-3
.user-creation-bg(v-if='!editing') .user-creation-bg(v-if='!editing')
avatar(:member='user', :avatarOnly='!editing', :class='{"edit-avatar": editing}') avatar(:member='user', :avatarOnly='!editing', :class='{"edit-avatar": editing}')
@@ -366,19 +366,18 @@ b-modal#avatar-modal(title="", :size='editing ? "lg" : "md"', :hide-header='true
.corner-decoration(:style="{bottom: '-2px', left: '-2px'}") .corner-decoration(:style="{bottom: '-2px', left: '-2px'}")
div(v-if='modalPage === 1') div(v-if='modalPage === 1')
p(v-once, v-html='$t("justinIntroMessage1")') p(v-once, v-html='$t("justinIntroMessage1")')
p(v-once, v-if='user.auth.local.email') {{ $t('justinIntroMessage2') }} p(v-once) {{ $t('justinIntroMessageUsername') }}
p(v-once, v-if='!user.auth.local.email') {{ $t('justinIntroMessageUsername') }}
div(v-if='modalPage === 2') div(v-if='modalPage === 2')
p {{ $t('justinIntroMessageAppearance') }} p {{ $t('justinIntroMessageAppearance') }}
div(v-if='modalPage === 3') div(v-if='modalPage === 3')
p(v-once) {{ $t('justinIntroMessage3') }} p(v-once) {{ $t('justinIntroMessage3') }}
.npc-justin-textbox .npc-justin-textbox
.section.mr-5.ml-5(v-if='modalPage === 1 && !user.auth.local.email') .section.mr-5.ml-5(v-if='modalPage === 1')
username-form(@usernameConfirmed='modalPage += 1', :avatarIntro='"true"') username-form(@usernameConfirmed='modalPage += 1', :avatarIntro='"true"')
.small.text-center(v-html="$t('usernameTOSRequirements')") .small.text-center(v-html="$t('usernameTOSRequirements')")
.section.container.footer .section.container.footer
.row(v-if='!editing && !(modalPage === 1 && !user.auth.local.email)') .row(v-if='!editing && !(modalPage === 1)')
.col-3.offset-1.text-center .col-3.offset-1.text-center
div(v-if='modalPage > 1', @click='prev()') div(v-if='modalPage > 1', @click='prev()')
.prev-arrow .prev-arrow

View File

@@ -341,9 +341,6 @@ export default {
runForcedModals () { runForcedModals () {
if (!this.user.flags.verifiedUsername) return this.$root.$emit('bv::show::modal', 'verify-username'); if (!this.user.flags.verifiedUsername) return this.$root.$emit('bv::show::modal', 'verify-username');
this.initTour();
if (!(this.user.flags.tour.intro === this.TOUR_END || !this.user.flags.welcomed)) return this.goto('intro', 0);
return this.runYesterDailies(); return this.runYesterDailies();
}, },
showDeathModal () { showDeathModal () {
@@ -420,21 +417,25 @@ export default {
// List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now // List of prompts for user on changes. Sounds like we may need a refactor here, but it is clean for now
if (!this.user.flags.welcomed) { if (!this.user.flags.welcomed) {
this.$store.state.avatarEditorOptions.editingUser = false; this.$store.state.avatarEditorOptions.editingUser = false;
this.$root.$emit('bv::show::modal', 'avatar-modal'); return this.$root.$emit('bv::show::modal', 'avatar-modal');
}
if (this.user.flags.newStuff) {
return this.$root.$emit('bv::show::modal', 'new-stuff');
} }
if (this.user.stats.hp <= 0) { if (this.user.stats.hp <= 0) {
this.showDeathModal(); return this.showDeathModal();
} }
if (this.questCompleted) { if (this.questCompleted) {
this.$root.$emit('bv::show::modal', 'quest-completed');
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
return this.$root.$emit('bv::show::modal', 'quest-completed');
} }
if (this.userClassSelect) { if (this.userClassSelect) {
this.$root.$emit('bv::show::modal', 'choose-class');
this.playSound('Achievement_Unlocked'); this.playSound('Achievement_Unlocked');
return this.$root.$emit('bv::show::modal', 'choose-class');
} }
}, },
showLevelUpNotifications (newlevel) { showLevelUpNotifications (newlevel) {
@@ -528,10 +529,6 @@ export default {
async handleUserNotifications (after) { async handleUserNotifications (after) {
if (this.$store.state.isRunningYesterdailies) return; if (this.$store.state.isRunningYesterdailies) return;
if (this.user.flags.newStuff) {
this.$root.$emit('bv::show::modal', 'new-stuff');
}
if (!after || after.length === 0 || !Array.isArray(after)) return; if (!after || after.length === 0 || !Array.isArray(after)) return;
let notificationsToRead = []; let notificationsToRead = [];