From ed1ec6fc6c4b592e244f2228d359707666e619fa Mon Sep 17 00:00:00 2001 From: arabcoders Date: Wed, 26 Mar 2025 19:17:04 +0300 Subject: [PATCH 1/3] Merge theme selector into the settings page. --- ui/components/Settings.vue | 27 +++++++++++++++++++++++---- ui/layouts/default.vue | 26 ++++---------------------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/ui/components/Settings.vue b/ui/components/Settings.vue index 9a945e3b..df693c93 100644 --- a/ui/components/Settings.vue +++ b/ui/components/Settings.vue @@ -9,13 +9,32 @@
+
+ +
+ + + +
+

Select the color scheme for the WebUI.

+
+
-

Use random background image from your media backends.

+

Use random background image from your media backends.

@@ -25,8 +44,8 @@
-

How visible the background image should be.

+

How visible the background image should be.

@@ -41,10 +60,9 @@ Reload -

Change the displayed picture.

+

Change the displayed picture.

- @@ -65,5 +83,6 @@ defineProps({ const bg_enable = useStorage('random_bg', true) const bg_opacity = useStorage('random_bg_opacity', 0.85) +const selectedTheme = useStorage('theme', 'auto') diff --git a/ui/layouts/default.vue b/ui/layouts/default.vue index 3f28f984..03d84f77 100644 --- a/ui/layouts/default.vue +++ b/ui/layouts/default.vue @@ -59,21 +59,6 @@ - - -
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + Video TitleStatusCreatedSize/StartsActions
+ + +
+ {{ item.title }} +
+
+ {{ item.error }} +
+
+ {{ item.msg }} +
+
+ + + {{ setStatus(item) }} + + + + {{ moment(item.datetime).fromNow() }} + + + + {{ moment(item.live_in).fromNow() }} + + + {{ item.file_size ? formatBytes(item.file_size) : '-' }} + +
+
+ + +
+
+ +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+
+
+
+
+ +
- + Archive @@ -268,6 +382,7 @@ const masterSelectAll = ref(false) const showCompleted = useStorage('showCompleted', true) const hideThumbnail = useStorage('hideThumbnailHistory', false) const direction = useStorage('sortCompleted', 'desc') +const display_style = useStorage('display_style', 'cards') const embed_url = ref('') const video_item = ref(null) @@ -439,11 +554,11 @@ const setStatus = item => { } if ('cancelled' === item.status) { - return 'User Cancelled' + return display_style.value === 'cards' ? 'User Cancelled' : 'Cancelled' } if ('not_live' === item.status) { - return 'Live Stream' + return display_style.value === 'cards' ? 'Live Stream' : 'Live' } return item.status diff --git a/ui/components/Queue.vue b/ui/components/Queue.vue index 8abfe058..e8218c60 100644 --- a/ui/components/Queue.vue +++ b/ui/components/Queue.vue @@ -10,7 +10,7 @@
-
+
-
+
-
+
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + Video TitleStatusProgressCreatedActions
+ + + {{ item.title }} + + + + + + + + +
+
{{ updateProgress(item) }}
+
+
+
+ + {{ moment(item.datetime).fromNow() }} + + +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ +
@@ -69,13 +152,13 @@
-
+
{{ updateProgress(item) }}
- + @@ -98,11 +181,9 @@
- @@ -152,7 +233,7 @@ diff --git a/ui/pages/index.vue b/ui/pages/index.vue index 2666165f..34e6d77d 100644 --- a/ui/pages/index.vue +++ b/ui/pages/index.vue @@ -30,7 +30,6 @@
-

+

+ +

+
@@ -86,6 +93,7 @@ const isChecking = ref(false) const get_info = ref('') const bg_enable = useStorage('random_bg', true) const bg_opacity = useStorage('random_bg_opacity', 0.85) +const display_style = useStorage('display_style', 'cards') onMounted(() => { if (!config.app.ui_update_title) { @@ -149,4 +157,6 @@ watch(get_info, v => { document.querySelector('body').setAttribute("style", `opacity: ${v ? 1 : bg_opacity.value}`) }) + +const changeDisplay = () => display_style.value = display_style.value === 'cards' ? 'list' : 'cards' From 3d9d0e222a4aa00d8f01fce040b9bcdd9cc30740 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Wed, 26 Mar 2025 22:07:52 +0300 Subject: [PATCH 3/3] Only show list when there are items. --- ui/components/History.vue | 2 +- ui/components/Queue.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/components/History.vue b/ui/components/History.vue index fcc990b1..7bdcb2f9 100644 --- a/ui/components/History.vue +++ b/ui/components/History.vue @@ -75,7 +75,7 @@
-
+
diff --git a/ui/components/Queue.vue b/ui/components/Queue.vue index e8218c60..5e104a12 100644 --- a/ui/components/Queue.vue +++ b/ui/components/Queue.vue @@ -34,7 +34,7 @@
-
+