Commit a7fc5605 authored by Nicolas Giard's avatar Nicolas Giard

feat: added vuescroll

parent 96471290
...@@ -17,6 +17,7 @@ import { getMainDefinition } from 'apollo-utilities' ...@@ -17,6 +17,7 @@ import { getMainDefinition } from 'apollo-utilities'
import VueApollo from 'vue-apollo' import VueApollo from 'vue-apollo'
import Vuetify from 'vuetify' import Vuetify from 'vuetify'
import Velocity from 'velocity-animate' import Velocity from 'velocity-animate'
import Vuescroll from 'vuescroll/dist/vuescroll-native'
import Hammer from 'hammerjs' import Hammer from 'hammerjs'
import moment from 'moment' import moment from 'moment'
import VueMoment from 'vue-moment' import VueMoment from 'vue-moment'
...@@ -147,6 +148,7 @@ Vue.use(helpers) ...@@ -147,6 +148,7 @@ Vue.use(helpers)
Vue.use(VeeValidate, { events: '' }) Vue.use(VeeValidate, { events: '' })
Vue.use(Vuetify) Vue.use(Vuetify)
Vue.use(VueMoment, { moment }) Vue.use(VueMoment, { moment })
Vue.use(Vuescroll)
Vue.use(VueTour) Vue.use(VueTour)
Vue.prototype.Velocity = Velocity Vue.prototype.Velocity = Velocity
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
v-app(:dark='darkMode').admin v-app(:dark='darkMode').admin
nav-header nav-header
v-navigation-drawer.pb-0.admin-sidebar(v-model='adminDrawerShown', app, fixed, clipped, left, permanent) v-navigation-drawer.pb-0.admin-sidebar(v-model='adminDrawerShown', app, fixed, clipped, left, permanent)
vue-scroll(:ops='scrollStyle')
v-list(dense) v-list(dense)
v-list-tile.pt-2(to='/dashboard') v-list-tile.pt-2(to='/dashboard')
v-list-tile-avatar: v-icon dashboard v-list-tile-avatar: v-icon dashboard
...@@ -119,7 +120,27 @@ export default { ...@@ -119,7 +120,27 @@ export default {
i18nOptions: { namespaces: 'admin' }, i18nOptions: { namespaces: 'admin' },
data() { data() {
return { return {
adminDrawerShown: true adminDrawerShown: true,
scrollStyle: {
vuescroll: {},
scrollPanel: {
initialScrollY: 0,
initialScrollX: 0,
scrollingX: false,
easing: 'easeOutQuad',
speed: 1000
},
rail: {
gutterOfEnds: '2px'
},
bar: {
onlyShowBarOnScroll: false,
background: '#CCC',
hoverStyle: {
background: '#999'
}
}
}
} }
}, },
computed: { computed: {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
@import "../libs/animate/animate"; @import "../libs/animate/animate";
@import '~vue2-animate/src/sass/vue2-animate'; @import '~vue2-animate/src/sass/vue2-animate';
@import '~vuescroll/dist/vuescroll.css';
@import '~diff2html/dist/diff2html.min.css'; @import '~diff2html/dist/diff2html.min.css';
@import 'components/v-btn'; @import 'components/v-btn';
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
:temporary='$vuetify.breakpoint.xs' :temporary='$vuetify.breakpoint.xs'
v-model='navShown' v-model='navShown'
) )
vue-scroll(:ops='scrollStyle')
nav-sidebar nav-sidebar
slot(name='sidebar') slot(name='sidebar')
...@@ -182,7 +183,25 @@ export default { ...@@ -182,7 +183,25 @@ export default {
{ path: '/universe/galaxy', name: 'Galaxy' }, { path: '/universe/galaxy', name: 'Galaxy' },
{ path: '/universe/galaxy/solar-system', name: 'Solar System' }, { path: '/universe/galaxy/solar-system', name: 'Solar System' },
{ path: '/universe/galaxy/solar-system/planet-earth', name: 'Planet Earth' } { path: '/universe/galaxy/solar-system/planet-earth', name: 'Planet Earth' }
] ],
scrollStyle: {
vuescroll: {},
scrollPanel: {
initialScrollX: 0.01, // fix scrollbar not disappearing on load
scrollingX: false,
speed: 50
},
rail: {
gutterOfEnds: '2px'
},
bar: {
onlyShowBarOnScroll: false,
background: '#42A5F5',
hoverStyle: {
background: '#64B5F6'
}
}
}
} }
}, },
computed: { computed: {
......
...@@ -269,6 +269,7 @@ ...@@ -269,6 +269,7 @@
"vue-tour": "1.1.0", "vue-tour": "1.1.0",
"vue2-animate": "2.1.0", "vue2-animate": "2.1.0",
"vuedraggable": "2.16.0", "vuedraggable": "2.16.0",
"vuescroll": "4.9.0-beta.14",
"vuetify": "1.3.8", "vuetify": "1.3.8",
"vuex": "3.0.1", "vuex": "3.0.1",
"vuex-pathify": "1.1.3", "vuex-pathify": "1.1.3",
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment