diff --git a/ui/app/components/ConfirmDialog.vue b/ui/app/components/ConfirmDialog.vue
index 44c8eb9f..54924e97 100644
--- a/ui/app/components/ConfirmDialog.vue
+++ b/ui/app/components/ConfirmDialog.vue
@@ -39,6 +39,8 @@
diff --git a/ui/app/components/DLFields.vue b/ui/app/components/DLFields.vue
index e9545844..476eee9e 100644
--- a/ui/app/components/DLFields.vue
+++ b/ui/app/components/DLFields.vue
@@ -121,8 +121,8 @@
- The icon of the field, must be from
+ The icon of the field, must be from
font-awesome icon. e.g. fa-solid fa-image. Leave empty for no icon.
@@ -165,6 +165,7 @@
diff --git a/ui/app/components/EmbedPlayer.vue b/ui/app/components/EmbedPlayer.vue
index 2f6afe04..7e679f5f 100644
--- a/ui/app/components/EmbedPlayer.vue
+++ b/ui/app/components/EmbedPlayer.vue
@@ -16,6 +16,8 @@
diff --git a/ui/app/components/FloatingImage.vue b/ui/app/components/FloatingImage.vue
index 740c341e..e9af3967 100644
--- a/ui/app/components/FloatingImage.vue
+++ b/ui/app/components/FloatingImage.vue
@@ -20,6 +20,8 @@
diff --git a/ui/app/components/GetInfo.vue b/ui/app/components/GetInfo.vue
index 77d98e12..6ec18053 100644
--- a/ui/app/components/GetInfo.vue
+++ b/ui/app/components/GetInfo.vue
@@ -38,6 +38,8 @@ code {
diff --git a/ui/app/components/ImageView.vue b/ui/app/components/ImageView.vue
index 172306b6..1f8cad2d 100644
--- a/ui/app/components/ImageView.vue
+++ b/ui/app/components/ImageView.vue
@@ -19,6 +19,8 @@ img {
diff --git a/ui/app/components/Modal.vue b/ui/app/components/Modal.vue
index e5d13024..3fa0e8e9 100644
--- a/ui/app/components/Modal.vue
+++ b/ui/app/components/Modal.vue
@@ -12,6 +12,8 @@
diff --git a/ui/app/components/VideoPlayer.vue b/ui/app/components/VideoPlayer.vue
index a017c9a8..701960f6 100644
--- a/ui/app/components/VideoPlayer.vue
+++ b/ui/app/components/VideoPlayer.vue
@@ -29,6 +29,7 @@
import { useStorage } from '@vueuse/core'
import Hls from 'hls.js'
import type { StoreItem } from '~/types/store'
+import { disableOpacity, enableOpacity } from '~/utils'
type video_track_element = {
file: string,
@@ -108,6 +109,7 @@ const volume_change_handler = () => {
}
onMounted(async () => {
+ disableOpacity()
const req = await request(makeDownload(config, props.item, 'api/file/info'))
const response: file_info = await req.json()
@@ -189,6 +191,7 @@ onMounted(async () => {
onUpdated(() => prepareVideoPlayer())
onBeforeUnmount(() => {
+ enableOpacity()
if (hls) {
hls.destroy()
}
diff --git a/ui/app/pages/console.vue b/ui/app/pages/console.vue
index 5298d082..466849a9 100644
--- a/ui/app/pages/console.vue
+++ b/ui/app/pages/console.vue
@@ -56,18 +56,15 @@
diff --git a/ui/app/utils/index.ts b/ui/app/utils/index.ts
index 0069cad8..f0a32e5e 100644
--- a/ui/app/utils/index.ts
+++ b/ui/app/utils/index.ts
@@ -1,3 +1,4 @@
+import { useStorage } from '@vueuse/core'
import type { convert_args_response } from "~/types/responses";
import type { StoreItem } from "~/types/store";
@@ -651,10 +652,31 @@ const decode = (str: string): object => {
return JSON.parse(jsonStr);
}
+const disableOpacity = (): boolean => {
+ const bg_enable = useStorage('random_bg', true)
+ if (!bg_enable) {
+ return false;
+ }
+
+ document.querySelector('body')?.setAttribute("style", `opacity: 1.0`)
+ return true
+}
+
+const enableOpacity = (): boolean => {
+ const bg_enable = useStorage('random_bg', true)
+ if (!bg_enable) {
+ return false;
+ }
+
+ const bg_opacity = useStorage('random_bg_opacity', 0.95)
+ document.querySelector('body')?.setAttribute("style", `opacity: ${bg_opacity.value}`)
+ return true
+}
+
export {
separators, convertCliOptions, getSeparatorsName, iTrim, eTrim, sTrim, ucFirst,
getValue, ag, ag_set, awaitElement, r, copyText, dEvent, makePagination, encodePath,
request, removeANSIColors, dec2hex, makeId, basename, dirname, getQueryParams,
makeDownload, formatBytes, has_data, toggleClass, cleanObject, uri, formatTime,
- sleep, awaiter, encode, decode
+ sleep, awaiter, encode, decode, disableOpacity, enableOpacity
}