diff --git a/package.json b/package.json index a8cb2278..552daaf8 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "stylus-loader": "^6.2.0", "tinymce": "^5.10.2", "tui-calendar-hi": "^1.15.1-1", - "view-design-hi": "^4.7.0-2", + "view-design-hi": "^4.7.0-3", "vue": "^2.6.14", "vue-clipboard2": "^0.3.3", "vue-emoji-picker": "^1.0.3", diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue index a1854d3a..1e68f584 100644 --- a/resources/assets/js/pages/manage.vue +++ b/resources/assets/js/pages/manage.vue @@ -123,6 +123,19 @@ + + + + + { + this.$refs.addTask.defaultPriority(); + this.$refs.addTask.setData($A.isJson(data) ? data : { + 'owner': this.userId, + 'column_id': data, + }); + this.addTaskShow = true; + this.$nextTick(() => { + this.$refs.addTask.$refs.input.focus(); + }) + }); + // + document.addEventListener('keydown', this.shortcutEvent); + // if (this.isElectron) { this.$electron.ipcRenderer.send('setDockBadge', 0); } }, + beforeDestroy() { + if (this.addTaskSubscribe) { + this.addTaskSubscribe.unsubscribe(); + this.addTaskSubscribe = null; + } + // + document.removeEventListener('keydown', this.shortcutEvent); + }, + deactivated() { this.addShow = false; }, @@ -526,6 +569,15 @@ export default { }) }, + shortcutEvent(e) { + if (e.keyCode === 75 || e.keyCode === 78) { + if (e.metaKey || e.ctrlKey) { + e.preventDefault(); + Store.set('addTask', 0); + } + } + }, + taskVisibleChange(visible) { if (!visible) { this.$store.dispatch('openTask', 0) diff --git a/resources/assets/js/pages/manage/components/ProjectList.vue b/resources/assets/js/pages/manage/components/ProjectList.vue index 5865efee..6d0e04ca 100644 --- a/resources/assets/js/pages/manage/components/ProjectList.vue +++ b/resources/assets/js/pages/manage/components/ProjectList.vue @@ -315,23 +315,6 @@ - - - -
- - - -
-
- { this.$store.dispatch('toggleTablePanel', 'chat'); }); - // - document.addEventListener('keydown', this.shortcutAdd); - }, - - beforeDestroy () { - document.removeEventListener('keydown', this.shortcutAdd); }, destroyed() { @@ -749,16 +723,6 @@ export default { }); }, - onAddTask(again) { - this.addLoad++; - this.$refs.add.onAdd((success) => { - this.addLoad--; - if (success && again !== true) { - this.addShow = false; - } - }, again) - }, - addTopShow(id, show) { this.$set(this.columnTopShow, id, show); if (show) { @@ -767,16 +731,7 @@ export default { }, addTaskOpen(column_id) { - this.$refs.add.defaultPriority(); - this.$refs.add.setData($A.isJson(column_id) ? column_id : { - 'owner': this.userId, - 'column_id': column_id, - }); - this.$Modal.resetIndex(); - this.addShow = true; - this.$nextTick(() => { - this.$refs.add.$refs.input.focus(); - }) + Store.set('addTask', column_id); }, addColumnOpen() { @@ -1188,17 +1143,6 @@ export default { this.completeJust = []; }, - shortcutAdd(e) { - if (this.projectId && this.projectId == this.$route.params.id) { - if (e.keyCode === 75 || e.keyCode === 78) { - if (e.metaKey || e.ctrlKey) { - e.preventDefault(); - this.addTaskOpen(0); - } - } - } - }, - formatTime(date) { let time = Math.round($A.Date(date).getTime() / 1000), string = ''; diff --git a/resources/assets/js/pages/manage/components/TaskAdd.vue b/resources/assets/js/pages/manage/components/TaskAdd.vue index 255311d1..945be5d9 100644 --- a/resources/assets/js/pages/manage/components/TaskAdd.vue +++ b/resources/assets/js/pages/manage/components/TaskAdd.vue @@ -37,6 +37,7 @@ +