From 669d341500c15136f6b4ccec38d31e64afda7dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Wed, 29 Apr 2020 11:23:08 +0200 Subject: [PATCH] Cleanup old code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- src/components/_base-UserDiv.vue | 5 +- src/components/dateFormItem.vue | 52 -------------- src/components/quizFormItem.vue | 86 ----------------------- src/components/shareDiv.vue | 6 +- src/components/textFormItem.vue | 43 ------------ src/main.js | 8 --- src/plugins/ModalDialog.vue | 97 -------------------------- src/plugins/plugin.js | 30 -------- src/router.js | 22 ------ src/views/Create.vue | 8 +-- src/views/Results.vue | 7 +- src/views/Sidebar.vue | 5 +- src/views/img/app.svg | 38 ---------- src/views/img/expired-unvoted-vote.svg | 14 ---- src/views/img/expired-voted-vote.svg | 11 --- src/views/img/open-unvoted-vote.svg | 14 ---- src/views/img/open-voted-vote.svg | 11 --- 17 files changed, 14 insertions(+), 443 deletions(-) delete mode 100644 src/components/dateFormItem.vue delete mode 100644 src/components/quizFormItem.vue delete mode 100644 src/components/textFormItem.vue delete mode 100644 src/plugins/ModalDialog.vue delete mode 100644 src/plugins/plugin.js delete mode 100644 src/views/img/app.svg delete mode 100644 src/views/img/expired-unvoted-vote.svg delete mode 100644 src/views/img/expired-voted-vote.svg delete mode 100644 src/views/img/open-unvoted-vote.svg delete mode 100644 src/views/img/open-voted-vote.svg diff --git a/src/components/_base-UserDiv.vue b/src/components/_base-UserDiv.vue index 4698cb0..a8d3b27 100644 --- a/src/components/_base-UserDiv.vue +++ b/src/components/_base-UserDiv.vue @@ -35,6 +35,7 @@ diff --git a/src/components/quizFormItem.vue b/src/components/quizFormItem.vue deleted file mode 100644 index 7780cfe..0000000 --- a/src/components/quizFormItem.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - diff --git a/src/components/shareDiv.vue b/src/components/shareDiv.vue index 7578e9c..2e262b0 100644 --- a/src/components/shareDiv.vue +++ b/src/components/shareDiv.vue @@ -62,10 +62,12 @@ diff --git a/src/main.js b/src/main.js index def33d1..0f763a4 100644 --- a/src/main.js +++ b/src/main.js @@ -32,20 +32,12 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip' import router from './router' import Forms from './Forms' -import Modal from './plugins/plugin.js' -// TODO: not use global registration Vue.directive('tooltip', Tooltip) -Vue.use(Modal) - Vue.prototype.t = translate Vue.prototype.n = translatePlural -// TODO: see if necessary -Vue.prototype.OC = OC -Vue.prototype.OCA = OCA - // CSP config for webpack dynamic chunk loading // eslint-disable-next-line __webpack_nonce__ = btoa(getRequestToken()) diff --git a/src/plugins/ModalDialog.vue b/src/plugins/ModalDialog.vue deleted file mode 100644 index 78911e2..0000000 --- a/src/plugins/ModalDialog.vue +++ /dev/null @@ -1,97 +0,0 @@ - - - - - diff --git a/src/plugins/plugin.js b/src/plugins/plugin.js deleted file mode 100644 index ad83016..0000000 --- a/src/plugins/plugin.js +++ /dev/null @@ -1,30 +0,0 @@ -// we need our modal component -import ModalDialog from './ModalDialog' - -const Modal = { - // every plugin for Vue.js needs install method - // this method will run after Vue.use() is executed - install(Vue, options) { - // We must create new Eventbus - // which is just another Vue instance that will be listening for and emiting events from our main instance - // this EventBus will be available as Modal.EventBus - this.EventBus = new Vue() - - // making our modal component global - // eslint-disable-next-line vue/match-component-file-name - Vue.component('ModalDialog', ModalDialog) - - // exposing global $modal object with method show() - // method show() takes object params as argument - // inside this object we can have modal title, text, styles... and also our callback confirm function - Vue.prototype.$modal = { - show(params) { - // if we use this.$modal.show(params) inside our original Vue instance - // we will emit 'show' event with parameters 'params' - Modal.EventBus.$emit('show', params) - }, - } - }, -} - -export default Modal diff --git a/src/router.js b/src/router.js index 39b6af0..415c33c 100644 --- a/src/router.js +++ b/src/router.js @@ -45,19 +45,6 @@ export default new Router({ path: '/', name: 'root', }, - { - path: '/new', - components: { - default: Create, - sidebar: Sidebar, - }, - name: 'create', - }, - { - path: '/:hash', - name: 'fill', - props: { default: true }, - }, { path: '/:hash/edit', components: { @@ -73,14 +60,5 @@ export default new Router({ name: 'results', props: { default: true }, }, - { - path: '/:hash/clone', - components: { - default: Create, - sidebar: Sidebar, - }, - name: 'clone', - props: { default: true }, - }, ], }) diff --git a/src/views/Create.vue b/src/views/Create.vue index c1cc72f..3ea5870 100644 --- a/src/views/Create.vue +++ b/src/views/Create.vue @@ -20,10 +20,6 @@ - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - - - - - UPDATE: Adds Quiz option and takes the input: - - is yet to store input of quizzes and cannot represtent them - - requires quizFormItem.vue (should be added to svn) -->