From d333f58a84b0b68bd4735a832f8568bd9367f370 Mon Sep 17 00:00:00 2001 From: Serhii Pylypchuk Date: Tue, 25 Jun 2024 13:50:20 +0400 Subject: [PATCH 1/6] [dev] refactoring --- .gitignore | 42 +++++++++++++++++++++++++++++++++++++++ index.html | 2 +- src/App.vue | 2 +- src/components/Kanban.vue | 18 ++++++++++++----- 4 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0711527 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# Compiled output +/dist +/tmp +/out-tsc +/bazel-out + +# Node +/node_modules +npm-debug.log +yarn-error.log + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# Miscellaneous +/.angular/cache +.sass-cache/ +/connect.lock +/coverage +/libpeerconnection.log +testem.log +/typings + +# System files +.DS_Store +Thumbs.db diff --git a/index.html b/index.html index 9e56e4e..7e0f6b1 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - DHX :: Vue + DHX Kanban Vue
diff --git a/src/App.vue b/src/App.vue index 55731db..8ac788a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,7 +7,7 @@ export default { data() { const { columns, cards } = getData(); return { columns, cards }; - }, + } }; diff --git a/src/components/Kanban.vue b/src/components/Kanban.vue index 9ae6763..b7a9f39 100644 --- a/src/components/Kanban.vue +++ b/src/components/Kanban.vue @@ -1,22 +1,30 @@ From b01c91c716f0565f9cf9420a1fc5ede356013dcb Mon Sep 17 00:00:00 2001 From: Serhii Pylypchuk Date: Tue, 25 Jun 2024 19:33:33 +0400 Subject: [PATCH 2/6] [dev] style refactoring --- src/components/Kanban.vue | 14 ++++++++------ src/style.css | 6 ++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/Kanban.vue b/src/components/Kanban.vue index b7a9f39..7c7588f 100644 --- a/src/components/Kanban.vue +++ b/src/components/Kanban.vue @@ -6,25 +6,27 @@ export default { props: ["cards", "columns"], mounted() { - const kanban = new Kanban(this.$refs.kanban_container, { + this.kanban = new Kanban(this.$refs.kanban_container, { cards: this.cards, columns: this.columns, // other configuration properties }); - new Toolbar(this.$refs.toolbar_container, { - api: kanban.api + this.toolbar = new Toolbar(this.$refs.toolbar_container, { + api: this.kanban.api }); }, unmounted() { - this.$refs.toolbar_container.innerHTML = ""; - this.$refs.kanban_container.innerHTML = ""; + this.kanban.destructor(); + this.toolbar.destructor(); } }; diff --git a/src/style.css b/src/style.css index ef8ea91..69cc0ea 100644 --- a/src/style.css +++ b/src/style.css @@ -5,3 +5,9 @@ body, padding: 0; margin: 0; } + +.component_container { + height: 100%; + width: 100%; + margin: 0 auto; +} \ No newline at end of file From 017d3450f5769c40e25d14629c6275cdad3d7033 Mon Sep 17 00:00:00 2001 From: Serhii Pylypchuk Date: Wed, 26 Jun 2024 12:36:04 +0400 Subject: [PATCH 3/6] [dev] add extended config --- src/App.vue | 6 +- src/components/Kanban.vue | 24 ++- src/data.js | 300 ++++++++++++++++++++------------------ 3 files changed, 184 insertions(+), 146 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8ac788a..6e4e48e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,12 +5,12 @@ import { getData } from "./data"; export default { components: { Kanban }, data() { - const { columns, cards } = getData(); - return { columns, cards }; + const { columns, cards, rows, cardShape } = getData(); + return { columns, cards, rows, cardShape }; } }; diff --git a/src/components/Kanban.vue b/src/components/Kanban.vue index 7c7588f..91734b8 100644 --- a/src/components/Kanban.vue +++ b/src/components/Kanban.vue @@ -1,14 +1,34 @@