From c210a20ef61305d671be76e8c09fb86744c7f3db Mon Sep 17 00:00:00 2001 From: Zibbp Date: Sun, 31 Mar 2024 16:02:54 +0000 Subject: [PATCH] feat: watched channel max video age --- src/components/Admin/Watched/Drawer.tsx | 15 +++++++++++++++ src/components/Queue/Header.module.css | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/Admin/Watched/Drawer.tsx b/src/components/Admin/Watched/Drawer.tsx index 3441bd5..5c59238 100644 --- a/src/components/Admin/Watched/Drawer.tsx +++ b/src/components/Admin/Watched/Drawer.tsx @@ -4,6 +4,7 @@ import { Group, Loader, MultiSelect, + NumberInput, Select, Switch, Text, @@ -31,6 +32,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { const [lastLive, setLastLive] = useState(watched?.last_live); const [channelId, setChannelId] = useState([]); const [downloadSubOnly, setDownloadSubOnly] = useState(false); + const [maxVideoAge, setMaxVideoAge] = useState(0) const [channelData, setChannelData] = useState([]); const [loading, setLoading] = useState(false); @@ -63,6 +65,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { setChannelId([...channelId, watched?.edges.channel.id]); setRenderChat(watched?.render_chat); setDownloadSubOnly(watched?.download_sub_only); + setMaxVideoAge(watched?.video_age); if (watched?.edges?.categories) { const tmpArr = []; @@ -96,6 +99,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { render_chat: renderChat, download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, + max_age: maxVideoAge, }, withCredentials: true, }, @@ -135,6 +139,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { render_chat: renderChat, download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, + max_age: maxVideoAge, }, withCredentials: true, }, @@ -157,6 +162,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { render_chat: renderChat, download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, + max_age: maxVideoAge, }, withCredentials: true, }, @@ -358,6 +364,15 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => {
Advanced
+
+ +
{twitchCategoriesLoading || formattedTwitchCategories.length == 0 ? ( diff --git a/src/components/Queue/Header.module.css b/src/components/Queue/Header.module.css index de253c1..e20e228 100644 --- a/src/components/Queue/Header.module.css +++ b/src/components/Queue/Header.module.css @@ -2,7 +2,7 @@ height: auto; padding-bottom: 10px; padding-top: 10px; - background-color: var(--mantine-color-dark-6); + background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6)); } .queueHeaderContents { display: flex;