From 5e4149e3001f55c9ea60f1b1ba79cc2febc5a121 Mon Sep 17 00:00:00 2001 From: Teoni Valois Date: Fri, 31 Mar 2017 10:58:48 -0300 Subject: [PATCH 01/34] Fixing the authentication check function and enhancing task buttons allowing links to be provided. --- src/components/views/Tasks.vue | 2 +- src/demo.js | 4 +++- src/main.js | 5 +++-- src/routes.js | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/views/Tasks.vue b/src/components/views/Tasks.vue index 5fa1d5d1..461580ed 100644 --- a/src/components/views/Tasks.vue +++ b/src/components/views/Tasks.vue @@ -17,7 +17,7 @@
diff --git a/src/demo.js b/src/demo.js index b561d9b2..a47ec15d 100644 --- a/src/demo.js +++ b/src/demo.js @@ -51,7 +51,9 @@ export const timeline = [{ body: 'Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, weebly ning heekya handango imeem plugg dopplr jibjab, movity jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle quora plaxo ideeli hulu weebly balihoo...', buttons: [{ type: 'primary', - message: 'Read more' + message: 'Read more', + href: 'https://github.com/misterGF/CoPilot', + target: '_blank' }] }, { diff --git a/src/main.js b/src/main.js index 07b3a14e..4b42645d 100644 --- a/src/main.js +++ b/src/main.js @@ -31,8 +31,9 @@ var router = new VueRouter({ // Some middleware to help us ensure the user is authenticated. router.beforeEach((to, from, next) => { - // window.console.log('Transition', transition) - if (to.auth && (to.router.app.$store.state.token === 'null')) { + if (to.matched.some(record => record.meta.requiresAuth) && (!router.app.$store.state.token || router.app.$store.state.token === 'null')) { + // this route requires auth, check if logged in + // if not, redirect to login page. window.console.log('Not authenticated') next({ path: '/login', diff --git a/src/routes.js b/src/routes.js index 3a7c42f7..8192e253 100644 --- a/src/routes.js +++ b/src/routes.js @@ -51,7 +51,7 @@ const routes = [ path: 'server', component: ServerView, name: 'Servers', - meta: {description: 'List of our servers'} + meta: {description: 'List of our servers', requiresAuth: true} }, { path: 'repos', component: ReposView, From 34ff2043d1cfba3bb9afd9ead9e7505b488844f8 Mon Sep 17 00:00:00 2001 From: Teoni Valois Date: Fri, 31 Mar 2017 19:11:27 -0300 Subject: [PATCH 02/34] Fixing more issues related to authentication. One is related to a redirect, and another is related to credentials check upon refresh --- src/components/Login.vue | 2 +- src/main.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/Login.vue b/src/components/Login.vue index aa80a550..d418161e 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -81,7 +81,7 @@ export default { window.localStorage.setItem('token', token) } - this.$router.push(data.redirect) + this.$router.push(data.redirect ? data.redirect : '/') } }) .catch(error => { diff --git a/src/main.js b/src/main.js index 4b42645d..4d1d255d 100644 --- a/src/main.js +++ b/src/main.js @@ -46,15 +46,6 @@ router.beforeEach((to, from, next) => { sync(store, router) -// Start out app! -// eslint-disable-next-line no-new -new Vue({ - el: '#root', - router: router, - store: store, - render: h => h(AppView) -}) - // Check local storage to handle refreshes if (window.localStorage) { var localUserString = window.localStorage.getItem('user') || 'null' @@ -65,3 +56,12 @@ if (window.localStorage) { store.commit('SET_TOKEN', window.localStorage.getItem('token')) } } + +// Start out app! +// eslint-disable-next-line no-new +new Vue({ + el: '#root', + router: router, + store: store, + render: h => h(AppView) +}) From 3d8d4f83e5b0f738a7c81d71f00c567e69e708eb Mon Sep 17 00:00:00 2001 From: Alex Baldwin Date: Sat, 27 May 2017 16:14:21 -0400 Subject: [PATCH 03/34] Remove old active link handling function toggleMenu --- src/components/SidebarMenu.vue | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/src/components/SidebarMenu.vue b/src/components/SidebarMenu.vue index 5ce798b8..9fb21551 100644 --- a/src/components/SidebarMenu.vue +++ b/src/components/SidebarMenu.vue @@ -1,25 +1,25 @@ diff --git a/src/components/Login.vue b/src/components/Login.vue index 8c66cc7e..cfc57627 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -147,4 +147,9 @@ body, .input-group input { height: 4em; } + +.input-group-addon i { + height: 15px; + width: 15px; +} From b2f18d778db6ae1b205d120afaa4cb7d324a88cf Mon Sep 17 00:00:00 2001 From: Gil Ferreira Date: Thu, 8 Feb 2018 13:44:10 -0500 Subject: [PATCH 16/34] Adjustment to larger screen for login page --- src/components/Login.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/Login.vue b/src/components/Login.vue index cfc57627..80bac6b8 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -144,8 +144,20 @@ body, height: 4em; } -.input-group input { - height: 4em; +@media (max-width: 1241px) { + .input-group input { + height: 4em; + } +} +@media (min-width: 1242px) { + form { + padding-left: 20em; + padding-right: 20em; + } + + .input-group input { + height: 6em; + } } .input-group-addon i { From 26aac81cf707242c41b8a55878b337cfdc310aa7 Mon Sep 17 00:00:00 2001 From: Gil Ferreira Date: Tue, 27 Feb 2018 10:18:45 -0500 Subject: [PATCH 17/34] Fixed bad node-sass version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a08df4a4..4abfb657 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "lolex": "^1.5.2", "mocha": "^3.2.0", "nightwatch": "^0.9.12", - "node-sass": "^4.7.2", + "node-sass": "^4.5.0", "opn": "^4.0.2", "optimize-css-assets-webpack-plugin": "^1.3.0", "ora": "^1.1.0", From baebe07f91e780a9cf861ed08c4a694a9cbae931 Mon Sep 17 00:00:00 2001 From: Gil Ferreira Date: Tue, 27 Feb 2018 11:35:47 -0500 Subject: [PATCH 18/34] Some fixes to search container --- package.json | 14 ++++++-------- src/components/Sidebar.vue | 34 +++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 4abfb657..97a07170 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,16 @@ { "name": "copilot", "version": "0.5.0", - "description": "A fully responsive admin template based on AdminLTE with vue.js integration", + "description": + "A fully responsive admin template based on AdminLTE with vue.js integration", "author": "Gil Ferreira ", "repository": "https://github.com/misterGF/CoPilot", "license": "MIT", "scripts": { "dev": "node build/dev-server.js", "build": "node build/build.js", - "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", + "unit": + "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", "e2e": "node test/e2e/runner.js", "test": "npm run unit && npm run e2e", "deploy": "netlify deploy dist", @@ -23,7 +25,7 @@ "faker": "^3.1.0", "hideseek": "^0.7.0", "http-server": "^0.9.0", - "jquery": "^3.3.1", + "jquery": "^2.2.2", "moment": "^2.12.0", "vue": "^2.2.2", "vue-date-picker": "^1.0.2", @@ -106,9 +108,5 @@ "node": ">= 4.0.0", "npm": ">= 3.0.0" }, - "browserslist": [ - "> 1%", - "last 2 versions", - "not ie <= 8" - ] + "browserslist": ["> 1%", "last 2 versions", "not ie <= 8"] } diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 9fbdc509..5fcebc58 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -21,15 +21,15 @@