Skip to content

Commit 22fa7a8

Browse files
Merge pull request #9 from kingscode/vuetify-2.0-support
vuetify-2.0-support
2 parents 5de8ae8 + edbd100 commit 22fa7a8

File tree

23 files changed

+133
-126
lines changed

23 files changed

+133
-126
lines changed

generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = (api, options) => {
1414
if (options.useCrud) {
1515
api.extendPackage({
1616
dependencies: {
17-
'@kingscode/vuetify-resource': '^1.0.0',
17+
'@kingscode/vuetify-resource': '^1.1.0',
1818
},
1919
});
2020
api.render('./templates/Crud', {

generator/templates/Authorisation/src/store/modules/Authorization.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
actions: {
1313
login(context, data) {
1414
return new Promise((resolve, reject) => {
15-
$http.post('oauth/token',
15+
window.$http.post('oauth/token',
1616
{
1717
grant_type: 'password',
1818
client_id: process.env.VUE_APP_OAUTH_CLIENT_ID,

generator/templates/Authorisation/src/views/InvitationAccept.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<template v-if="!loading">
77
<v-alert
88
:value="errorMessage !== null"
9-
class="mb-4"
9+
class="mb-10"
1010
transition="fade-transition"
1111
type="error"
1212
>
@@ -34,7 +34,7 @@
3434
v-model="password_confirmation"
3535
></v-text-field>
3636
</template>
37-
<div class="text-xs-center" v-else>
37+
<div class="text-center" v-else>
3838
<v-progress-circular
3939
:size="70"
4040
:width="7"
@@ -105,7 +105,7 @@
105105
},
106106
handleLogin() {
107107
this.$router.push({name: 'login'});
108-
}, serverError(name, v) {
108+
}, serverError(name) {
109109
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
110110
return this.errors[name][0];
111111
}

generator/templates/Authorisation/src/views/Login.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img :src="require('../assets/logo.png')" class="logo">
77
<v-alert
88
:value="errorMessage !== null"
9-
class="mb-4"
9+
class="mb-10"
1010
transition="fade-transition"
1111
type="error"
1212
>
@@ -28,7 +28,7 @@
2828
tabindex="2"
2929
></v-text-field>
3030
</template>
31-
<div class="text-xs-center" v-else>
31+
<div class="text-center" v-else>
3232
<v-progress-circular
3333
:size="70"
3434
:width="7"
@@ -39,7 +39,7 @@
3939
</v-card-text>
4040
<v-card-actions>
4141
<v-spacer></v-spacer>
42-
<v-btn @click="handlePasswordForgotten()" color="accent" flat>Wachtwoord vergeten</v-btn>
42+
<v-btn @click="handlePasswordForgotten()" color="accent" text>Wachtwoord vergeten</v-btn>
4343
<v-btn @click="handleLogin()" tabindex="3" type="submit" color="accent">Inloggen</v-btn>
4444
</v-card-actions>
4545
</v-card>

generator/templates/Authorisation/src/views/PasswordForgotten.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img :src="require('../assets/logo.png')" class="logo">
77
<v-alert
88
:value="successMessage !== null"
9-
class="mb-4"
9+
class="mb-10"
1010
transition="fade-transition"
1111
type="success"
1212
>
@@ -18,7 +18,7 @@
1818
v-model="email"
1919
></v-text-field>
2020
</template>
21-
<div class="text-xs-center" v-else>
21+
<div class="text-center" v-else>
2222
<v-progress-circular
2323
:size="70"
2424
:width="7"
@@ -29,7 +29,7 @@
2929
</v-card-text>
3030
<v-card-actions>
3131
<v-spacer></v-spacer>
32-
<v-btn @click="handleLogin()" color="accent" flat>inloggen</v-btn>
32+
<v-btn @click="handleLogin()" color="accent" text>inloggen</v-btn>
3333
<v-btn @click="handlePasswordForgotten()" type="submit" color="accent">Wachtwoord aanvragen</v-btn>
3434
</v-card-actions>
3535
</v-card>
@@ -81,4 +81,4 @@
8181
display: block;
8282
margin: 0 auto;
8383
}
84-
</style>
84+
</style>

generator/templates/Authorisation/src/views/PasswordReset.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<template v-if="!loading">
77
<v-alert
88
:value="errorMessage !== null"
9-
class="mb-4"
9+
class="mb-10"
1010
transition="fade-transition"
1111
type="error"
1212
>
@@ -34,7 +34,7 @@
3434
v-model="password_confirmation"
3535
></v-text-field>
3636
</template>
37-
<div class="text-xs-center" v-else>
37+
<div class="text-center" v-else>
3838
<v-progress-circular
3939
:size="70"
4040
:width="7"
@@ -105,7 +105,7 @@
105105
},
106106
handleLogin() {
107107
this.$router.push({name: 'login'});
108-
}, serverError(name, v) {
108+
}, serverError(name) {
109109
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
110110
return this.errors[name][0];
111111
}

generator/templates/Authorisation/src/views/Profile.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<v-container>
3-
<v-layout align-center justify-center mt-5>
3+
<v-layout align-center justify-center mt-12>
44
<v-flex xs12 sm10 md8 lg6 xl4>
55
<v-form @submit.prevent="updateProfile" ref="profileForm">
66
<v-subheader class="pa-0">Profiel</v-subheader>
77
<v-card class="themed-color">
8-
<div class="text-xs-center pa-5"
8+
<div class="text-center pa-12"
99
v-if="profileFormLoading">
1010
<v-progress-circular
1111
:width="3"
@@ -46,7 +46,7 @@
4646
<v-form @submit.prevent="updatePassword" ref="passwordForm">
4747
<v-subheader class="pa-0">Wachtwoord</v-subheader>
4848
<v-card class="themed-color">
49-
<div class="text-xs-center pa-5"
49+
<div class="text-center pa-12"
5050
v-if="passwordFormLoading">
5151
<v-progress-circular
5252
:width="3"
@@ -145,7 +145,7 @@
145145
});
146146
});
147147
},
148-
serverError(name, v) {
148+
serverError(name) {
149149
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
150150
return this.errors[name][0];
151151
}

generator/templates/Crud/src/components/BaseForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
clear() {
6363
this.$refs.form.reset();
6464
},
65-
serverError(name, v) {
65+
serverError(name) {
6666
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
6767
return this.errors[name][0];
6868
}

generator/templates/Crud/src/components/forms/User.vue

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
<template>
22
<v-container>
3-
<v-layout align-center justify-center mt-5>
4-
<v-flex lg6 md8 sm10 xl4 xs12>
5-
<v-form ref="form" v-model="valid">
6-
<v-subheader class="pa-0">Gebruiker</v-subheader>
7-
<v-card class="themed-color">
8-
<v-card-text>
9-
<v-text-field
10-
:counter="100"
11-
:rules="[(v) => !!v || 'Naam is verplicht', v => serverError('name', v), (v) => !!v && v.length <= 100 || 'de naam mag maximaal 100 tekens bevatten']"
12-
label="Naam"
13-
class="required"
14-
v-model="values.name"></v-text-field>
15-
<v-text-field
16-
:counter="150"
17-
:rules="[(v) => !!v || 'E-mail is verplicht', v => serverError('email', v), (v) => !!v && v.length <= 100 || 'het e-mailadres mag maximaal 150 tekens bevatten']"
18-
label="E-mail"
19-
hint="Het e-mailadres waarmee de gebruiker gaat inloggen en waarnaar een mail verzonden wordt met instructies om een wachtwoord aan te maken"
20-
class="required"
21-
v-model="values.email"></v-text-field>
22-
</v-card-text>
23-
</v-card>
24-
</v-form>
25-
</v-flex>
26-
</v-layout>
3+
<v-form ref="form" v-model="valid" class="mt-5">
4+
<v-col cols="12" sm="10" offset-sm="1" md="8" offset-md="2" lg="6" offset-lg="3">
5+
<v-subheader class="pa-0">Gebruiker</v-subheader>
6+
<v-card class="themed-color">
7+
<v-card-text>
8+
<v-text-field
9+
:counter="100"
10+
:rules="[(v) => !!v || 'Naam is verplicht', v => serverError('name', v), (v) => !!v && v.length <= 100 || 'de naam mag maximaal 100 tekens bevatten']"
11+
label="Naam"
12+
class="required"
13+
v-model="values.name"></v-text-field>
14+
<v-text-field
15+
:counter="150"
16+
:rules="[(v) => !!v || 'E-mail is verplicht', v => serverError('email', v), (v) => !!v && v.length <= 100 || 'het e-mailadres mag maximaal 150 tekens bevatten']"
17+
label="E-mail"
18+
hint="Het e-mailadres waarmee de gebruiker gaat inloggen en waarnaar een mail verzonden wordt met instructies om een wachtwoord aan te maken"
19+
class="required"
20+
v-model="values.email"></v-text-field>
21+
</v-card-text>
22+
</v-card>
23+
</v-col>
24+
</v-form>
2725
</v-container>
2826
</template>
2927

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NODE_ENV=development
22
VUE_APP_ROOT_API=<%= options.rootUrl %>
3+
VUE_APP_PUBLIC_PATH=
34
<%_ if (options.useAuthorisation) { _%>
45
VUE_APP_OAUTH_CLIENT_ID=<%= options.oauthClientId %>
56
VUE_APP_OAUTH_CLIENT_SECRET=<%= options.oauthSecret %>
6-
<%_ } _%>
7+
<%_ } _%>

0 commit comments

Comments
 (0)