Skip to content

Commit

Permalink
feat(structure): mv theme-specific directives to vuestic-directives f…
Browse files Browse the repository at this point in the history
…older
  • Loading branch information
smartapant committed Feb 15, 2018
1 parent 663fd73 commit 82a95eb
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 73 deletions.
1 change: 1 addition & 0 deletions build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
'directives': resolve('src/directives'),
'vuestic-mixins': resolve('src/vuestic-theme/vuestic-mixins'),
'vuestic-components': resolve('src/vuestic-theme/vuestic-components'),
'vuestic-directives': resolve('src/vuestic-theme/vuestic-directives'),
'vuestic-theme': resolve('src/vuestic-theme'),
'data': resolve('src/data'),
'vuex-store': resolve('src/store')
Expand Down
7 changes: 1 addition & 6 deletions src/components/layout/navbar/LanguageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@
<script>
import Vue from 'vue'
import { mapActions } from 'vuex'
import Dropdown from '../../../directives/Dropdown'
export default {
name: 'language-selector',
directives: {
dropdown: Dropdown
},
props: {
options: {
type: Array,
Expand Down Expand Up @@ -151,7 +146,7 @@
color: $vue-green;
background-color: $darkest-gray;
}
&:hover {
background-color: $almost-black;
}
Expand Down
5 changes: 0 additions & 5 deletions src/components/layout/navbar/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@

<script>
import { mapGetters, mapActions } from 'vuex'
import Dropdown from '../../../directives/Dropdown'
import LanguageSelector from './LanguageSelector'
export default {
Expand All @@ -90,10 +89,6 @@
LanguageSelector
},
directives: {
dropdown: Dropdown
},
data () {
return {
langs: [
Expand Down
5 changes: 1 addition & 4 deletions src/components/ui/buttons/Buttons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,10 @@

<script>
import {mapGetters} from 'vuex'
import Dropdown from 'directives/Dropdown'
export default {
name: 'buttons',
directives: {
Dropdown
},
computed: {
...mapGetters([
'sidebarOpened'
Expand Down
54 changes: 0 additions & 54 deletions src/directives/Expandable.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
</template>

<script>
import StickyScroll from 'directives/StickyScroll'
import StickyScroll from 'vuestic-directives/StickyScroll'
export default {
name: 'vuestic-chat',
directives: {StickyScroll},
props: {
value: {
type: Array,
Expand All @@ -34,17 +36,20 @@
default: '20rem'
}
},
data () {
return {
inputMessage: ''
}
},
methods: {
keyHandler (event) {
if (event.keyCode === 13) {
this.sendMessage()
}
},
sendMessage () {
if (this.inputMessage) {
this.$emit('input', this.value.concat({
Expand All @@ -55,6 +60,7 @@
}
}
},
mounted () {
this.$emit('input', this.value)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script>
import Dropdown from 'directives/Dropdown'
import Dropdown from 'vuestic-directives/Dropdown'
export default {
directives: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
import Dropdown from 'directives/Dropdown'
import Dropdown from 'vuestic-directives/Dropdown'
import Scrollbar from '../vuestic-scrollbar/VuesticScrollbar.vue'
export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
import Dropdown from 'directives/Dropdown'
import Dropdown from 'vuestic-directives/Dropdown'
import Scrollbar from '../vuestic-scrollbar/VuesticScrollbar.vue'
export default {
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/vuestic-theme/vuestic-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import Popover from './vuestic-components/vuestic-popover/VuesticPopover.vue'

import VuesticToasted from './vuestic-mixins/VuesticToasted'

import Dropdown from './vuestic-directives/Dropdown'
import StickyScroll from './vuestic-directives/StickyScroll'

const VuesticPlugin = {
install (Vue, options) {
Vue.component(Alert.name, Alert)
Expand All @@ -47,6 +50,9 @@ const VuesticPlugin = {
Vue.component(Popover.name, Popover)

Vue.mixin(VuesticToasted)

Vue.directive('dropdown', Dropdown)
Vue.directive('sticky-scroll', StickyScroll)
}
}

Expand Down

0 comments on commit 82a95eb

Please sign in to comment.