mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix(modals): maybe got it?!?
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user