From 2ccfc3f93133ec7777682c992b42a74782a601de Mon Sep 17 00:00:00 2001 From: Alex Mendes Date: Sun, 5 Nov 2017 20:26:32 +0000 Subject: [PATCH 01/45] Add margin to app navbar brand --- components/navbars/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/navbars/App.vue b/components/navbars/App.vue index 27b76016..e0b55845 100644 --- a/components/navbars/App.vue +++ b/components/navbars/App.vue @@ -5,7 +5,7 @@ :sticky="sticky" :fixed="fixed"> - + Date: Sun, 5 Nov 2017 23:58:41 +0000 Subject: [PATCH 06/45] Move project and site admin dashboards --- components/navbars/App.vue | 4 +- components/navbars/Collection.vue | 4 +- ...hboard.vue => admin-project-dashboard.vue} | 10 ++-- ...dashboard.vue => admin-site-dashboard.vue} | 12 ++-- .../project/_short_name/collection.vue | 2 +- .../project/_short_name/settings.vue | 2 +- .../{ => admin}/project/_short_name/tags.vue | 2 +- .../project/_short_name/thumbnail.vue | 2 +- pages/{ => admin}/project/open.vue | 4 +- .../{ => site}/announcements/_id/update.vue | 2 +- .../admin/{ => site}/announcements/index.vue | 6 +- pages/admin/{ => site}/announcements/new.vue | 6 +- .../{ => site}/collections/_id/update.vue | 4 +- pages/admin/{ => site}/collections/index.vue | 6 +- pages/admin/{ => site}/collections/new.vue | 6 +- pages/admin/{ => site}/dashboard.vue | 2 +- pages/admin/{ => site}/featured.vue | 2 +- pages/admin/{ => site}/jobs.vue | 2 +- pages/admin/{ => site}/users.vue | 2 +- test/fixtures/routes.js | 56 +++++++++---------- .../components/navbars/dashboard.spec.js | 4 +- 21 files changed, 70 insertions(+), 70 deletions(-) rename layouts/{project-dashboard.vue => admin-project-dashboard.vue} (86%) rename layouts/{admin-dashboard.vue => admin-site-dashboard.vue} (79%) rename pages/{ => admin}/project/_short_name/collection.vue (98%) rename pages/{ => admin}/project/_short_name/settings.vue (98%) rename pages/{ => admin}/project/_short_name/tags.vue (98%) rename pages/{ => admin}/project/_short_name/thumbnail.vue (96%) rename pages/{ => admin}/project/open.vue (93%) rename pages/admin/{ => site}/announcements/_id/update.vue (99%) rename pages/admin/{ => site}/announcements/index.vue (94%) rename pages/admin/{ => site}/announcements/new.vue (94%) rename pages/admin/{ => site}/collections/_id/update.vue (99%) rename pages/admin/{ => site}/collections/index.vue (95%) rename pages/admin/{ => site}/collections/new.vue (95%) rename pages/admin/{ => site}/dashboard.vue (93%) rename pages/admin/{ => site}/featured.vue (98%) rename pages/admin/{ => site}/jobs.vue (95%) rename pages/admin/{ => site}/users.vue (99%) diff --git a/components/navbars/App.vue b/components/navbars/App.vue index e0b55845..6787cf45 100644 --- a/components/navbars/App.vue +++ b/components/navbars/App.vue @@ -48,13 +48,13 @@ Project Admin Site Admin diff --git a/components/navbars/Collection.vue b/components/navbars/Collection.vue index b3019efc..b63ac0b0 100644 --- a/components/navbars/Collection.vue +++ b/components/navbars/Collection.vue @@ -125,13 +125,13 @@ Project Admin Site Admin diff --git a/layouts/project-dashboard.vue b/layouts/admin-project-dashboard.vue similarity index 86% rename from layouts/project-dashboard.vue rename to layouts/admin-project-dashboard.vue index 03c595c9..110ea0ac 100644 --- a/layouts/project-dashboard.vue +++ b/layouts/admin-project-dashboard.vue @@ -16,7 +16,7 @@ export default { { label: 'Open Project', link: { - name: 'project-open' + name: 'admin-project-open' } } ] @@ -37,7 +37,7 @@ export default { { label: 'Settings', link: { - name: 'project-short_name-settings', + name: 'admin-project-short_name-settings', params: { short_name: this.project.short_name } @@ -46,7 +46,7 @@ export default { { label: 'Tags', link: { - name: 'project-short_name-tags', + name: 'admin-project-short_name-tags', params: { short_name: this.project.short_name } @@ -55,7 +55,7 @@ export default { { label: 'Collection', link: { - name: 'project-short_name-collection', + name: 'admin-project-short_name-collection', params: { short_name: this.project.short_name } @@ -64,7 +64,7 @@ export default { { label: 'Thumbnail', link: { - name: 'project-short_name-thumbnail', + name: 'admin-project-short_name-thumbnail', params: { short_name: this.project.short_name } diff --git a/layouts/admin-dashboard.vue b/layouts/admin-site-dashboard.vue similarity index 79% rename from layouts/admin-dashboard.vue rename to layouts/admin-site-dashboard.vue index 7e2776cd..102b3a1c 100644 --- a/layouts/admin-dashboard.vue +++ b/layouts/admin-site-dashboard.vue @@ -15,37 +15,37 @@ export default { { label: 'Dashboard', link: { - name: 'admin-dashboard' + name: 'admin-site-dashboard' } }, { label: 'Featured Projects', link: { - name: 'admin-featured' + name: 'admin-site-featured' } }, { label: 'Collections', link: { - name: 'admin-collections' + name: 'admin-site-collections' } }, { label: 'Users', link: { - name: 'admin-users' + name: 'admin-site-users' } }, { label: 'Announcements', link: { - name: 'admin-announcements' + name: 'admin-site-announcements' } }, { label: 'Background Tasks', link: { - name: 'admin-jobs' + name: 'admin-site-jobs' } } ] diff --git a/pages/project/_short_name/collection.vue b/pages/admin/project/_short_name/collection.vue similarity index 98% rename from pages/project/_short_name/collection.vue rename to pages/admin/project/_short_name/collection.vue index ed21e3ce..59307d97 100644 --- a/pages/project/_short_name/collection.vue +++ b/pages/admin/project/_short_name/collection.vue @@ -35,7 +35,7 @@ import { fetchProjectByName } from '@/mixins/fetchProjectByName' import InfiniteLoadingTable from '@/components/tables/InfiniteLoading' export default { - layout: 'project-dashboard', + layout: 'admin-project-dashboard', mixins: [ fetchProjectByName, notifications ], diff --git a/pages/project/_short_name/settings.vue b/pages/admin/project/_short_name/settings.vue similarity index 98% rename from pages/project/_short_name/settings.vue rename to pages/admin/project/_short_name/settings.vue index 60188c97..35f9c93c 100644 --- a/pages/project/_short_name/settings.vue +++ b/pages/admin/project/_short_name/settings.vue @@ -36,7 +36,7 @@ import { fetchProjectByName } from '@/mixins/fetchProjectByName' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'project-dashboard', + layout: 'admin-project-dashboard', mixins: [ fetchProjectByName ], diff --git a/pages/project/_short_name/tags.vue b/pages/admin/project/_short_name/tags.vue similarity index 98% rename from pages/project/_short_name/tags.vue rename to pages/admin/project/_short_name/tags.vue index 92a93491..dc1c3bcd 100644 --- a/pages/project/_short_name/tags.vue +++ b/pages/admin/project/_short_name/tags.vue @@ -52,7 +52,7 @@ import { computeTags } from '@/mixins/computeTags' import { notifications } from '@/mixins/notifications' export default { - layout: 'project-dashboard', + layout: 'admin-project-dashboard', mixins: [ fetchProjectAndCollection, computeTags, notifications ], diff --git a/pages/project/_short_name/thumbnail.vue b/pages/admin/project/_short_name/thumbnail.vue similarity index 96% rename from pages/project/_short_name/thumbnail.vue rename to pages/admin/project/_short_name/thumbnail.vue index 7fb7d692..1a8dc2bb 100644 --- a/pages/project/_short_name/thumbnail.vue +++ b/pages/admin/project/_short_name/thumbnail.vue @@ -17,7 +17,7 @@ import { fetchProjectAndCollection } from '@/mixins/fetchProjectAndCollection' import ImageUploadForm from '@/components/forms/ImageUpload' export default { - layout: 'project-dashboard', + layout: 'admin-project-dashboard', mixins: [ fetchProjectAndCollection ], diff --git a/pages/project/open.vue b/pages/admin/project/open.vue similarity index 93% rename from pages/project/open.vue rename to pages/admin/project/open.vue index 15997f03..3c4aed35 100644 --- a/pages/project/open.vue +++ b/pages/admin/project/open.vue @@ -11,7 +11,7 @@ size="sm" block :to="{ - name: 'project-short_name-settings', + name: 'admin-project-short_name-settings', params: { short_name: project.item.short_name } @@ -27,7 +27,7 @@ import InfiniteLoadingTable from '@/components/tables/InfiniteLoading' export default { - layout: 'project-dashboard', + layout: 'admin-project-dashboard', fetch ({ store }) { store.dispatch('UPDATE_CURRENT_PROJECT', {}) diff --git a/pages/admin/announcements/_id/update.vue b/pages/admin/site/announcements/_id/update.vue similarity index 99% rename from pages/admin/announcements/_id/update.vue rename to pages/admin/site/announcements/_id/update.vue index 4a972c5b..469631d3 100644 --- a/pages/admin/announcements/_id/update.vue +++ b/pages/admin/site/announcements/_id/update.vue @@ -58,7 +58,7 @@ import ImageUploadForm from '@/components/forms/ImageUpload' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', mixins: [ notifications ], diff --git a/pages/admin/announcements/index.vue b/pages/admin/site/announcements/index.vue similarity index 94% rename from pages/admin/announcements/index.vue rename to pages/admin/site/announcements/index.vue index 6bb0f963..4838cb30 100644 --- a/pages/admin/announcements/index.vue +++ b/pages/admin/site/announcements/index.vue @@ -17,7 +17,7 @@ variant="success" size="sm" :to="{ - name: 'admin-announcements-new' + name: 'admin-site-announcements-new' }"> New @@ -35,7 +35,7 @@ size="sm" block :to="{ - name: 'admin-announcements-id-update', + name: 'admin-site-announcements-id-update', params: { id: announcement.item.id } @@ -60,7 +60,7 @@ import InfiniteLoadingTable from '@/components/tables/InfiniteLoading' import { deleteDomainObject } from '@/mixins/deleteDomainObject' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', mixins: [ deleteDomainObject ], diff --git a/pages/admin/announcements/new.vue b/pages/admin/site/announcements/new.vue similarity index 94% rename from pages/admin/announcements/new.vue rename to pages/admin/site/announcements/new.vue index 0e12c6ac..909046e3 100644 --- a/pages/admin/announcements/new.vue +++ b/pages/admin/site/announcements/new.vue @@ -29,7 +29,7 @@ import ImageUploadForm from '@/components/forms/ImageUpload' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', mixins: [ notifications ], @@ -95,7 +95,7 @@ export default { message: 'Announcement created' }) this.$router.push({ - name: 'admin-announcements-id-update', + name: 'admin-site-announcements-id-update', params: { id: data.id } @@ -106,7 +106,7 @@ export default { * Handle cancel. */ onCancel () { - this.$router.push({ name: 'admin-announcements' }) + this.$router.push({ name: 'admin-site-announcements' }) } } } diff --git a/pages/admin/collections/_id/update.vue b/pages/admin/site/collections/_id/update.vue similarity index 99% rename from pages/admin/collections/_id/update.vue rename to pages/admin/site/collections/_id/update.vue index f40f26dc..f2fad6e7 100644 --- a/pages/admin/collections/_id/update.vue +++ b/pages/admin/site/collections/_id/update.vue @@ -152,7 +152,7 @@ import pick from 'lodash/pick' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', mixins: [ fetchCollectionById, notifications ], @@ -389,7 +389,7 @@ export default { * Handle form cancel. */ onCancel () { - this.$router.push({ name: 'admin-collections' }) + this.$router.push({ name: 'admin-site-collections' }) }, /** diff --git a/pages/admin/collections/index.vue b/pages/admin/site/collections/index.vue similarity index 95% rename from pages/admin/collections/index.vue rename to pages/admin/site/collections/index.vue index 0b81233f..9938bd54 100644 --- a/pages/admin/collections/index.vue +++ b/pages/admin/site/collections/index.vue @@ -17,7 +17,7 @@ variant="success" size="sm" :to="{ - name: 'admin-collections-new' + name: 'admin-site-collections-new' }"> New @@ -44,7 +44,7 @@ size="sm" block :to="{ - name: 'admin-collections-id-update', + name: 'admin-site-collections-id-update', params: { id: collection.item.id } @@ -71,7 +71,7 @@ import { deleteDomainObject } from '@/mixins/deleteDomainObject' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', data () { return { diff --git a/pages/admin/collections/new.vue b/pages/admin/site/collections/new.vue similarity index 95% rename from pages/admin/collections/new.vue rename to pages/admin/site/collections/new.vue index 15b9c2cb..085c2cd2 100644 --- a/pages/admin/collections/new.vue +++ b/pages/admin/site/collections/new.vue @@ -25,7 +25,7 @@ import { notifications } from '@/mixins/notifications' import PybossaForm from '@/components/forms/PybossaForm' export default { - layout: 'admin-dashboard', + layout: 'admin-site-dashboard', data () { return { @@ -123,7 +123,7 @@ export default { message: 'Collection created' }) this.$router.push({ - name: 'admin-collections-id-update', + name: 'admin-site-collections-id-update', params: { id: category.id } @@ -134,7 +134,7 @@ export default { * Handle cancel. */ onCancel () { - this.$router.push({ name: 'admin-collections' }) + this.$router.push({ name: 'admin-site-collections' }) } }, diff --git a/pages/admin/dashboard.vue b/pages/admin/site/dashboard.vue similarity index 93% rename from pages/admin/dashboard.vue rename to pages/admin/site/dashboard.vue index 1ce55352..700725c7 100644 --- a/pages/admin/dashboard.vue +++ b/pages/admin/site/dashboard.vue @@ -15,7 +15,7 @@ diff --git a/layouts/admin-site-dashboard.vue b/layouts/admin-site-dashboard.vue index 102b3a1c..cf191dda 100644 --- a/layouts/admin-site-dashboard.vue +++ b/layouts/admin-site-dashboard.vue @@ -24,12 +24,6 @@ export default { name: 'admin-site-featured' } }, - { - label: 'Collections', - link: { - name: 'admin-site-collections' - } - }, { label: 'Users', link: { diff --git a/mixins/fetchCollectionById.js b/mixins/fetchCollectionById.js deleted file mode 100644 index 358423e9..00000000 --- a/mixins/fetchCollectionById.js +++ /dev/null @@ -1,20 +0,0 @@ -import isEmpty from 'lodash/isEmpty' -import { setCollectionDefaults } from '@/utils/setCollectionDefaults' - -/** - * Fetch a collection by the short_name param and update the store. - */ -export const fetchCollectionById = { - fetch ({ params, app, error, store }) { - return app.$axios.$get(`/api/category/${params.id}`).then(data => { - if (isEmpty(data)) { - error(new Error({ statusCode: 404 })) - return - } - setCollectionDefaults(data) - store.dispatch('UPDATE_CURRENT_COLLECTION', data) - }).catch(err => { - error(err) - }) - } -} diff --git a/package-lock.json b/package-lock.json index 24f4e1b7..9359db41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5051,6 +5051,22 @@ } } }, + "gitbook-plugin-hints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/gitbook-plugin-hints/-/gitbook-plugin-hints-1.0.2.tgz", + "integrity": "sha1-5liZg+PqhHSfFtxjHigvr9Rew5s=", + "dev": true + }, + "gitbook-plugin-summary": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/gitbook-plugin-summary/-/gitbook-plugin-summary-0.2.0.tgz", + "integrity": "sha512-/MfOWYvBuiv9lKZ2t0kL76Tdcfa4pCh9Bq7s5vfTwiSQr7W31U9POUNWJv9nC5I9fERqZySPzGXtzjLpjucBiQ==", + "dev": true, + "requires": { + "glob": "7.1.2", + "markdown-parser": "0.0.8" + } + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -7275,6 +7291,12 @@ "marked": "0.3.6" } }, + "markdown-parser": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/markdown-parser/-/markdown-parser-0.0.8.tgz", + "integrity": "sha1-bjaDXycKol7B2isPJgFPVfiE7P0=", + "dev": true + }, "marked": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", diff --git a/package.json b/package.json index d1123d84..5117340b 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "eslint-plugin-node": "^5.1.1", "eslint-plugin-promise": "^3.5.0", "eslint-plugin-standard": "^3.0.1", + "gitbook-plugin-hints": "^1.0.2", "html-loader": "^0.5.1", "jest": "^21.2.1", "jest-serializer-html": "^4.0.0", diff --git a/pages/admin/collection/_short_name/content.vue b/pages/admin/collection/_short_name/content.vue new file mode 100644 index 00000000..1b19c1b9 --- /dev/null +++ b/pages/admin/collection/_short_name/content.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/pages/admin/collection/_short_name/delete.vue b/pages/admin/collection/_short_name/delete.vue new file mode 100644 index 00000000..6984c059 --- /dev/null +++ b/pages/admin/collection/_short_name/delete.vue @@ -0,0 +1,70 @@ + + + diff --git a/pages/admin/site/featured.vue b/pages/admin/collection/_short_name/featured.vue similarity index 61% rename from pages/admin/site/featured.vue rename to pages/admin/collection/_short_name/featured.vue index d57b6828..ee8ee9aa 100644 --- a/pages/admin/site/featured.vue +++ b/pages/admin/collection/_short_name/featured.vue @@ -1,48 +1,47 @@ diff --git a/pages/admin/collection/_short_name/tags.vue b/pages/admin/collection/_short_name/tags.vue new file mode 100644 index 00000000..6600a72a --- /dev/null +++ b/pages/admin/collection/_short_name/tags.vue @@ -0,0 +1,201 @@ + + + diff --git a/pages/admin/collection/_short_name/terminology.vue b/pages/admin/collection/_short_name/terminology.vue new file mode 100644 index 00000000..a06f2ce4 --- /dev/null +++ b/pages/admin/collection/_short_name/terminology.vue @@ -0,0 +1,99 @@ + + + diff --git a/pages/admin/collection/index.vue b/pages/admin/collection/index.vue new file mode 100644 index 00000000..f3838185 --- /dev/null +++ b/pages/admin/collection/index.vue @@ -0,0 +1,137 @@ + + + diff --git a/pages/admin/collection/new.vue b/pages/admin/collection/new.vue new file mode 100644 index 00000000..a10af78a --- /dev/null +++ b/pages/admin/collection/new.vue @@ -0,0 +1,104 @@ + + + diff --git a/pages/admin/site/collections/_id/update.vue b/pages/admin/site/collections/_id/update.vue deleted file mode 100644 index f2fad6e7..00000000 --- a/pages/admin/site/collections/_id/update.vue +++ /dev/null @@ -1,534 +0,0 @@ - - - - - diff --git a/pages/admin/site/collections/index.vue b/pages/admin/site/collections/index.vue deleted file mode 100644 index 9938bd54..00000000 --- a/pages/admin/site/collections/index.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - diff --git a/pages/admin/site/collections/new.vue b/pages/admin/site/collections/new.vue deleted file mode 100644 index 085c2cd2..00000000 --- a/pages/admin/site/collections/new.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - From 0378c12828fc64c843d3f9b3b6aff0d7d23df8b4 Mon Sep 17 00:00:00 2001 From: Alex Mendes Date: Mon, 6 Nov 2017 03:57:28 +0000 Subject: [PATCH 08/45] Add dashboard nav transition --- assets/style/partials/_transitions.scss | 11 +++++++ components/navbars/Dashboard.vue | 42 +++++++++++++++++++++++-- package-lock.json | 21 +++---------- package.json | 1 + 4 files changed, 57 insertions(+), 18 deletions(-) diff --git a/assets/style/partials/_transitions.scss b/assets/style/partials/_transitions.scss index e01d0fba..8b7185cf 100644 --- a/assets/style/partials/_transitions.scss +++ b/assets/style/partials/_transitions.scss @@ -22,3 +22,14 @@ transform: translateY(20px); opacity: 0; } + +.slide-in-enter-active, +.slide-in-leave-active { + transition: opacity 350ms ease-in; +} + +.slide-in-enter, +.slide-in-leave-to { + opacity: 0; +} + diff --git a/components/navbars/Dashboard.vue b/components/navbars/Dashboard.vue index e991c996..280fc5dd 100644 --- a/components/navbars/Dashboard.vue +++ b/components/navbars/Dashboard.vue @@ -10,20 +10,32 @@ {{ localConfig.brand }} - + + {{ item.label }} - + + diff --git a/package-lock.json b/package-lock.json index 9359db41..567be903 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5057,16 +5057,6 @@ "integrity": "sha1-5liZg+PqhHSfFtxjHigvr9Rew5s=", "dev": true }, - "gitbook-plugin-summary": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/gitbook-plugin-summary/-/gitbook-plugin-summary-0.2.0.tgz", - "integrity": "sha512-/MfOWYvBuiv9lKZ2t0kL76Tdcfa4pCh9Bq7s5vfTwiSQr7W31U9POUNWJv9nC5I9fERqZySPzGXtzjLpjucBiQ==", - "dev": true, - "requires": { - "glob": "7.1.2", - "markdown-parser": "0.0.8" - } - }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -7291,12 +7281,6 @@ "marked": "0.3.6" } }, - "markdown-parser": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/markdown-parser/-/markdown-parser-0.0.8.tgz", - "integrity": "sha1-bjaDXycKol7B2isPJgFPVfiE7P0=", - "dev": true - }, "marked": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", @@ -12597,6 +12581,11 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "velocity-animate": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/velocity-animate/-/velocity-animate-1.5.0.tgz", + "integrity": "sha1-/Idx2N/hE2/wKnB+EPuwlXxLAw8=" + }, "vendors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.1.tgz", diff --git a/package.json b/package.json index 5117340b..555fa794 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "raven-js": "^3.19.1", "source-map-support": "^0.4.15", "sweetalert2": "^6.11.0", + "velocity-animate": "^1.5.0", "vue": "~2.4.4", "vue-awesome": "^2.3.3", "vue-chartist": "^2.1.1", From 1a517679e3f4b2e7dff29f64cf49cbdccf1bad7c Mon Sep 17 00:00:00 2001 From: Alex Mendes Date: Mon, 6 Nov 2017 04:13:53 +0000 Subject: [PATCH 09/45] Fix auth middleware --- middleware/auth.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/middleware/auth.js b/middleware/auth.js index fbf532db..8393aa9b 100644 --- a/middleware/auth.js +++ b/middleware/auth.js @@ -5,14 +5,14 @@ import { updateSession } from '@/utils/auth' * @param {Object} context * The nuxt context. */ -export default function ({ isServer, store, req, app }) { +export default function ({ isClient, store, req, app }) { const currentUser = store.state.currentUser let update = false - if (isServer && req && 'cookie' in req.headers) { - update = updateSession(currentUser, req.headers.cookie) - } else { + if (isClient) { update = updateSession(currentUser, document.cookie) + } else if (req && 'cookie' in req.headers) { + update = updateSession(currentUser, req.headers.cookie) } if (update && app.hasOwnProperty('$axios')) { From f3d15c8e48794a49a70e4a20f4581f8bda8df3c3 Mon Sep 17 00:00:00 2001 From: Alexander Mendes Date: Mon, 6 Nov 2017 13:23:16 +0000 Subject: [PATCH 10/45] Update libcrowds viewer to 3.4.5 --- package-lock.json | 790 +--------------------------------------------- package.json | 2 +- 2 files changed, 3 insertions(+), 789 deletions(-) diff --git a/package-lock.json b/package-lock.json index 567be903..ffdde8a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1845,7 +1845,6 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -4150,791 +4149,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "optional": true, - "requires": { - "nan": "2.7.0", - "node-pre-gyp": "0.6.36" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -7611,7 +6825,8 @@ "nan": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=", + "dev": true }, "natural-compare": { "version": "1.4.0", @@ -11274,7 +10489,6 @@ "anymatch": "1.3.2", "exec-sh": "0.2.1", "fb-watchman": "2.0.0", - "fsevents": "1.1.2", "minimatch": "3.0.4", "minimist": "1.2.0", "walker": "1.0.7", diff --git a/package.json b/package.json index 555fa794..9b186257 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "git-rev-sync": "^1.9.1", "hamburgers": "^0.9.1", "izitoast": "^1.1.5", - "libcrowds-viewer": "~3.4.4", + "libcrowds-viewer": "~3.4.5", "lodash": "^4.17.4", "moment": "^2.19.1", "nuxt": "1.0.0-rc10", From 779d854f6fd95a17a71ffb3b7818850915d9ad2b Mon Sep 17 00:00:00 2001 From: Alexander Mendes Date: Mon, 6 Nov 2017 13:31:15 +0000 Subject: [PATCH 11/45] Remove vue-cookie and update vendor build --- nuxt.config.js | 23 +++++++++-------------- package-lock.json | 19 +++---------------- package.json | 1 - plugins/vue-cookie.js | 4 ---- 4 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 plugins/vue-cookie.js diff --git a/nuxt.config.js b/nuxt.config.js index fecd9478..8ef15b13 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -24,30 +24,26 @@ const config = { 'simplemde/dist/simplemde.min.css', 'libcrowds-viewer/dist/scss/main.scss' ], - postcss: { - plugins: { - 'postcss-url': false, - 'postcss-cssnext': { - features: { - customProperties: false - } - } - } - }, build: { vendor: [ 'bootstrap-vue', + '~/plugins/filters.js', + '~/plugins/libcrowds-viewer', + '~/plugins/notifications', 'progressbar.js', 'vue-awesome', 'vue-chartist', 'vue-clickaway', - 'vue-cookie', 'vue-form-generator', 'vue-gravatar', - 'vue-js-toggle-button', + 'vue-infinite-loading', + 'vue-moment', + 'vue-multiselect', 'vue-notifications', 'vue-scrollto', - 'vue-sweetalert' + 'vue-simplemde', + 'vue-sweetalert', + 'vue-js-toggle-button' ], extend (config, ctx) { if (ctx.isClient) { @@ -89,7 +85,6 @@ const config = { { src: '~/plugins/vue-awesome' }, { src: '~/plugins/vue-chartist', ssr: false }, { src: '~/plugins/vue-clickaway', ssr: false }, - { src: '~/plugins/vue-cookie', ssr: false }, { src: '~/plugins/vue-form-generator' }, { src: '~/plugins/vue-gravatar' }, { src: '~/plugins/vue-infinite-loading', ssr: false }, diff --git a/package-lock.json b/package-lock.json index ffdde8a0..d2c3946d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6109,9 +6109,9 @@ } }, "libcrowds-viewer": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/libcrowds-viewer/-/libcrowds-viewer-3.4.4.tgz", - "integrity": "sha512-NULT+toG2/mYpLqmghlNYncklNJ0D5EMmVH/uU85JTKHP3/n76CAVKqtZZBMRiQh+X1RNtTXR4C7ja/gxzogQg==", + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/libcrowds-viewer/-/libcrowds-viewer-3.4.5.tgz", + "integrity": "sha512-cJJm2u709jn4pHkFOR7m0bPrciJPWmGgE5gnyEZww29c6adL4YJMV6Hn8eiV1Gn0DcxcBRDdMWjtp6IfKTZJVA==", "requires": { "clipboard": "1.7.1", "es6-object-assign": "1.1.0", @@ -11382,11 +11382,6 @@ "setimmediate": "1.0.5" } }, - "tiny-cookie": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tiny-cookie/-/tiny-cookie-1.0.1.tgz", - "integrity": "sha1-dTeGB5xkKjw9CyrMrWAPjeEZrCo=" - }, "tiny-emitter": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz", @@ -11860,14 +11855,6 @@ "loose-envify": "1.3.1" } }, - "vue-cookie": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/vue-cookie/-/vue-cookie-1.1.4.tgz", - "integrity": "sha1-uLRtESvan5Oi9HAXwu1SgtIGT9o=", - "requires": { - "tiny-cookie": "1.0.1" - } - }, "vue-form-generator": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/vue-form-generator/-/vue-form-generator-2.1.1.tgz", diff --git a/package.json b/package.json index 9b186257..726d0ded 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "vue-awesome": "^2.3.3", "vue-chartist": "^2.1.1", "vue-clickaway": "^2.1.0", - "vue-cookie": "^1.1.4", "vue-form-generator": "^2.1.1", "vue-gravatar": "^1.1.3", "vue-infinite-loading": "^2.2.1", diff --git a/plugins/vue-cookie.js b/plugins/vue-cookie.js deleted file mode 100644 index ad6b8acc..00000000 --- a/plugins/vue-cookie.js +++ /dev/null @@ -1,4 +0,0 @@ -import Vue from 'vue' -import VueCookie from 'vue-cookie' - -Vue.use(VueCookie) From cb60b4de1cbddcab6cb507c971f2d53020d121e5 Mon Sep 17 00:00:00 2001 From: Alexander Mendes Date: Mon, 6 Nov 2017 13:48:47 +0000 Subject: [PATCH 12/45] Update docs --- docs/admin/collection.md | 64 ++++++++++------------------------------ 1 file changed, 15 insertions(+), 49 deletions(-) diff --git a/docs/admin/collection.md b/docs/admin/collection.md index 9b6fcee2..47914a1d 100644 --- a/docs/admin/collection.md +++ b/docs/admin/collection.md @@ -5,9 +5,8 @@ manage the platform's collection microsites. ## Open Collection -Here you can select the collection microsite that you wish to manage. After -clicking 'Open' for one of these microsites additional items will appear in the -dashboard menu. +Here you can select the collection microsite that you wish to manage. Click +'Open' to display the all additional settings pages for a microsite. ## New Collection @@ -21,51 +20,18 @@ configuration options, which are described in more detail below. This is where the core settings for the microsite are configured, each of which are explained below. -### Published - -The published toggle can be used to display the microsite to all users, or -otherwise. - -### Name - -The name is used to apply branding throughout the collection microsite. - -### Short name - -The short name is as an identifier and to form the collection microsite URL in -the form `/collection/short_name`. - -### Tagline - -The tagline appears over the hero image on the microsite's homepage and forms -a part of it's title. - -### Description - -The description appears on the microsite's homepage and forms its meta -description (so should be SEO optimised). - -### Background Image - -The URL for a background image that is used to provide a consistent theme across -all of the microsite's core pages. - -### Logo - -The URL for a logo to be shown alongside the name on the microsite's homepage. - -### Forum URL - -The URL that will be linked to via the Discuss navigation item. - -### Task Presenter - -The module used to present tasks for all of the projects on the collection -microsite (e.g. LibCrowds Viewer). - -### Data Reuse License - -The license by which all data collected via the microsite is made available. +| Setting | Description +|--------------------|------------------------------------------------------------------------------------------------| +| Published | Once published, a microsite is added to the platform homepage and is accessible to all users. | +| Name | Applies branding throughout the collection microsite. | +| Short name | Used as an identifier and to form the microsite endpoint (e.g. `/collection/short_name`). | +| Tagline | Appears over the hero image on the microsite's homepage and forms a part of it's title. | +| Description | Appearson the microsite's homepage and forms its meta description. | +| Background Image | The URL for an image used to provide a consistent theme for all of the microsite's core pages. | +| Logo | The URL for a logo to be shown alongside the name on the microsite's homepage. | +| Forum URL | The URL for the Discuss link in the microsite's main navigation bar. | +| Task Presenter | The module used to present tasks for all of the microsite's projects. | +| Data Reuse License | The license by which all data collected via the microsite is made available. | ## Content @@ -100,7 +66,7 @@ Once tags are created they can be added to individual projects via the Here you can set the projects that appear on the Featured Projects section of the collection microsite's homepage. -![Collection Admin - Featured](../assets/admin-collection-featured.png?raw=true) +![Collection Admin - Featured](../assets/admin-collection-featured.jpg?raw=true) ## Delete From 0c2cb1ee29b2bc0f8f4ef5b405a055f8d1e2180f Mon Sep 17 00:00:00 2001 From: Alexander Mendes Date: Mon, 6 Nov 2017 17:22:37 +0000 Subject: [PATCH 13/45] Only show incomplete projects on the contibute page (close #459) --- pages/collection/_short_name/projects/index.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pages/collection/_short_name/projects/index.vue b/pages/collection/_short_name/projects/index.vue index 9d803d91..5db3c849 100644 --- a/pages/collection/_short_name/projects/index.vue +++ b/pages/collection/_short_name/projects/index.vue @@ -28,7 +28,7 @@ hover striped show-empty - :items="projects" + :items="incompleteProjects" :fields="tableFields" class="d-lg-none" @sort-changed="onSortChange"> @@ -48,9 +48,8 @@ tag="ul" class="list-unstyled d-none d-lg-block" name="fade-up"> -
  • +
  • @@ -149,6 +148,12 @@ export default { params.published = true } return merge(params, this.searchParams) + }, + + incompleteProjects () { + return this.projects.filter(project => { + return project.overall_progress < 100 + }) } }, From b6d662cddd8bb275692ece5960a6b22163339344 Mon Sep 17 00:00:00 2001 From: Alexander Mendes Date: Mon, 6 Nov 2017 17:24:18 +0000 Subject: [PATCH 14/45] Change project stat to "join n volunteers" (close #465) --- components/cards/Project.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cards/Project.vue b/components/cards/Project.vue index 2283ed84..d2765b04 100644 --- a/components/cards/Project.vue +++ b/components/cards/Project.vue @@ -58,7 +58,7 @@ {{ collection.info.terminology.task | pluralize(project.n_tasks) }} - {{ project.n_volunteers | intComma }} + Join {{ project.n_volunteers | intComma }} {{ 'volunteer' | pluralize(project.n_volunteers) }}