master
Waqar Ul Zafar 2023-02-27 09:54:49 +05:00
parent 473ffb69eb
commit 9ee623c38f
11 changed files with 147 additions and 35 deletions

View File

@ -62,7 +62,7 @@ export default defineNuxtConfig({
"Headphones Type":"Headphones Type", "Headphones Type":"Headphones Type",
"In-Ear":"In-Ear", "In-Ear":"In-Ear",
"Over-Ear":"Over-Ear", "Over-Ear":"Over-Ear",
"ANC":"ANCr", "ANC":"ANC",
"No":"No", "No":"No",
"Yes":"Yes", "Yes":"Yes",
"About Mindboost":"About Mindboost", "About Mindboost":"About Mindboost",

View File

@ -25,7 +25,7 @@
<div class="col-12 my-auto"> <div class="col-12 my-auto">
<div class="text-center pt-1 "> <div class="text-center pt-1 ">
<h2 class="fw-bolder display-6 text-center" >Log In</h2> <h2 class="fw-bolder display-6 text-center" >Log In</h2>
<span class="fs-5 pt-1 text-muted">Welcome back, <span class="fw-bolder text-dark">Morris!</span></span> <span class="fs-5 pt-1 text-muted">Welcome back,</span>
</div> </div>
<div class="row pt-2"> <div class="row pt-2">
<div class="col-12"> <div class="col-12">
@ -42,7 +42,7 @@
<div class="col-12 col-sm-8 col-md-8 col-lg-6"> <div class="col-12 col-sm-8 col-md-8 col-lg-6">
<label class="form-label">Password</label> <label class="form-label">Password</label>
<input type="password" v-model="form.password" placeholder="Password" class="form-control" > <input type="password" v-model="form.password" placeholder="Password" class="form-control" >
<span class="float-end pt-2"><a class="forgot-link" href="#">Forgot Password</a></span> <span class="float-end pt-2"><router-link :to="localePath('/auth/forgot')" class="forgot-link" href="#">Forgot Password</router-link></span>
</div> </div>
</div> </div>
<div class="row justify-content-center pb-5"> <div class="row justify-content-center pb-5">
@ -117,9 +117,11 @@ export default {
this.login(data.user,data.authorisation.token); this.login(data.user,data.authorisation.token);
this.toast.success('Login Successfully....'); this.$toast.success('Login Successfully....');
this.$router.push('/onboarding'); this.$router.push(this.localePath('/onboarding'));
}else{
this.$toast.error(`Email or password is incorrect.`);
} }
}).catch((error)=>{ }).catch((error)=>{
this.loading=false; this.loading=false;
@ -127,7 +129,8 @@ export default {
if(error.response.status==401){ if(error.response.status==401){
this.auth_error=true; this.auth_error=true;
this.toast.error(`Email or password is incorrect.`); this.$toast.error(`Email or password is incorrect.`);
} }
if(error.response.status==422){ if(error.response.status==422){
this.errors = error.response.data.errors; this.errors = error.response.data.errors;

View File

@ -28,7 +28,7 @@
<div class="row" style="margin-bottom: 24px;"> <div class="row" style="margin-bottom: 24px;">
<div class="text-center pt-1 "> <div class="text-center pt-1 ">
<h2 class="fw-bolder display-6 text-center" >Sign Up</h2> <h2 class="fw-bolder display-6 text-center" >Sign Up</h2>
<span class="fs-5 pt-2 text-muted">Helo , <span class="fw-bolder text-dark">Beautiful!</span></span> <span class="fs-5 pt-2 text-muted">Hello, <span class="fw-bolder text-dark">Beautiful!</span></span>
<p class="text-muted pt-2 text-center fs-5 singn-up-text pb-0 mb-0">Mindboost helps you block out distracting noise with concentration-boosting music, increasing your productivity by up to 35%.</p> <p class="text-muted pt-2 text-center fs-5 singn-up-text pb-0 mb-0">Mindboost helps you block out distracting noise with concentration-boosting music, increasing your productivity by up to 35%.</p>
</div> </div>
</div> </div>
@ -94,7 +94,15 @@ import backgroundImagePath from '~/assets/image/login4.png'
import {useUserStore} from '@/stores/user'; import {useUserStore} from '@/stores/user';
import {mapState,mapActions} from "pinia"; import {mapState,mapActions} from "pinia";
export default { export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
computed:{ computed:{
...mapState(useUserStore,['user']) ...mapState(useUserStore,['user'])
}, },
@ -122,12 +130,15 @@ export default {
console.log(data); console.log(data);
this.loading=false; this.loading=false;
this.$toast.success("Signup successfully....");
this.login(data.user,data.authorisation.token) this.login(data.user,data.authorisation.token)
this.$router.push('/onboarding'); this.$router.push(this.localePath('/onboarding'));
}).catch((error)=>{ }).catch((error)=>{
this.loading=false; this.loading=false;
if(error.response.status==422){ if(error.response.status==422){
this.errors = error.response.data.errors; this.errors = error.response.data.errors;
this.$toast.error(error.response.data.message);
} }
}) })

View File

@ -2,7 +2,7 @@
<div> <div>
<audio ref="audio" src="/sounds/Lagoon.aac" loop></audio> <audio ref="audio" src="/sounds/Lagoon.aac" loop></audio>
<video-background <video-background
src="video/bg-video.mp4" src="/video/bg-video.mp4"
style=" height: 100vh;" style=" height: 100vh;"
> >
<top-logo-bar></top-logo-bar> <top-logo-bar></top-logo-bar>
@ -132,10 +132,23 @@
</svg> </svg>
</div> </div>
<div class="col-12 text-center pt-5"> <div class="col-12 text-center pt-5">
<nuxt-link to="/" type="button" class="btn text-white px-4 fs-5 fw-bolder py-2" style="background-color: #e9c046">NEXT</nuxt-link> <nuxt-link :to="localePath('/')" type="button" class="btn text-white px-4 fs-5 fw-bolder py-2" style="background-color: #e9c046">NEXT</nuxt-link>
</div> </div>
</div> </div>
</div> </div>
</video-background> </video-background>
</div> </div>
</template> </template>
<script>
export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
}
</script>

View File

@ -52,6 +52,15 @@ import {useCounterStore} from '@/stores/counter';
import {mapState,mapActions} from "pinia"; import {mapState,mapActions} from "pinia";
// const counter=useCounterStore(); // const counter=useCounterStore();
export default { export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
mounted() { mounted() {
this.increment(25); this.increment(25);
}, },
@ -73,7 +82,7 @@ export default {
console.log(data); console.log(data);
if(data.success){ if(data.success){
this.$toast.success(data.message); this.$toast.success(data.message);
this.$router.push('/onboarding/onboarding2'); this.$router.push(this.localePath('/onboarding/onboarding2'));
} }
}).catch((e)=>{ }).catch((e)=>{
this.$toast.error("something went wrong while saving..."); this.$toast.error("something went wrong while saving...");

View File

@ -57,6 +57,15 @@
import {useCounterStore} from '@/stores/counter'; import {useCounterStore} from '@/stores/counter';
import {mapState,mapActions} from "pinia"; import {mapState,mapActions} from "pinia";
export default { export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
mounted() { mounted() {
this.increment(50); this.increment(50);
}, },
@ -77,7 +86,7 @@ export default {
console.log(data); console.log(data);
if(data.success){ if(data.success){
this.$toast.success(data.message); this.$toast.success(data.message);
this.$router.push('/onboarding/onboarding3'); this.$router.push(this.localePath('/onboarding/onboarding3'));
} }
}).catch((e)=>{ }).catch((e)=>{
this.$toast.error("something went wrong while saving..."); this.$toast.error("something went wrong while saving...");

View File

@ -48,6 +48,15 @@
import {useCounterStore} from '@/stores/counter'; import {useCounterStore} from '@/stores/counter';
import {mapState,mapActions} from "pinia"; import {mapState,mapActions} from "pinia";
export default { export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
mounted() { mounted() {
this.increment(75); this.increment(75);
}, },
@ -69,7 +78,7 @@ export default {
console.log(data); console.log(data);
if(data.success){ if(data.success){
this.$toast.success(data.message); this.$toast.success(data.message);
this.$router.push('/onboarding/onboarding4'); this.$router.push(this.localePath('/onboarding/onboarding4'));
} }
}).catch((e)=>{ }).catch((e)=>{
this.$toast.error("something went wrong while saving..."); this.$toast.error("something went wrong while saving...");

View File

@ -19,7 +19,7 @@
</label> </label>
</a> </a>
<a @click.prevent="saveSetting('Tropics')" href="/letsgo" class="checkmark px-1 pt-2 d-inline-block"> <a @click.prevent="saveSetting('Tropic')" href="/letsgo" class="checkmark px-1 pt-2 d-inline-block">
<input type="radio" class="btn-check checkmark" name="options-outlined" id="danger-outlined1" autocomplete="off"> <input type="radio" class="btn-check checkmark" name="options-outlined" id="danger-outlined1" autocomplete="off">
<label class="btn checklabel ms-0 ms-sm-3 pt-4 px-5" for="danger-outlined1"> <label class="btn checklabel ms-0 ms-sm-3 pt-4 px-5" for="danger-outlined1">
<svg xmlns="http://www.w3.org/2000/svg" height="60" viewBox="0 0 52 52" fill="red"> <svg xmlns="http://www.w3.org/2000/svg" height="60" viewBox="0 0 52 52" fill="red">
@ -71,6 +71,15 @@
import {useCounterStore} from '@/stores/counter'; import {useCounterStore} from '@/stores/counter';
import {mapState,mapActions} from "pinia"; import {mapState,mapActions} from "pinia";
export default { export default {
setup() {
const { t } = useI18n()
const localePath = useLocalePath()
return {
t,
localePath,
}
},
mounted() { mounted() {
this.increment(100); this.increment(100);
}, },
@ -93,7 +102,7 @@ export default {
console.log(data); console.log(data);
if(data.success){ if(data.success){
this.$toast.success(data.message); this.$toast.success(data.message);
this.$router.push('/letsgo'); this.$router.push(this.localePath('letsgo'));
} }
}).catch((e)=>{ }).catch((e)=>{
this.$toast.error("something went wrong while saving..."); this.$toast.error("something went wrong while saving...");

View File

@ -81,9 +81,15 @@ export default {
logoutNow(){ logoutNow(){
this.logout(); this.logout();
this.$axios.post('/api/logout').then(({data})=>{ this.$axios.post('/api/logout').then(({data})=>{
console.log(data,'Logedout'); console.log(data,'Logout');
this.$router.push(this.localePath('/auth/login'));
console.log('Hain');
}).catch((e)=>{
console.log('Ok');
this.$router.push(this.localePath('/auth/login'));
}) })
this.$router.push('/auth/login');
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -2,8 +2,8 @@ import axios, {AxiosInstance, AxiosRequestConfig} from "axios";
import {useUserStore} from '@/stores/user'; import {useUserStore} from '@/stores/user';
import {mapState} from 'pinia'; import {mapState} from 'pinia';
export default defineNuxtPlugin((nuxtApp) => { export default defineNuxtPlugin((nuxtApp) => {
const defaultUrl = "https://admin.mindboost.craveteck.com"; // const defaultUrl = "https://admin.mindboost.craveteck.com";
// const defaultUrl = "http://localhost:8000"; const defaultUrl = "http://localhost:8000";
// Access Pinia state // Access Pinia state