Altra conversione in Typescript , partendo da un progetto di esempio funzionante...
This commit is contained in:
@@ -2,27 +2,27 @@ import { RouteConfig } from 'vue-router';
|
|||||||
|
|
||||||
const routes: RouteConfig[] = [
|
const routes: RouteConfig[] = [
|
||||||
{ path: '/', component: () => import('@/pages/Index.vue'), meta: { name: 'Home' } },
|
{ path: '/', component: () => import('@/pages/Index.vue'), meta: { name: 'Home' } },
|
||||||
{ path: '/signup', component: () => import('@/components/views/login/signup.vue'), meta: { name: 'Registration' } },
|
{ path: '/signup', component: () => import('@/views/login/signup.vue'), meta: { name: 'Registration' } },
|
||||||
{ path: '/signin', component: () => import('@/components/views/login/signin.vue'), meta: { name: 'Login' } },
|
{ path: '/signin', component: () => import('@/views/login/signin.vue'), meta: { name: 'Login' } },
|
||||||
{ path: '/vreg', component: () => import('@/components/views/login/vreg.vue'), meta: { name: 'Verify Reg' } },
|
{ path: '/vreg', component: () => import('@/views/login/vreg.vue'), meta: { name: 'Verify Reg' } },
|
||||||
{
|
{
|
||||||
path: '/requestresetpwd',
|
path: '/requestresetpwd',
|
||||||
component: () => import('@/components/views/login/requestresetpwd.vue'),
|
component: () => import('@/views/login/requestresetpwd.vue'),
|
||||||
meta: { name: 'Reset your Password' }
|
meta: { name: 'Reset your Password' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/updatepwd',
|
path: '/updatepwd',
|
||||||
component: () => import('@/components/views/login/updatepassword.vue'),
|
component: () => import('@/views/login/updatepassword.vue'),
|
||||||
meta: { name: 'Update your Password' }
|
meta: { name: 'Update your Password' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/simpleform',
|
path: '/simpleform',
|
||||||
component: () => import('@/components/views/form/simpleForm/simpleForm.vue'),
|
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
|
||||||
meta: { name: 'SimpleForm' }
|
meta: { name: 'SimpleForm' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/embeeded',
|
path: '/embeeded',
|
||||||
component: () => import('@/components/views/form/embeeded/embeeded.vue'),
|
component: () => import('@/views/form/embeeded/embeeded.vue'),
|
||||||
meta: { name: 'Embeeded' }
|
meta: { name: 'Embeeded' }
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
import cardTodo from './cardTodo.vue'
|
import cardTodo from './cardTodo.vue'
|
||||||
import knobStatistics from './knobStatistics.vue'
|
import knobStatistics from './knobStatistics.vue'
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
import * as types from '../../../../store/mutation-types'
|
import * as types from '../../../store/mutation-types'
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
import Vivus from 'vivus'
|
import Vivus from 'vivus'
|
||||||
import logoData from './logoData'
|
import logoData from './logoData'
|
||||||
import { Platform } from 'quasar'
|
import { Platform } from 'quasar'
|
||||||
@@ -49,10 +49,10 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
import {Errori_MongoDb} from '../../../store/modules/user'
|
import {Errori_MongoDb} from '../../store/modules/user'
|
||||||
|
|
||||||
import {serv_constants} from '../../../store/modules/serv_constants';
|
import {serv_constants} from '../../store/modules/serv_constants';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -62,10 +62,10 @@
|
|||||||
} from 'vuelidate/lib/validators'
|
} from 'vuelidate/lib/validators'
|
||||||
|
|
||||||
import {mapGetters, mapActions} from 'vuex'
|
import {mapGetters, mapActions} from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
|
|
||||||
import {Errori_MongoDb} from '../../../store/modules/user'
|
import {Errori_MongoDb} from '../../store/modules/user'
|
||||||
import {serv_constants} from "../../../store/modules/serv_constants";
|
import {serv_constants} from "../../store/modules/serv_constants";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'
|
||||||
@@ -110,9 +110,9 @@
|
|||||||
import { validationMixin } from 'vuelidate';
|
import { validationMixin } from 'vuelidate';
|
||||||
|
|
||||||
import { mapGetters, mapActions } from 'vuex'
|
import { mapGetters, mapActions } from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
|
|
||||||
import { Errori_MongoDb } from '../../../store/modules/user'
|
import { Errori_MongoDb } from '../../store/modules/user'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import { Loading, QSpinnerFacebook, QSpinnerGears } from 'quasar'
|
import { Loading, QSpinnerFacebook, QSpinnerGears } from 'quasar'
|
||||||
@@ -120,36 +120,6 @@
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
mixins: [validationMixin],
|
mixins: [validationMixin],
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: process.env.VUE_APP_URL,
|
|
||||||
form: {
|
|
||||||
email: process.env.TEST_EMAIL,
|
|
||||||
username: process.env.TEST_USERNAME,
|
|
||||||
password: process.env.TEST_PASSWORD,
|
|
||||||
repeatPassword: process.env.TEST_PASSWORD,
|
|
||||||
dateOfBirth: '',
|
|
||||||
terms: true,
|
|
||||||
},
|
|
||||||
duplicate_email: false,
|
|
||||||
duplicate_username: false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters("user", [
|
|
||||||
'getUsername',
|
|
||||||
'getPassword',
|
|
||||||
'getEmail',
|
|
||||||
'getDateOfBirth',
|
|
||||||
]),
|
|
||||||
...mapGetters("user", [
|
|
||||||
'getUserServer',
|
|
||||||
'getServerCode',
|
|
||||||
]),
|
|
||||||
env () {
|
|
||||||
return env
|
|
||||||
},
|
|
||||||
},
|
|
||||||
validations: {
|
validations: {
|
||||||
isAsync: true,
|
isAsync: true,
|
||||||
form: {
|
form: {
|
||||||
@@ -185,6 +155,36 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
url: process.env.VUE_APP_URL,
|
||||||
|
form: {
|
||||||
|
email: process.env.TEST_EMAIL,
|
||||||
|
username: process.env.TEST_USERNAME,
|
||||||
|
password: process.env.TEST_PASSWORD,
|
||||||
|
repeatPassword: process.env.TEST_PASSWORD,
|
||||||
|
dateOfBirth: '',
|
||||||
|
terms: true,
|
||||||
|
},
|
||||||
|
duplicate_email: false,
|
||||||
|
duplicate_username: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters("user", [
|
||||||
|
'getUsername',
|
||||||
|
'getPassword',
|
||||||
|
'getEmail',
|
||||||
|
'getDateOfBirth',
|
||||||
|
]),
|
||||||
|
...mapGetters("user", [
|
||||||
|
'getUserServer',
|
||||||
|
'getServerCode',
|
||||||
|
]),
|
||||||
|
env () {
|
||||||
|
return env
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions("user", {
|
...mapActions("user", {
|
||||||
signup: types.USER_SIGNUP,
|
signup: types.USER_SIGNUP,
|
||||||
@@ -59,10 +59,10 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
import {Errori_MongoDb} from '../../../store/modules/user'
|
import {Errori_MongoDb} from '../../store/modules/user'
|
||||||
|
|
||||||
import {serv_constants} from '../../../store/modules/serv_constants';
|
import {serv_constants} from '../../store/modules/serv_constants';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import * as types from '../../../store/mutation-types'
|
import * as types from '../../store/mutation-types'
|
||||||
import {Errori_MongoDb} from '../../../store/modules/user'
|
import {Errori_MongoDb} from '../../store/modules/user'
|
||||||
|
|
||||||
import {serv_constants} from '../../../store/modules/serv_constants';
|
import {serv_constants} from '../../store/modules/serv_constants';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Reference in New Issue
Block a user