From 59eb9151618cc27baadb16b2f5e89f694ecbfc95 Mon Sep 17 00:00:00 2001 From: ricardovanlaarhoven Date: Wed, 2 Oct 2019 15:10:12 +0200 Subject: [PATCH 1/7] remove clickable parent menu item --- generator/templates/Default/src/components/MainMenu.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generator/templates/Default/src/components/MainMenu.vue b/generator/templates/Default/src/components/MainMenu.vue index 1b937be..0743221 100644 --- a/generator/templates/Default/src/components/MainMenu.vue +++ b/generator/templates/Default/src/components/MainMenu.vue @@ -6,7 +6,6 @@ \ No newline at end of file + From b042a04e7bd42cec56bb4faba5ee3307f37e5296 Mon Sep 17 00:00:00 2001 From: ricardovanlaarhoven Date: Wed, 23 Oct 2019 14:28:13 +0200 Subject: [PATCH 2/7] vuetify 2.0 support --- generator/index.js | 2 +- .../src/views/InvitationAccept.vue | 2 +- .../Authorisation/src/views/Login.vue | 4 +- .../src/views/PasswordForgotten.vue | 6 +-- .../Authorisation/src/views/PasswordReset.vue | 2 +- .../Authorisation/src/views/Profile.vue | 6 +-- .../Crud/src/components/forms/User.vue | 46 ++++++++--------- .../Default/public/{.htaccess => _htaccess} | 0 generator/templates/Default/src/App.vue | 6 +-- .../Default/src/Views/PageForbidden.vue | 4 +- .../Default/src/Views/PageNotFound.vue | 4 +- .../Default/src/components/MainMenu.vue | 50 +++++++++---------- .../Default/src/components/ProfileMenu.vue | 16 +++--- generator/templates/Default/src/newmain.js | 2 +- .../templates/Default/src/plugins/vuetify.js | 34 ++++++++----- .../TemplateLoader/src/templates/Default.vue | 6 +-- 16 files changed, 99 insertions(+), 91 deletions(-) rename generator/templates/Default/public/{.htaccess => _htaccess} (100%) diff --git a/generator/index.js b/generator/index.js index 23411d6..818342b 100644 --- a/generator/index.js +++ b/generator/index.js @@ -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', { diff --git a/generator/templates/Authorisation/src/views/InvitationAccept.vue b/generator/templates/Authorisation/src/views/InvitationAccept.vue index 0353270..f3ac4de 100644 --- a/generator/templates/Authorisation/src/views/InvitationAccept.vue +++ b/generator/templates/Authorisation/src/views/InvitationAccept.vue @@ -6,7 +6,7 @@ @@ -25,4 +25,4 @@ \ No newline at end of file + diff --git a/generator/templates/Default/src/components/MainMenu.vue b/generator/templates/Default/src/components/MainMenu.vue index 0743221..ac0cd25 100644 --- a/generator/templates/Default/src/components/MainMenu.vue +++ b/generator/templates/Default/src/components/MainMenu.vue @@ -1,8 +1,8 @@ @@ -47,4 +47,4 @@ \ No newline at end of file + diff --git a/generator/templates/Default/src/newmain.js b/generator/templates/Default/src/newmain.js index af05a7d..85e89c3 100644 --- a/generator/templates/Default/src/newmain.js +++ b/generator/templates/Default/src/newmain.js @@ -1,7 +1,7 @@ import '@babel/polyfill' import Vue from 'vue' import API from './API.js'; -import './plugins/vuetify' +import vuetify from './plugins/vuetify'; <%_ if (options.useCrud) { _%> import VuetifyResource from '@kingscode/vuetify-resource'; <%_ } _%> diff --git a/generator/templates/Default/src/plugins/vuetify.js b/generator/templates/Default/src/plugins/vuetify.js index ca9551e..b5440d2 100644 --- a/generator/templates/Default/src/plugins/vuetify.js +++ b/generator/templates/Default/src/plugins/vuetify.js @@ -4,24 +4,34 @@ import '@fortawesome/fontawesome-pro/css/all.css'; import 'vuetify/dist/vuetify.min.css'; import nl from 'vuetify/es5/locale/nl'; -Vue.use(Vuetify, { - customProperties: true, - iconfont: 'fa', +Vue.use(Vuetify); +export default new Vuetify({ icons: { - 'close': 'fas fa-times', - 'menu': 'fas fa-bars', - 'delete': 'fas fa-trash', - 'add': 'fas fa-plus', - 'edit': 'fas fa-pencil-alt', - 'search': 'fas fa-search', + iconfont: 'fa', + values: { + 'close': 'far fa-times', + 'menu': 'far fa-bars', + 'delete': 'far fa-trash-alt', + 'add': 'far fa-plus', + 'edit': 'far fa-pencil-alt', + 'search': 'far fa-search', + }, }, + customProperties: true, lang: { locales: {nl}, current: 'nl', }, theme: { - primary: '#002F4E', - secondary: '#000000', - accent: '#FFD0B1', + options: { + customProperties: true, + }, + themes: { + light: { + primary: '#002F4E', + secondary: '#000000', + accent: '#FFD0B1', + }, + }, }, }); diff --git a/generator/templates/TemplateLoader/src/templates/Default.vue b/generator/templates/TemplateLoader/src/templates/Default.vue index baf611a..4e147b9 100644 --- a/generator/templates/TemplateLoader/src/templates/Default.vue +++ b/generator/templates/TemplateLoader/src/templates/Default.vue @@ -7,7 +7,7 @@ v-model="menu" > - + @@ -20,7 +20,7 @@ - Created by Kings Code + Created by Kings Code @@ -59,4 +59,4 @@ .v-dialog--fullscreen > .v-card.v-sheet.theme--light { background: rgb(248, 249, 250); } - \ No newline at end of file + From 9735f7aa55cdb139a9e65f57549acfdf353dcacd Mon Sep 17 00:00:00 2001 From: ricardovanlaarhoven Date: Wed, 23 Oct 2019 16:25:58 +0200 Subject: [PATCH 3/7] add vuetify 2.0 support --- .../Authorisation/src/store/modules/Authorization.js | 2 +- .../Authorisation/src/views/InvitationAccept.vue | 4 ++-- .../templates/Authorisation/src/views/Login.vue | 2 +- .../Authorisation/src/views/PasswordForgotten.vue | 2 +- .../Authorisation/src/views/PasswordReset.vue | 4 ++-- .../templates/Authorisation/src/views/Profile.vue | 6 +++--- generator/templates/Crud/src/components/BaseForm.vue | 2 +- generator/templates/Default/_env.development.local | 3 ++- generator/templates/Default/_env.example | 1 + .../Default/src/components/PaginatedAutocomplete.vue | 2 +- .../templates/Default/src/components/ProfileMenu.vue | 12 +++++++----- generator/templates/Default/src/newmain.js | 1 + generator/templates/Default/src/views/Home.vue | 7 +++++-- .../TemplateLoader/src/templates/Authorisation.vue | 4 ++-- .../TemplateLoader/src/templates/Default.vue | 8 ++++---- 15 files changed, 34 insertions(+), 26 deletions(-) diff --git a/generator/templates/Authorisation/src/store/modules/Authorization.js b/generator/templates/Authorisation/src/store/modules/Authorization.js index 7c07332..0a6747b 100644 --- a/generator/templates/Authorisation/src/store/modules/Authorization.js +++ b/generator/templates/Authorisation/src/store/modules/Authorization.js @@ -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, diff --git a/generator/templates/Authorisation/src/views/InvitationAccept.vue b/generator/templates/Authorisation/src/views/InvitationAccept.vue index f3ac4de..8d6ba53 100644 --- a/generator/templates/Authorisation/src/views/InvitationAccept.vue +++ b/generator/templates/Authorisation/src/views/InvitationAccept.vue @@ -34,7 +34,7 @@ v-model="password_confirmation" > -
+
-
+
-
+
-
+
Profiel -
Wachtwoord -
+VUE_APP_PUBLIC_PATH= <%_ if (options.useAuthorisation) { _%> VUE_APP_OAUTH_CLIENT_ID=<%= options.oauthClientId %> VUE_APP_OAUTH_CLIENT_SECRET=<%= options.oauthSecret %> -<%_ } _%> \ No newline at end of file +<%_ } _%> diff --git a/generator/templates/Default/_env.example b/generator/templates/Default/_env.example index 263f27a..7c5a76f 100644 --- a/generator/templates/Default/_env.example +++ b/generator/templates/Default/_env.example @@ -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= diff --git a/generator/templates/Default/src/components/PaginatedAutocomplete.vue b/generator/templates/Default/src/components/PaginatedAutocomplete.vue index 00098c8..fa014f8 100644 --- a/generator/templates/Default/src/components/PaginatedAutocomplete.vue +++ b/generator/templates/Default/src/components/PaginatedAutocomplete.vue @@ -8,7 +8,7 @@ v-if="enabled" > diff --git a/generator/templates/Default/src/components/ProfileMenu.vue b/generator/templates/Default/src/components/ProfileMenu.vue index 26f0a64..c160d75 100644 --- a/generator/templates/Default/src/components/ProfileMenu.vue +++ b/generator/templates/Default/src/components/ProfileMenu.vue @@ -5,11 +5,13 @@ offset-y transition="slide-y-transition" > - - - fa-user - - + Profiel diff --git a/generator/templates/Default/src/newmain.js b/generator/templates/Default/src/newmain.js index 85e89c3..bed1da0 100644 --- a/generator/templates/Default/src/newmain.js +++ b/generator/templates/Default/src/newmain.js @@ -22,6 +22,7 @@ Vue.config.productionTip = false new Vue({ router, + vuetify, <%_ if (options.useAuthorisation) { _%> store, <%_ } _%> diff --git a/generator/templates/Default/src/views/Home.vue b/generator/templates/Default/src/views/Home.vue index e1d86b7..918236f 100644 --- a/generator/templates/Default/src/views/Home.vue +++ b/generator/templates/Default/src/views/Home.vue @@ -1,5 +1,8 @@ From edbd1008dc421781a45a8b1fbc6b599aee1bdf58 Mon Sep 17 00:00:00 2001 From: ricardovanlaarhoven Date: Wed, 23 Oct 2019 16:59:36 +0200 Subject: [PATCH 6/7] text-xs-center becomes text-center --- generator/templates/Default/src/Views/PageForbidden.vue | 2 +- generator/templates/Default/src/Views/PageNotFound.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/templates/Default/src/Views/PageForbidden.vue b/generator/templates/Default/src/Views/PageForbidden.vue index f60224d..321fbe0 100644 --- a/generator/templates/Default/src/Views/PageForbidden.vue +++ b/generator/templates/Default/src/Views/PageForbidden.vue @@ -1,5 +1,5 @@