Put layout how into store and fixed cursor not hiding

This commit is contained in:
Kylart 2020-08-30 02:18:35 +02:00
parent 970d31715d
commit 8a24560b16
4 changed files with 13 additions and 6 deletions

View File

@ -48,7 +48,6 @@ export default {
},
data: () => ({
show: true,
timeoutID: null
}),
@ -56,6 +55,17 @@ export default {
setTimeout(this.hide, 1500)
},
computed: {
show: {
get () {
return this.$store.getters['streaming/controls'].show
},
set (bool) {
this.$store.commit('streaming/setControl', { name: 'show', value: bool })
}
}
},
methods: {
reveal () {
this.show = true

View File

@ -1,7 +1,7 @@
<template lang="pug">
.video-player(
@mousemove='onMouseMove',
:style='{ cursor: !layoutShow ? "none" : null }'
:style='{ cursor: !controls.show ? "none" : null }'
)
wrapper(
@ -43,8 +43,6 @@ export default {
name: '',
hasAppendedToHistory: false,
layoutShow: true,
propertyMap: {
'percent-pos': 'timeline',
'media-title': 'name'

View File

@ -11,8 +11,6 @@ export default {
actOnWindow: this.actOnWindow,
mute: this.toggleMute,
updateTrack: this.setTrack
// show: this.layoutShow = true,
// hide: this.layoutShow = false
},
bind: {
subtitles: this.subtitles,

View File

@ -4,6 +4,7 @@ export default {
link: {},
neighbours: null,
controls: {
show: true,
title: '',
pause: true,
volume: 100,