From 8bb178441aee7abd2e62c4cb0282bf0dca89c8f0 Mon Sep 17 00:00:00 2001 From: Neeraj Sharma Date: Wed, 18 Sep 2019 10:25:19 +0530 Subject: [PATCH] implemnt api in social media and gallery --- index.html | 8 +- package-lock.json | 28 + package.json | 1 + src/Services/http.js | 2 +- src/api/menu.js | 20 +- src/main.js | 57 +- src/pages/Authentication/changepassword.vue | 189 +++--- src/pages/Dashboard/dashboard.vue | 372 +++++++++++ src/pages/Gallery/gallery.vue | 979 ++++++++++++++++++++++++++++ src/pages/News/news.vue | 8 +- src/pages/socialMedia/socialMedia.vue | 740 +++++++++++++++++++++ src/router/paths.js | 40 +- 12 files changed, 2311 insertions(+), 133 deletions(-) create mode 100644 src/pages/Dashboard/dashboard.vue create mode 100644 src/pages/Gallery/gallery.vue create mode 100644 src/pages/socialMedia/socialMedia.vue diff --git a/index.html b/index.html index a85cdde..efee792 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,16 @@ - - School Management - + diff --git a/package-lock.json b/package-lock.json index 1511edb..373681e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3691,6 +3691,29 @@ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", "dev": true }, + "dayspan": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/dayspan/-/dayspan-0.12.5.tgz", + "integrity": "sha512-/IkvULBqTRJjUnmKcu3nAGpo04mIszC+ua1ItZadNRxfMKzplmxEljHytOpHdOyl6GF3V7de8oxgep7emeivNA==" + }, + "dayspan-vuetify": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/dayspan-vuetify/-/dayspan-vuetify-0.4.0.tgz", + "integrity": "sha512-YoCFu1hZsvklDQXm8IBRvY00v/B06F/h6yS0k4GALEqrzlqY0EKF4UUdjlr5xMRoKuw7NTA//4V4twOQ8H3D/A==", + "requires": { + "dayspan": "^0.12.2", + "material-design-icons-iconfont": "^3.0.3", + "vue": "^2.3.3", + "vuetify": "^1.3.9" + }, + "dependencies": { + "vuetify": { + "version": "1.5.18", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.18.tgz", + "integrity": "sha512-TLtVYBlajKk+I99rUvQ7c/qlSJ3gqZZKkBaVWXy5bIDFzUyIChIIcaZM7k+J/JumxQYJqnJ9H24rAjddemWalQ==" + } + } + }, "de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", @@ -8927,6 +8950,11 @@ "object-visit": "^1.0.0" } }, + "material-design-icons-iconfont": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/material-design-icons-iconfont/-/material-design-icons-iconfont-3.0.3.tgz", + "integrity": "sha1-FUoQhAR9Ticjf6f1o34Qdc7qbfI=" + }, "math-expression-evaluator": { "version": "1.2.17", "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", diff --git a/package.json b/package.json index aa11a9c..0a4e0e1 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "axios": "^0.18.0", + "dayspan-vuetify": "^0.4.0", "font-awesome": "^4.7.0", "lodash.truncate": "^4.4.2", "moment": "^2.24.0", diff --git a/src/Services/http.js b/src/Services/http.js index 84b30d5..bcd38b0 100644 --- a/src/Services/http.js +++ b/src/Services/http.js @@ -3,7 +3,7 @@ import store from '@/store/store' export default () => { return axios.create({ - // baseURL:'http://192.168.2.221:3002/v1', + // baseURL: 'http://192.168.2.221:3002/v1', baseURL: 'http://13.234.251.173:8001/v1', headers: { Authorization: `Bearer ${store.state.token}` diff --git a/src/api/menu.js b/src/api/menu.js index e7a479a..6f2324c 100644 --- a/src/api/menu.js +++ b/src/api/menu.js @@ -1,5 +1,11 @@ const Menu = [ // { header: 'Apps' }, + // { + // title: 'Dashboard', + // // group: 'apps', + // name: 'Dashboard', + // icon: 'dashboard', + // }, { title: 'Class', // group: 'apps', @@ -38,12 +44,12 @@ const Menu = [ { title: 'Notice Board', name: 'NoticeBoard', - icon: 'contactless', + icon: 'notifications', }, { title: 'News', name: 'news', - icon: 'notification_important', + icon: 'announcement', }, // { // title: 'Reminder', @@ -60,6 +66,16 @@ const Menu = [ name: 'notification', icon: 'notifications_active', }, + { + title: 'Social Media', + name: 'SocialMedia', + icon: 'cloud_upload', + }, + { + title: 'Gallery', + name: 'Gallery', + icon: 'photo', + }, ]; diff --git a/src/main.js b/src/main.js index f711fd8..63ccda4 100644 --- a/src/main.js +++ b/src/main.js @@ -4,40 +4,49 @@ import Vue from 'vue'; import App from './App'; import Vuetify from 'vuetify'; import router from './router'; -import 'font-awesome/css/font-awesome.css'; +import 'font-awesome/css/font-awesome.css'; import './theme/default.styl'; import VeeValidate from 'vee-validate'; import colors from 'vuetify/es5/util/colors'; import Truncate from 'lodash.truncate'; +import DaySpanVuetify from 'dayspan-vuetify' + Vue.config.productionTip = false; // import axios from 'axios'; // import VueAxios from 'vue-axios'; import store from '@/store/store' +import 'vuetify/dist/vuetify.css' +import 'material-design-icons-iconfont/dist/material-design-icons.css' +import 'dayspan-vuetify/dist/lib/dayspan-vuetify.min.css' // Helpers // Global filters // Vue.use(VueAxios, axios); Vue.filter('truncate', Truncate); Vue.use(VeeValidate, { fieldsBagName: 'formFields' }); +Vue.use(DaySpanVuetify, { + methods: { + getDefaultEventColor: () => '#1976d2' + } +}); Vue.use(Vuetify, { - // theme: { - // primary: colors.indigo.base, // #E53935 - // secondary: colors.indigo.lighten4, // #FFCDD2 - // accent: colors.indigo.base // #3F51B5 - // }, - options: { - themeVariations: ['primary', 'secondary', 'accent'], - extra: { - mainToolbar: { - color: 'primary', - }, - sideToolbar: { - }, - sideNav: 'primary', - mainNav: 'primary lighten-1', - bodyBg: '', + // theme: { + // primary: colors.indigo.base, // #E53935 + // secondary: colors.indigo.lighten4, // #FFCDD2 + // accent: colors.indigo.base // #3F51B5 + // }, + options: { + themeVariations: ['primary', 'secondary', 'accent'], + extra: { + mainToolbar: { + color: 'primary', + }, + sideToolbar: {}, + sideNav: 'primary', + mainNav: 'primary lighten-1', + bodyBg: '', + } } - } }); // Bootstrap application components @@ -45,9 +54,9 @@ Vue.use(Vuetify, { /* eslint-disable no-new */ new Vue({ - el: '#app', - router, - store, - components: { App }, - template: '' -}); + el: '#app', + router, + store, + components: { App }, + template: '' +}); \ No newline at end of file diff --git a/src/pages/Authentication/changepassword.vue b/src/pages/Authentication/changepassword.vue index e830e1b..407afc4 100644 --- a/src/pages/Authentication/changepassword.vue +++ b/src/pages/Authentication/changepassword.vue @@ -1,137 +1,140 @@ diff --git a/src/pages/Dashboard/dashboard.vue b/src/pages/Dashboard/dashboard.vue new file mode 100644 index 0000000..ac07017 --- /dev/null +++ b/src/pages/Dashboard/dashboard.vue @@ -0,0 +1,372 @@ + diff --git a/src/pages/Gallery/gallery.vue b/src/pages/Gallery/gallery.vue new file mode 100644 index 0000000..387ce9f --- /dev/null +++ b/src/pages/Gallery/gallery.vue @@ -0,0 +1,979 @@ + + + + \ No newline at end of file diff --git a/src/pages/News/news.vue b/src/pages/News/news.vue index 9d3529a..6acfdd5 100644 --- a/src/pages/News/news.vue +++ b/src/pages/News/news.vue @@ -473,13 +473,7 @@ export default { }, { text: "Action", value: "", sortable: false, align: "center" } ], - desserts: [ - { - image: "https://picsum.photos/500/300?image", - title: "title", - description: "description" - } - ], + desserts: [], editedIndex: -1, addNews: { title: "", diff --git a/src/pages/socialMedia/socialMedia.vue b/src/pages/socialMedia/socialMedia.vue new file mode 100644 index 0000000..995caa4 --- /dev/null +++ b/src/pages/socialMedia/socialMedia.vue @@ -0,0 +1,740 @@ + + + + \ No newline at end of file diff --git a/src/router/paths.js b/src/router/paths.js index 334c949..93c93e3 100644 --- a/src/router/paths.js +++ b/src/router/paths.js @@ -1,6 +1,4 @@ -export default [ - - { +export default [{ path: '*', meta: { public: true, @@ -202,5 +200,41 @@ export default [ /* webpackMode: "lazy-once" */ `@/pages/Subjects/subjects.vue` ) + }, + { + path: '/dashboard', + meta: {}, + name: 'Dashboard', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Dashboard/dashboard.vue` + ) + }, + { + path: '/socialMedia', + meta: {}, + name: 'SocialMedia', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/socialMedia/socialMedia.vue` + ) + }, + { + path: '/gallery', + meta: {}, + name: 'Gallery', + props: (route) => ({ type: route.query.type }), + component: () => + import ( + /* webpackChunkName: "routes" */ + /* webpackMode: "lazy-once" */ + `@/pages/Gallery/gallery.vue` + ) } ]; \ No newline at end of file -- 2.0.0