From b6b03751c4cb87ac6f67f505a021e69540ca8a9e Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 2 Nov 2018 16:27:08 -0500 Subject: [PATCH] fix(modals): maybe got it?!? --- website/client/components/creatorIntro.vue | 9 ++++----- website/client/components/notifications.vue | 19 ++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/website/client/components/creatorIntro.vue b/website/client/components/creatorIntro.vue index 9896ebe5ee..2967d50435 100644 --- a/website/client/components/creatorIntro.vue +++ b/website/client/components/creatorIntro.vue @@ -5,7 +5,7 @@ b-modal#avatar-modal(title="", :size='editing ? "lg" : "md"', :hide-header='true h3(v-once) {{$t('welcomeTo')}} .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 .user-creation-bg(v-if='!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'}") div(v-if='modalPage === 1') p(v-once, v-html='$t("justinIntroMessage1")') - p(v-once, v-if='user.auth.local.email') {{ $t('justinIntroMessage2') }} - p(v-once, v-if='!user.auth.local.email') {{ $t('justinIntroMessageUsername') }} + p(v-once) {{ $t('justinIntroMessageUsername') }} div(v-if='modalPage === 2') p {{ $t('justinIntroMessageAppearance') }} div(v-if='modalPage === 3') p(v-once) {{ $t('justinIntroMessage3') }} .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"') .small.text-center(v-html="$t('usernameTOSRequirements')") .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 div(v-if='modalPage > 1', @click='prev()') .prev-arrow diff --git a/website/client/components/notifications.vue b/website/client/components/notifications.vue index 79bba88cd5..e3faa8c9bb 100644 --- a/website/client/components/notifications.vue +++ b/website/client/components/notifications.vue @@ -341,9 +341,6 @@ export default { runForcedModals () { 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(); }, 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 if (!this.user.flags.welcomed) { 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) { - this.showDeathModal(); + return this.showDeathModal(); } if (this.questCompleted) { - this.$root.$emit('bv::show::modal', 'quest-completed'); this.playSound('Achievement_Unlocked'); + return this.$root.$emit('bv::show::modal', 'quest-completed'); } if (this.userClassSelect) { - this.$root.$emit('bv::show::modal', 'choose-class'); this.playSound('Achievement_Unlocked'); + return this.$root.$emit('bv::show::modal', 'choose-class'); } }, showLevelUpNotifications (newlevel) { @@ -528,10 +529,6 @@ export default { async handleUserNotifications (after) { 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; let notificationsToRead = [];