diff --git a/.drone.yml b/.drone.yml index a41dfe2a..6b7e89aa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,6 +5,7 @@ trigger: branch: include: - main + - vue3 event: include: - push diff --git a/cypress/factories/user.js b/cypress/factories/user.js index 37fcaaab..9e133b55 100644 --- a/cypress/factories/user.js +++ b/cypress/factories/user.js @@ -11,7 +11,7 @@ export class UserFactory extends Factory { return { id: '{increment}', - username: faker.lorem.word(10) + faker.random.uuid(), + username: faker.lorem.word(10) + faker.datatype.uuid(), password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234 status: 0, created: formatISO(now), diff --git a/cypress/integration/list/list.spec.js b/cypress/integration/list/list.spec.js index 8242984e..596c6adc 100644 --- a/cypress/integration/list/list.spec.js +++ b/cypress/integration/list/list.spec.js @@ -38,8 +38,7 @@ describe('Lists', () => { .contains('Create') .click() - cy.wait(1000) // Waiting until the request to create the new list is done - cy.get('.global-notification') + cy.get('.global-notification', { timeout: 1000 }) // Waiting until the request to create the new list is done .should('contain', 'Success') cy.url() .should('contain', '/lists/') @@ -446,7 +445,7 @@ describe('Lists', () => { cy.get('.kanban .bucket .tasks .task') .contains(tasks[0].title) .first() - .drag('.kanban .bucket:nth-child(2) .tasks .dropper div') + .drag('.kanban .bucket:nth-child(2) .tasks .dropper') cy.get('.kanban .bucket:nth-child(2) .tasks') .should('contain', tasks[0].title) @@ -501,7 +500,7 @@ describe('Lists', () => { .first() .click() - cy.get('.global-notification') + cy.get('.global-notification', { timeout: 1000 }) .should('contain', 'Success') cy.go('back') cy.get('.kanban .bucket') diff --git a/cypress/integration/list/namespaces.spec.js b/cypress/integration/list/namespaces.spec.js index e8c15443..7d092113 100644 --- a/cypress/integration/list/namespaces.spec.js +++ b/cypress/integration/list/namespaces.spec.js @@ -67,7 +67,7 @@ describe('Namepaces', () => { .contains('Save') .click() - cy.get('.global-notification') + cy.get('.global-notification', { timeout: 1000 }) .should('contain', 'Success') cy.get('.namespace-container .menu.namespaces-lists') .should('contain', newNamespaceName) diff --git a/cypress/integration/user/settings.spec.js b/cypress/integration/user/settings.spec.js index 36467bae..42b1f893 100644 --- a/cypress/integration/user/settings.spec.js +++ b/cypress/integration/user/settings.spec.js @@ -12,7 +12,7 @@ describe('User Settings', () => { cy.get('input[name=avatarProvider][value=upload]') .click() - cy.get('input[type=file]') + cy.get('input[type=file]', { timeout: 1000 }) .attachFile('image.jpg') cy.get('.vue-handler-wrapper.vue-handler-wrapper--south .vue-simple-handler.vue-simple-handler--south') .trigger('mousedown', {which: 1}) diff --git a/package.json b/package.json index 56891745..b07cadc4 100644 --- a/package.json +++ b/package.json @@ -16,27 +16,32 @@ "browserslist:update": "npx browserslist@latest --update-db" }, "dependencies": { + "@kyvg/vue3-notification": "2.3.4", + "@vue/compat": "3.2.20", "bulma": "0.9.3", "camel-case": "4.1.2", + "codemirror": "^5.63.3", "copy-to-clipboard": "3.3.1", "date-fns": "2.25.0", "dompurify": "2.3.3", - "flatpickr": "4.6.9", + "easymde": "^2.15.0", + "flatpickr": "^4.6.9", "highlight.js": "11.3.0", "is-touch-device": "1.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.debounce": "^4.0.8", "marked": "3.0.7", "register-service-worker": "1.7.2", "snake-case": "3.0.4", "ufo": "0.7.9", - "verte": "0.0.12", - "vue": "2.6.14", - "vue-advanced-cropper": "1.8.2", - "vue-drag-resize": "1.5.4", - "vue-easymde": "1.4.0", - "vue-i18n": "8.26.5", - "vue-shortkey": "3.1.7", - "vuedraggable": "2.24.3", - "vuex": "3.6.2", + "vue": "3.2.20", + "vue-advanced-cropper": "^2.6.3", + "vue-drag-resize": "^2.0.3", + "vue-flatpickr-component": "9.0.5", + "vue-i18n": "9.2.0-beta.11", + "vue-router": "4.0.12", + "vuedraggable": "4.0.1", + "vuex": "4.0.2", "workbox-precaching": "6.3.0" }, "devDependencies": { @@ -44,13 +49,13 @@ "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-regular-svg-icons": "5.15.4", "@fortawesome/free-solid-svg-icons": "5.15.4", - "@fortawesome/vue-fontawesome": "2.0.5", + "@fortawesome/vue-fontawesome": "3.0.0-4", "@types/jest": "27.0.2", "@typescript-eslint/eslint-plugin": "5.0.0", "@typescript-eslint/parser": "5.0.0", "@vitejs/plugin-legacy": "1.6.2", + "@vitejs/plugin-vue": "^1.9.3", "@vue/eslint-config-typescript": "8.0.0", - "@vue/runtime-dom": "latest", "autoprefixer": "10.3.7", "axios": "0.23.0", "browserslist": "4.17.4", @@ -70,11 +75,6 @@ "typescript": "4.4.4", "vite": "2.6.7", "vite-plugin-pwa": "0.11.3", - "vite-plugin-vue2": "1.9.0", - "vue-flatpickr-component": "8.1.7", - "vue-notification": "1.3.20", - "vue-router": "3.5.2", - "vue-template-compiler": "2.6.14", "wait-on": "6.0.0", "workbox-cli": "6.3.0" }, @@ -87,7 +87,7 @@ }, "extends": [ "eslint:recommended", - "plugin:vue/essential", + "plugin:vue/vue3-essential", "@vue/typescript" ], "rules": { diff --git a/src/App.vue b/src/App.vue index 5da2d0e8..d2690c26 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,6 +23,7 @@ diff --git a/src/components/home/contentAuth.vue b/src/components/home/contentAuth.vue index a8972d42..b4b6c527 100644 --- a/src/components/home/contentAuth.vue +++ b/src/components/home/contentAuth.vue @@ -22,9 +22,11 @@ - - - + + + + + { - this.$message.error(e) - }) }, }, } diff --git a/src/components/home/contentLinkShare.vue b/src/components/home/contentLinkShare.vue index 3647aec7..24ae436e 100644 --- a/src/components/home/contentLinkShare.vue +++ b/src/components/home/contentLinkShare.vue @@ -40,11 +40,5 @@ export default { currentList: CURRENT_LIST, background: 'background', }), - methods: { - logout() { - this.$store.dispatch('auth/logout') - this.$router.push({name: 'user.login'}) - }, - }, } diff --git a/src/components/home/contentNoAuth.vue b/src/components/home/contentNoAuth.vue index 08483506..c60a070b 100644 --- a/src/components/home/contentNoAuth.vue +++ b/src/components/home/contentNoAuth.vue @@ -28,12 +28,23 @@ export default { logoUrl, } }, - created() { - this.redirectToHome() + computed: { + routeName() { + return this.$route.name + }, + ...mapState({ + motd: state => state.config.motd, + }), + }, + watch: { + routeName: { + handler(routeName) { + if (!routeName) return + this.redirectToHome() + }, + immediate: true, + }, }, - computed: mapState({ - motd: state => state.config.motd, - }), methods: { redirectToHome() { // Check if the user is already logged in and redirect them to the home page if not diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index e65df812..d19b9dae 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -49,19 +49,19 @@