Restore opacity on get_info
This commit is contained in:
parent
2b666517a5
commit
7542a9a0a4
1 changed files with 11 additions and 0 deletions
|
|
@ -75,6 +75,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { request } from '~/utils/index'
|
import { request } from '~/utils/index'
|
||||||
|
import { useStorage } from '@vueuse/core'
|
||||||
|
|
||||||
const emitter = defineEmits(['getInfo'])
|
const emitter = defineEmits(['getInfo'])
|
||||||
const config = useConfigStore()
|
const config = useConfigStore()
|
||||||
|
|
@ -83,6 +84,8 @@ const socket = useSocketStore()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const isChecking = ref(false)
|
const isChecking = ref(false)
|
||||||
const get_info = ref('')
|
const get_info = ref('')
|
||||||
|
const bg_enable = useStorage('random_bg', true)
|
||||||
|
const bg_opacity = useStorage('random_bg_opacity', 0.85)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
|
|
@ -138,4 +141,12 @@ const pauseDownload = () => {
|
||||||
|
|
||||||
socket.emit('pause', {})
|
socket.emit('pause', {})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watch(get_info, 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