Skip to content

Commit

Permalink
Add src/directives folder (vue directives refactor) (#174)
Browse files Browse the repository at this point in the history
* Add `src/directives` folder (vue directives refactor)

- create `src/directives` folder
- remove `src/app/gui/vue/directives/v-checked.js`
- remove `src/app/gui/vue/directives/v-disabled.js`
- remove `src/app/gui/vue/directives/v-select2.js`
- deprecate notice for `src/app/gui/vue/vue.directives.js`
- consolidate directives definitions within a single folder

* add new file `src/directives/utils.js` (helper)

* refactor stateful directives into `src/directives`

- delete `src/app/vui/vue/vue.directives.js`
- delete `src/directives/index.js` and
- consolidate all custom vue  directives within `src/directives` folder

* simplify stateful directives (`watch` / `unwatch`)

**Refactor file `src/directives/utils.js` **

- rename and refactor function (`createDirectiveObj({el, attr, watcher, handler, modifiers})` --> `watch({el, attr, watcher})` )
- rename function (`unbindWatch` --> `unwatch`)
- delete function (`getDirective(unique_attr_id)`)
- add function (trigger({el, attr, data}))

* refactor directive `v-disabled` (class list toggle)

* refactor directive `v-selected-first` (attribute toggle)
  • Loading branch information
Raruto authored Sep 15, 2022
1 parent 1640481 commit 00807ee
Show file tree
Hide file tree
Showing 19 changed files with 366 additions and 380 deletions.
3 changes: 0 additions & 3 deletions src/app/gui/vue/directives/v-disabled.js

This file was deleted.

31 changes: 0 additions & 31 deletions src/app/gui/vue/directives/v-select2.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/gui/vue/directives/v-selected-first.js

This file was deleted.

341 changes: 0 additions & 341 deletions src/app/gui/vue/vue.directives.js

This file was deleted.

Loading

0 comments on commit 00807ee

Please sign in to comment.