Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = (api, options) => {
if (options.useCrud) {
api.extendPackage({
dependencies: {
'@kingscode/vuetify-resource': '^1.0.0',
'@kingscode/vuetify-resource': '^1.1.0',
},
});
api.render('./templates/Crud', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
actions: {
login(context, data) {
return new Promise((resolve, reject) => {
$http.post('oauth/token',
window.$http.post('oauth/token',
{
grant_type: 'password',
client_id: process.env.VUE_APP_OAUTH_CLIENT_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<template v-if="!loading">
<v-alert
:value="errorMessage !== null"
class="mb-4"
class="mb-10"
transition="fade-transition"
type="error"
>
Expand Down Expand Up @@ -34,7 +34,7 @@
v-model="password_confirmation"
></v-text-field>
</template>
<div class="text-xs-center" v-else>
<div class="text-center" v-else>
<v-progress-circular
:size="70"
:width="7"
Expand Down Expand Up @@ -105,7 +105,7 @@
},
handleLogin() {
this.$router.push({name: 'login'});
}, serverError(name, v) {
}, serverError(name) {
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
return this.errors[name][0];
}
Expand Down
6 changes: 3 additions & 3 deletions generator/templates/Authorisation/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img :src="require('../assets/logo.png')" class="logo">
<v-alert
:value="errorMessage !== null"
class="mb-4"
class="mb-10"
transition="fade-transition"
type="error"
>
Expand All @@ -28,7 +28,7 @@
tabindex="2"
></v-text-field>
</template>
<div class="text-xs-center" v-else>
<div class="text-center" v-else>
<v-progress-circular
:size="70"
:width="7"
Expand All @@ -39,7 +39,7 @@
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn @click="handlePasswordForgotten()" color="accent" flat>Wachtwoord vergeten</v-btn>
<v-btn @click="handlePasswordForgotten()" color="accent" text>Wachtwoord vergeten</v-btn>
<v-btn @click="handleLogin()" tabindex="3" type="submit" color="accent">Inloggen</v-btn>
</v-card-actions>
</v-card>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<img :src="require('../assets/logo.png')" class="logo">
<v-alert
:value="successMessage !== null"
class="mb-4"
class="mb-10"
transition="fade-transition"
type="success"
>
Expand All @@ -18,7 +18,7 @@
v-model="email"
></v-text-field>
</template>
<div class="text-xs-center" v-else>
<div class="text-center" v-else>
<v-progress-circular
:size="70"
:width="7"
Expand All @@ -29,7 +29,7 @@
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn @click="handleLogin()" color="accent" flat>inloggen</v-btn>
<v-btn @click="handleLogin()" color="accent" text>inloggen</v-btn>
<v-btn @click="handlePasswordForgotten()" type="submit" color="accent">Wachtwoord aanvragen</v-btn>
</v-card-actions>
</v-card>
Expand Down Expand Up @@ -81,4 +81,4 @@
display: block;
margin: 0 auto;
}
</style>
</style>
6 changes: 3 additions & 3 deletions generator/templates/Authorisation/src/views/PasswordReset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<template v-if="!loading">
<v-alert
:value="errorMessage !== null"
class="mb-4"
class="mb-10"
transition="fade-transition"
type="error"
>
Expand Down Expand Up @@ -34,7 +34,7 @@
v-model="password_confirmation"
></v-text-field>
</template>
<div class="text-xs-center" v-else>
<div class="text-center" v-else>
<v-progress-circular
:size="70"
:width="7"
Expand Down Expand Up @@ -105,7 +105,7 @@
},
handleLogin() {
this.$router.push({name: 'login'});
}, serverError(name, v) {
}, serverError(name) {
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
return this.errors[name][0];
}
Expand Down
8 changes: 4 additions & 4 deletions generator/templates/Authorisation/src/views/Profile.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<v-container>
<v-layout align-center justify-center mt-5>
<v-layout align-center justify-center mt-12>
<v-flex xs12 sm10 md8 lg6 xl4>
<v-form @submit.prevent="updateProfile" ref="profileForm">
<v-subheader class="pa-0">Profiel</v-subheader>
<v-card class="themed-color">
<div class="text-xs-center pa-5"
<div class="text-center pa-12"
v-if="profileFormLoading">
<v-progress-circular
:width="3"
Expand Down Expand Up @@ -46,7 +46,7 @@
<v-form @submit.prevent="updatePassword" ref="passwordForm">
<v-subheader class="pa-0">Wachtwoord</v-subheader>
<v-card class="themed-color">
<div class="text-xs-center pa-5"
<div class="text-center pa-12"
v-if="passwordFormLoading">
<v-progress-circular
:width="3"
Expand Down Expand Up @@ -145,7 +145,7 @@
});
});
},
serverError(name, v) {
serverError(name) {
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
return this.errors[name][0];
}
Expand Down
2 changes: 1 addition & 1 deletion generator/templates/Crud/src/components/BaseForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
clear() {
this.$refs.form.reset();
},
serverError(name, v) {
serverError(name) {
if (this.errors !== null && typeof this.errors[name] !== 'undefined') {
return this.errors[name][0];
}
Expand Down
46 changes: 22 additions & 24 deletions generator/templates/Crud/src/components/forms/User.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
<template>
<v-container>
<v-layout align-center justify-center mt-5>
<v-flex lg6 md8 sm10 xl4 xs12>
<v-form ref="form" v-model="valid">
<v-subheader class="pa-0">Gebruiker</v-subheader>
<v-card class="themed-color">
<v-card-text>
<v-text-field
:counter="100"
:rules="[(v) => !!v || 'Naam is verplicht', v => serverError('name', v), (v) => !!v && v.length <= 100 || 'de naam mag maximaal 100 tekens bevatten']"
label="Naam"
class="required"
v-model="values.name"></v-text-field>
<v-text-field
:counter="150"
:rules="[(v) => !!v || 'E-mail is verplicht', v => serverError('email', v), (v) => !!v && v.length <= 100 || 'het e-mailadres mag maximaal 150 tekens bevatten']"
label="E-mail"
hint="Het e-mailadres waarmee de gebruiker gaat inloggen en waarnaar een mail verzonden wordt met instructies om een wachtwoord aan te maken"
class="required"
v-model="values.email"></v-text-field>
</v-card-text>
</v-card>
</v-form>
</v-flex>
</v-layout>
<v-form ref="form" v-model="valid" class="mt-5">
<v-col cols="12" sm="10" offset-sm="1" md="8" offset-md="2" lg="6" offset-lg="3">
<v-subheader class="pa-0">Gebruiker</v-subheader>
<v-card class="themed-color">
<v-card-text>
<v-text-field
:counter="100"
:rules="[(v) => !!v || 'Naam is verplicht', v => serverError('name', v), (v) => !!v && v.length <= 100 || 'de naam mag maximaal 100 tekens bevatten']"
label="Naam"
class="required"
v-model="values.name"></v-text-field>
<v-text-field
:counter="150"
:rules="[(v) => !!v || 'E-mail is verplicht', v => serverError('email', v), (v) => !!v && v.length <= 100 || 'het e-mailadres mag maximaal 150 tekens bevatten']"
label="E-mail"
hint="Het e-mailadres waarmee de gebruiker gaat inloggen en waarnaar een mail verzonden wordt met instructies om een wachtwoord aan te maken"
class="required"
v-model="values.email"></v-text-field>
</v-card-text>
</v-card>
</v-col>
</v-form>
</v-container>
</template>

Expand Down
3 changes: 2 additions & 1 deletion generator/templates/Default/_env.development.local
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NODE_ENV=development
VUE_APP_ROOT_API=<%= options.rootUrl %>
VUE_APP_PUBLIC_PATH=
<%_ if (options.useAuthorisation) { _%>
VUE_APP_OAUTH_CLIENT_ID=<%= options.oauthClientId %>
VUE_APP_OAUTH_CLIENT_SECRET=<%= options.oauthSecret %>
<%_ } _%>
<%_ } _%>
1 change: 1 addition & 0 deletions generator/templates/Default/_env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
NODE_ENV=development
VUE_APP_ROOT_API=//url.local/api
VUE_APP_PUBLIC_PATH=
<%_ if (options.useAuthorisation) { _%>
VUE_APP_OAUTH_CLIENT_SECRET=
VUE_APP_OAUTH_CLIENT_ID=
Expand Down
6 changes: 3 additions & 3 deletions generator/templates/Default/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
v-model="menu"
>
<img :src="require('../assets/logo.png')" @click="$router.push({name: 'home'})" class="logo">
<v-divider class="mt-4"/>
<v-divider class="mt-10"/>
<main-menu/>
</v-navigation-drawer>
<v-toolbar app color="primary" dark mfixed>
Expand All @@ -20,7 +20,7 @@
<router-view/>
</v-content>
<v-footer app color="primary" inset>
<span class="white--text pl-3">Created by Kings Code</span>
<span class="white--text pl-6">Created by Kings Code</span>
</v-footer>
</v-app>
</div>
Expand Down Expand Up @@ -59,4 +59,4 @@
.v-dialog--fullscreen > .v-card.v-sheet.theme--light {
background: rgb(248, 249, 250);
}
</style>
</style>
6 changes: 3 additions & 3 deletions generator/templates/Default/src/Views/PageForbidden.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="text-xs-center">
<div class="text-center">
<h1>
Onjuiste autorisatie
</h1>
<div class="my-5 title">Je hebt niet voldoende rechten om deze actie uit te mogen voeren</div>
<div class="my-12 title">Je hebt niet voldoende rechten om deze actie uit te mogen voeren</div>
<v-btn color="primary" @click="home">Terug naar de homepage</v-btn>
</div>
</template>
Expand All @@ -25,4 +25,4 @@

<style scoped lang="scss">

</style>
</style>
6 changes: 3 additions & 3 deletions generator/templates/Default/src/Views/PageNotFound.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="text-xs-center">
<div class="text-center">
<h1>
Pagina niet gevonden
</h1>
<div class="my-5 title">De pagina die u probeert te bereiken is niet gevonden</div>
<div class="my-12 title">De pagina die u probeert te bereiken is niet gevonden</div>
<v-btn color="primary" @click="home">Terug naar de startpagina</v-btn>
</div>
</template>
Expand All @@ -25,4 +25,4 @@

<style scoped lang="scss">

</style>
</style>
Loading