Skip to content

Commit d3c8a97

Browse files
Tyler DoerksenDavid Paquette
authored andcommitted
adding welcome screen routes
1 parent 162e5db commit d3c8a97

2 files changed

Lines changed: 43 additions & 34 deletions

File tree

2wr-app/src/components/welcome/welcome-landing.vue

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
11
<template>
22
<v-container>
3-
<v-row class="text-left">
4-
<v-col cols="10">
3+
<v-row class="text-center">
4+
<v-col cols="12">
55
<img src="/img/icons/safari-pinned-tab.svg" width="350" />
6-
<div v-if="stage === 1">
7-
<h2>Welcome to 2 weeks ready</h2>
8-
<p>
9-
<strong>2 Weeks Ready</strong> is a mobile application that makes
10-
emergency preparedness a <strong>simple</strong>,
11-
<strong>easy</strong>, <strong>sharable</strong>, and
12-
<strong>time-saving</strong> experience to protect you and people
13-
you care about.
14-
</p>
15-
</div>
16-
<div v-if="stage === 2">
17-
<h2>You and earthquake risk</h2>
18-
<p>
19-
The Pacific Northwest is earthquake country with the
20-
<strong
21-
>second highest risk for earthquakes in the United States!</strong
22-
>
23-
There are also a wide assortment of hazards that can impact you
24-
including tsunamis, volcanic eruptions, and wildfires to name a few.
25-
</p>
26-
</div>
27-
<div v-if="stage === 3">
28-
<h2>Let's get started!</h2>
29-
<p>
30-
There's a lot to prepare for and learn about. <strong>2 Weeks Ready can
31-
help!</strong> Are you ready to start your preparedness Journey? <strong>Let's begin
32-
by creating an account and answering some questions.</strong>
33-
</p>
34-
</div>
6+
</v-col>
7+
8+
<v-col v-if="stage === 1" cols="12" md="6" offset-md="3" class="text-left pa-6">
9+
<h2 class="text-center text-uppercase">Welcome to 2 weeks ready</h2>
10+
<p>
11+
<strong>2 Weeks Ready</strong> is a mobile application that makes
12+
emergency preparedness a <strong>simple</strong>,
13+
<strong>easy</strong>, <strong>sharable</strong>, and
14+
<strong>time-saving</strong> experience to protect you and people you
15+
care about.
16+
</p>
17+
</v-col>
18+
<v-col v-if="stage === 2" cols="12" md="6" offset-md="3" class="text-left pa-6">
19+
<h2 class="text-center text-uppercase">You and earthquake risk</h2>
20+
<p>
21+
The Pacific Northwest is earthquake country with the
22+
<strong
23+
>second highest risk for earthquakes in the United States!</strong
24+
>
25+
There are also a wide assortment of hazards that can impact you
26+
including tsunamis, volcanic eruptions, and wildfires to name a few.
27+
</p>
28+
</v-col>
29+
<v-col v-if="stage === 3" cols="12" md="6" offset-md="3" class="text-left pa-6">
30+
<h2 class="text-center text-uppercase">Let's get started!</h2>
31+
<p>
32+
There's a lot to prepare for and learn about.
33+
<strong>2 Weeks Ready can help!</strong> Are you ready to start your
34+
preparedness Journey?
35+
<strong
36+
>Let's begin by creating an account and answering some
37+
questions.</strong
38+
>
39+
</p>
3540
</v-col>
3641
</v-row>
3742
<v-fab-transition>
@@ -59,11 +64,11 @@ export default {
5964
}),
6065
methods: {
6166
next() {
62-
6367
this.stage++;
6468
65-
if(this.stage > 3){
66-
this.$auth.loginWithRedirect("/")
69+
if (this.stage > 3) {
70+
localStorage.setItem("welcomeCompleted", "true");
71+
this.$auth.loginWithRedirect("/");
6772
}
6873
},
6974
},

2wr-app/src/router/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ const router = new VueRouter({
9898
});
9999

100100
router.beforeEach(async (to, from, next) => {
101+
if(!localStorage.getItem('welcomeCompleted') && to.name !== 'welcome') {
102+
router.push('welcome');
103+
}
104+
101105
if (to.matched.some(record => record.meta.requiresAuth)) {
102106
// this route requires auth, check if logged in
103107
// if not, redirect to login page.

0 commit comments

Comments
 (0)