restore opacity if the video is playing.
This commit is contained in:
parent
55b3c34e68
commit
fad709b42b
2 changed files with 20 additions and 0 deletions
|
|
@ -275,6 +275,9 @@ const video_item = ref(null)
|
||||||
const playVideo = item => video_item.value = item
|
const playVideo = item => video_item.value = item
|
||||||
const closeVideo = () => video_item.value = null
|
const closeVideo = () => video_item.value = null
|
||||||
|
|
||||||
|
const bg_enable = useStorage('random_bg', true)
|
||||||
|
const bg_opacity = useStorage('random_bg_opacity', 0.85)
|
||||||
|
|
||||||
watch(masterSelectAll, (value) => {
|
watch(masterSelectAll, (value) => {
|
||||||
for (const key in stateStore.history) {
|
for (const key in stateStore.history) {
|
||||||
const element = stateStore.history[key]
|
const element = stateStore.history[key]
|
||||||
|
|
@ -493,4 +496,11 @@ const reQueueItem = item => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pImg = e => e.target.naturalHeight > e.target.naturalWidth ? e.target.classList.add('image-portrait') : null
|
const pImg = e => e.target.naturalHeight > e.target.naturalWidth ? e.target.classList.add('image-portrait') : null
|
||||||
|
watch(video_item, v => {
|
||||||
|
if (!bg_enable.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelector('body').setAttribute("style", `opacity: ${ v ? 1 : bg_opacity.value}`)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,9 @@ const showQueue = useStorage('showQueue', true)
|
||||||
const hideThumbnail = useStorage('hideThumbnailQueue', false)
|
const hideThumbnail = useStorage('hideThumbnailQueue', false)
|
||||||
const embed_url = ref('')
|
const embed_url = ref('')
|
||||||
|
|
||||||
|
const bg_enable = useStorage('random_bg', true)
|
||||||
|
const bg_opacity = useStorage('random_bg_opacity', 0.85)
|
||||||
|
|
||||||
watch(masterSelectAll, (value) => {
|
watch(masterSelectAll, (value) => {
|
||||||
for (const key in stateStore.queue) {
|
for (const key in stateStore.queue) {
|
||||||
const element = stateStore.queue[key];
|
const element = stateStore.queue[key];
|
||||||
|
|
@ -337,4 +340,11 @@ const cancelItems = item => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pImg = e => e.target.naturalHeight > e.target.naturalWidth ? e.target.classList.add('image-portrait') : null
|
const pImg = e => e.target.naturalHeight > e.target.naturalWidth ? e.target.classList.add('image-portrait') : null
|
||||||
|
watch(embed_url, v => {
|
||||||
|
if (!bg_enable.value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
document.querySelector('body').setAttribute("style", `opacity: ${ v ? 1 : bg_opacity.value}`)
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue