From 27df547292d04328d07066ad2c3aa7c2ffc0b05c Mon Sep 17 00:00:00 2001 From: TheFrodoDE Date: Mon, 3 Jun 2024 23:44:56 +0200 Subject: [PATCH] v2.3.0 feat(watched channel): title regex by @Zibbp --- .devcontainer/devcontainer.json | 11 +- .vscode/settings.json | 0 package-lock.json | 419 ++++++------------ package.json | 35 +- src/components/Admin/Watched/Drawer.tsx | 115 ++++- .../Admin/Watched/Watched.module.css | 3 + src/components/Vod/VideoPlayer.tsx | 18 +- src/ganymede-defs.d.ts | 21 + src/pages/vods/[vodId].tsx | 2 +- 9 files changed, 302 insertions(+), 322 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a2c14a7..b45a645 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,16 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [3000] - "appPort": ["0.0.0.0:3000:3000"] + "appPort": [ + "0.0.0.0:3000:3000" + ], + "customizations": { + "vscode": { + "extensions": [ + "eamodio.gitlens" + ] + } + } // Use 'postCreateCommand' to run commands after the container is created. // "postCreateCommand": "yarn install", diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e69de29 diff --git a/package-lock.json b/package-lock.json index 2d0cfaf..6dcade8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,40 +8,39 @@ "name": "ganymede-frontend-next", "version": "0.1.0", "dependencies": { - "@mantine/carousel": "^7.5.3", - "@mantine/core": "^7.5.3", - "@mantine/dates": "^7.5.3", - "@mantine/form": "^7.5.3", - "@mantine/hooks": "^7.5.3", - "@mantine/notifications": "^7.5.3", + "@mantine/carousel": "^7.8.0", + "@mantine/core": "^7.8.0", + "@mantine/dates": "^7.8.0", + "@mantine/form": "^7.8.0", + "@mantine/hooks": "^7.8.0", + "@mantine/notifications": "^7.8.0", "@tabler/icons-react": "^2.47.0", - "@tanstack/react-query": "^5.28.9", - "@tanstack/react-query-devtools": "^5.28.10", - "@types/node": "20.12.2", - "@types/react": "18.2.73", - "@types/react-dom": "18.2.23", - "@vidstack/react": "^1.10.7", + "@tanstack/react-query": "^5.29.2", + "@tanstack/react-query-devtools": "^5.29.2", + "@types/node": "20.12.7", + "@types/react": "18.2.79", + "@types/react-dom": "18.2.25", + "@vidstack/react": "^1.11.17", "axios": "^1.6.8", "clsx": "^2.1.0", "cookies-next": "^2.1.1", "dayjs": "^1.11.10", - "embla-carousel-react": "^8.0.0", + "embla-carousel-react": "^8.0.2", "events": "^3.3.0", "lodash": "^4.17.21", - "mantine-datatable": "^7.6.1", + "mantine-datatable": "^7.8.1", "media-icons": "^0.10.0", "next": "^14.1.4", "plyr-react": "^5.3.0", "react": "18.2.0", "react-dom": "18.2.0", - "react-hook-form": "^7.51.2", - "typescript": "5.4.3", - "vidstack": "^1.10.7", + "react-hook-form": "^7.51.3", + "typescript": "5.4.5", "zustand": "^4.5.2" }, "devDependencies": { "postcss": "^8.4.38", - "postcss-preset-mantine": "^1.13.0", + "postcss-preset-mantine": "^1.14.4", "postcss-simple-vars": "^7.0.1" } }, @@ -57,30 +56,30 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.5.0.tgz", - "integrity": "sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", + "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", "dependencies": { - "@floating-ui/utils": "^0.1.3" + "@floating-ui/utils": "^0.2.1" } }, "node_modules/@floating-ui/dom": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.5.3.tgz", - "integrity": "sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", + "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", "dependencies": { - "@floating-ui/core": "^1.4.2", - "@floating-ui/utils": "^0.1.3" + "@floating-ui/core": "^1.0.0", + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/react": { - "version": "0.24.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.24.8.tgz", - "integrity": "sha512-AuYeDoaR8jtUlUXtZ1IJ/6jtBkGnSpJXbGNzokBL87VDJ8opMq1Bgrc0szhK482ReQY6KZsMoZCVSb4xwalkBA==", + "version": "0.26.12", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.12.tgz", + "integrity": "sha512-D09o62HrWdIkstF2kGekIKAC0/N/Dl6wo3CQsnLcOmO3LkW6Ik8uIb3kw8JYkwxNCcg+uJ2bpWUiIijTBep05w==", "dependencies": { - "@floating-ui/react-dom": "^2.0.1", - "aria-hidden": "^1.2.3", - "tabbable": "^6.0.1" + "@floating-ui/react-dom": "^2.0.0", + "@floating-ui/utils": "^0.2.0", + "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -88,11 +87,11 @@ } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.4.tgz", - "integrity": "sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", + "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", "dependencies": { - "@floating-ui/dom": "^1.5.1" + "@floating-ui/dom": "^1.6.1" }, "peerDependencies": { "react": ">=16.8.0", @@ -100,75 +99,59 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.1.6.tgz", - "integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", + "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" }, "node_modules/@mantine/carousel": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/carousel/-/carousel-7.5.3.tgz", - "integrity": "sha512-rGB4tpYc+n2gTC0ijHP2jeMO3z5s29lY/LqtSq2uh8JnIXguV23QUR61twI1TkuvFNhyS4jJspruaEx2ErtrLg==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/carousel/-/carousel-7.8.0.tgz", + "integrity": "sha512-nxuLtZ4N4KJaayab5KuaffYhiVi4UaIjywkgQiNfTxABlgFdERNfo5if9sSMyisL0r3RUPJBfLkyi8A4fEC8GQ==", "peerDependencies": { - "@mantine/core": "7.5.3", - "@mantine/hooks": "7.5.3", + "@mantine/core": "7.8.0", + "@mantine/hooks": "7.8.0", "embla-carousel-react": ">=7.0.0", "react": "^18.2.0", "react-dom": "^18.2.0" } }, "node_modules/@mantine/core": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.5.3.tgz", - "integrity": "sha512-Wvv6DJXI+GX9mmKG5HITTh/24sCZ0RoYQHdTHh0tOfGnEy+RleyhA82UjnMsp0n2NjfCISBwbiKgfya6b2iaFw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.8.0.tgz", + "integrity": "sha512-19RKuNdJ/s8pZjy2w2rvTsl4ybi/XM6vf+Kc0WY7kpLFCvdG+/UxNi1MuJF8t2Zs0QSFeb/H5yZQNe0XPbegHw==", "dependencies": { - "@floating-ui/react": "^0.24.8", - "clsx": "2.0.0", + "@floating-ui/react": "^0.26.9", + "clsx": "2.1.0", "react-number-format": "^5.3.1", "react-remove-scroll": "^2.5.7", "react-textarea-autosize": "8.5.3", - "type-fest": "^3.13.1" + "type-fest": "^4.12.0" }, "peerDependencies": { - "@mantine/hooks": "7.5.3", + "@mantine/hooks": "7.8.0", "react": "^18.2.0", "react-dom": "^18.2.0" } }, - "node_modules/@mantine/core/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/@mantine/dates": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/dates/-/dates-7.5.3.tgz", - "integrity": "sha512-v6fFdW+7HAd7XsZFMJVMuFE2RHbQAVnsUNeP0/5h+H4qEj0soTmMvHPP8wXEed5v85r9CcEMGOGq1n6RFRpWHA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/dates/-/dates-7.8.0.tgz", + "integrity": "sha512-9jjiYMwP3jQOpOLKkjhp9uf2BGhtEbOnOzyAlpLOS0CJJlYtB0tO6dJ3JaogrOZ/Yfee7ZUBgouCG5EkR4/qtQ==", "dependencies": { - "clsx": "2.0.0" + "clsx": "2.1.0" }, "peerDependencies": { - "@mantine/core": "7.5.3", - "@mantine/hooks": "7.5.3", + "@mantine/core": "7.8.0", + "@mantine/hooks": "7.8.0", "dayjs": ">=1.0.0", "react": "^18.2.0", "react-dom": "^18.2.0" } }, - "node_modules/@mantine/dates/node_modules/clsx": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", - "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", - "engines": { - "node": ">=6" - } - }, "node_modules/@mantine/form": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/form/-/form-7.5.3.tgz", - "integrity": "sha512-CIsNcHNIw1tXS+UgOpFjJzPaINU2YmK8x+f8Ikn5YXpSdqLw78+9/bSvtaAIOg9EINhfqnV4xg8B4sqKk7pxYA==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/form/-/form-7.8.0.tgz", + "integrity": "sha512-Qn3/69zGt/p3wyMwGz2V0+FbmvqC2/PvXaeyO0a4CnwhROeE7ObyCKXDcBmgapOSBHr/7wFvMeTDMaTMfe3DXw==", "dependencies": { "fast-deep-equal": "^3.1.3", "klona": "^2.0.6" @@ -178,32 +161,32 @@ } }, "node_modules/@mantine/hooks": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.5.3.tgz", - "integrity": "sha512-mFI448mAs12v8FrgSVhytqlhTVrEjIfd/PqPEfwJu5YcZIq4YZdqpzJIUbANnRrFSvmoQpDb1PssdKx7Ds35hw==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.8.0.tgz", + "integrity": "sha512-+70fkgjhVJeJ+nJqnburIM3UAsfvxat1Low9HMPobLbv64FIdB4Nzu5ct3qojNQ58r5sK01tg5UoFIJYslaVrg==", "peerDependencies": { "react": "^18.2.0" } }, "node_modules/@mantine/notifications": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/notifications/-/notifications-7.5.3.tgz", - "integrity": "sha512-08mWoGBfc8sGDTRthBg/HYPD8dRHyugZpeUH1U7RjWQmYD4ktdkT8bdBocStTSJkCQIvtP7OPJ1MiKln1idt5w==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/notifications/-/notifications-7.8.0.tgz", + "integrity": "sha512-O7BnaCcwVg38fh+gSZ6GEsTFPPgJAiOTrRkOMXG+7pNqJT9YNa9KDZhiPZzn3WV4wexncjyK32a8gGSVtf+kdg==", "dependencies": { - "@mantine/store": "7.5.3", + "@mantine/store": "7.8.0", "react-transition-group": "4.4.5" }, "peerDependencies": { - "@mantine/core": "7.5.3", - "@mantine/hooks": "7.5.3", + "@mantine/core": "7.8.0", + "@mantine/hooks": "7.8.0", "react": "^18.2.0", "react-dom": "^18.2.0" } }, "node_modules/@mantine/store": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@mantine/store/-/store-7.5.3.tgz", - "integrity": "sha512-jLTIaChJr9rWtzSRp2HQGHfuoFcr3ylD0JW/vsE5gpFvhoZFfkrxx5QsM1kn5wV34rZo0nQNMIJ8hvBVvfJtLQ==", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/@mantine/store/-/store-7.8.0.tgz", + "integrity": "sha512-oN/BXGYdUywRi0zj9ppaShv2sw5QON2DaRisB4ewJ5tDDz8qyeckgdE0NMaaU2TwpoScs8ibSnOVWV5y+vYkMA==", "peerDependencies": { "react": "^18.2.0" } @@ -417,9 +400,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.28.9", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.28.9.tgz", - "integrity": "sha512-hNlfCiqZevr3GRVPXS3MhaGW5hjcxvCsIQ4q6ff7EPlvFwYZaS+0d9EIIgofnegDaU2BbCDlyURoYfRl5rmzow==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.29.0.tgz", + "integrity": "sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -435,11 +418,11 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.28.9", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.28.9.tgz", - "integrity": "sha512-vwifBkGXsydsLxFOBMe3+f8kvtDoqDRDwUNjPHVDDt+FoBetCbOWAUHgZn4k+CVeZgLmy7bx6aKeDbe3e8koOQ==", + "version": "5.29.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.29.2.tgz", + "integrity": "sha512-nyuWILR4u7H5moLGSiifLh8kIqQDLNOHGuSz0rcp+J75fNc8aQLyr5+I2JCHU3n+nJrTTW1ssgAD8HiKD7IFBQ==", "dependencies": { - "@tanstack/query-core": "5.28.9" + "@tanstack/query-core": "5.29.0" }, "funding": { "type": "github", @@ -450,9 +433,9 @@ } }, "node_modules/@tanstack/react-query-devtools": { - "version": "5.28.10", - "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.28.10.tgz", - "integrity": "sha512-D+SiHZTWhK2sNgBYj+xIvUOqonsKy74OLU/YHmRB5OZVLLTiekvZd12C3rKlU+WM69jid0hjEjuFqkULOMwc3A==", + "version": "5.29.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-query-devtools/-/react-query-devtools-5.29.2.tgz", + "integrity": "sha512-EmsaLNa8iFtReAW+5ftom0/TW78fIosVor517ak/+JFaoTBw8Yub3ao937JFE6AM3K/HXhteqvObetgt1ndLcw==", "dependencies": { "@tanstack/query-devtools": "5.28.10" }, @@ -461,7 +444,7 @@ "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "@tanstack/react-query": "^5.28.9", + "@tanstack/react-query": "^5.29.2", "react": "^18.0.0" } }, @@ -471,9 +454,9 @@ "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==" }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dependencies": { "undici-types": "~5.26.4" } @@ -484,26 +467,26 @@ "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" }, "node_modules/@types/react": { - "version": "18.2.73", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.73.tgz", - "integrity": "sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA==", + "version": "18.2.79", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.79.tgz", + "integrity": "sha512-RwGAGXPl9kSXwdNTafkOEuFrTBD5SA2B3iEB96xi8+xu5ddUa/cpvyVCSNn+asgLCTHkb5ZxN8gbuibYJi4s1w==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" } }, "node_modules/@types/react-dom": { - "version": "18.2.23", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.23.tgz", - "integrity": "sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==", + "version": "18.2.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.25.tgz", + "integrity": "sha512-o/V48vf4MQh7juIKZU2QGDfli6p1+OOi5oXx36Hffpc9adsHeXjVp8rHuPkjd8VT8sOJ2Zp05HR7CdpGTIUFUA==", "dependencies": { "@types/react": "*" } }, "node_modules/@vidstack/react": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@vidstack/react/-/react-1.10.7.tgz", - "integrity": "sha512-WSo+lmFyu5BawTzawzGZT6uLxQlCz7A+6r2pqncCXhO18QxiPEKDDhUR2hQ5IC2VYJAom7haEKFcaBChZBSw/g==", + "version": "1.11.17", + "resolved": "https://registry.npmjs.org/@vidstack/react/-/react-1.11.17.tgz", + "integrity": "sha512-9CXM6PKQ7RoyE6i0itfUfvMwRvc3N6Wyofqwige+LCFp78D2SfwQDU2fmgalzfsLVuq72fxcj8x3MCjcPNqGHw==", "dependencies": { "media-captions": "^1.0.1" }, @@ -515,40 +498,6 @@ "react": "^18.0.0" } }, - "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -564,18 +513,11 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -622,29 +564,6 @@ } ] }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", @@ -752,28 +671,28 @@ } }, "node_modules/embla-carousel": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.0.0.tgz", - "integrity": "sha512-ecixcyqS6oKD2nh5Nj5MObcgoSILWNI/GtBxkidn5ytFaCCmwVHo2SecksaQZHcARMMpIR2dWOlSIdA1LkZFUA==" + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.0.2.tgz", + "integrity": "sha512-bogsDO8xosuh/l3PxIvA5AMl3+BnRVAse9sDW/60amzj4MbGS5re4WH5eVEXiuH8G1/3G7QUAX2QNr3Yx8z5rA==" }, "node_modules/embla-carousel-react": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.0.0.tgz", - "integrity": "sha512-qT0dii8ZwoCtEIBE6ogjqU2+5IwnGfdt2teKjCzW88JRErflhlCpz8KjWnW8xoRZOP8g0clRtsMEFoAgS/elfA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.0.2.tgz", + "integrity": "sha512-RHe1GKLulOW8EDN+cJgbFbVVfRXcaLT2/89dyVw3ONGgVpZjD19wB87I1LUZ1aCzOSrTccx0PFSQanK4OOfGPA==", "dependencies": { - "embla-carousel": "8.0.0", - "embla-carousel-reactive-utils": "8.0.0" + "embla-carousel": "8.0.2", + "embla-carousel-reactive-utils": "8.0.2" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.1 || ^18.0.0" } }, "node_modules/embla-carousel-reactive-utils": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.0.0.tgz", - "integrity": "sha512-JCw0CqCXI7tbHDRogBb9PoeMLyjEC1vpN0lDOzUjmlfVgtfF+ffLaOK8bVtXVUEbNs/3guGe3NSzA5J5aYzLzw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.0.2.tgz", + "integrity": "sha512-nLZqDkQdO0hvOP49/dUwjkkepMnUXgIzhyRuDjwGqswpB4Ibnc5M+w7rSQQAM+uMj0cPaXnYOTlv8XD7I/zVNw==", "peerDependencies": { - "embla-carousel": "8.0.0" + "embla-carousel": "8.0.2" } }, "node_modules/events": { @@ -818,6 +737,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -857,19 +777,6 @@ "node": ">= 6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/get-nonce": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz", @@ -882,6 +789,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -902,21 +810,11 @@ "loose-envify": "^1.0.0" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -925,6 +823,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -936,6 +835,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, "engines": { "node": ">=0.12.0" } @@ -975,16 +875,16 @@ } }, "node_modules/mantine-datatable": { - "version": "7.6.1", - "resolved": "https://registry.npmjs.org/mantine-datatable/-/mantine-datatable-7.6.1.tgz", - "integrity": "sha512-iPxUEaO9n7RETSEZj9DY8TAL4m7d7hk8U3xULXWydt6ZnpNhv8hWkCsz0FSTZQZNoF/umH329xAtrTBEM8URkg==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/mantine-datatable/-/mantine-datatable-7.8.1.tgz", + "integrity": "sha512-lsU6tiM1m0N6A/b/nxjMYq+xEtFYbyFoYAyFL32rf7CKmcyygy9gSIm955RA0Hb41D99riI4Vz45fVzHbG/Y/Q==", "funding": { "type": "github", "url": "https://github.com/sponsors/icflorescu" }, "peerDependencies": { - "@mantine/core": ">=7", - "@mantine/hooks": ">=7", + "@mantine/core": ">=7.8", + "@mantine/hooks": ">=7.8", "clsx": ">=2", "react": ">=18.2" } @@ -1135,14 +1035,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -1160,6 +1052,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "engines": { "node": ">=8.6" }, @@ -1292,9 +1185,9 @@ } }, "node_modules/postcss-preset-mantine": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/postcss-preset-mantine/-/postcss-preset-mantine-1.13.0.tgz", - "integrity": "sha512-1bv/mQz2K+/FixIMxYd83BYH7PusDZaI7LpUtKbb1l/5N5w6t1p/V9ONHfRJeeAZyfa6Xc+AtR+95VKdFXRH1g==", + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/postcss-preset-mantine/-/postcss-preset-mantine-1.14.4.tgz", + "integrity": "sha512-T1K3MVhU1hA9mJWfqoGvMcK5WKcHpVi4JUX6AYTbESvp78WneB/KFONUi+eXDG9Lpw62W/KNxEYl1ic3Dpm88w==", "dev": true, "dependencies": { "postcss-mixins": "^9.0.4", @@ -1413,9 +1306,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.51.2", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.51.2.tgz", - "integrity": "sha512-y++lwaWjtzDt/XNnyGDQy6goHskFualmDlf+jzEZvjvz6KWDf7EboL7pUvRCzPTJd0EOPpdekYaQLEvvG6m6HA==", + "version": "7.51.3", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.51.3.tgz", + "integrity": "sha512-cvJ/wbHdhYx8aviSWh28w9ImjmVsb5Y05n1+FW786vEZQJV5STNM0pW6ujS+oiBecb0ARBxJFyAnXj9+GHXACQ==", "engines": { "node": ">=12.22.0" }, @@ -1542,17 +1435,6 @@ "react-dom": ">=16.6.0" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/regenerator-runtime": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", @@ -1662,6 +1544,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -1675,20 +1558,20 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.15.0.tgz", + "integrity": "sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==", "engines": { - "node": ">=14.16" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1702,17 +1585,6 @@ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, - "node_modules/unplugin": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.7.1.tgz", - "integrity": "sha512-JqzORDAPxxs8ErLV4x+LL7bk5pk3YlcWqpSNsIkAZj972KzFZLClc/ekppahKkOczGkwIG6ElFgdOgOlK4tXZw==", - "dependencies": { - "acorn": "^8.11.3", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.6.1" - } - }, "node_modules/url-polyfill": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/url-polyfill/-/url-polyfill-1.1.12.tgz", @@ -1810,31 +1682,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/vidstack": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/vidstack/-/vidstack-1.10.7.tgz", - "integrity": "sha512-wb0TqvHe0LPUN6i1kcv94C4hpyP9Ueh6ZBBKlrxkDqVlC7EKX1kX8xj5BkgYnMj4ZcoQQL666YwkWyuo9zCHfw==", - "dependencies": { - "media-captions": "^1.0.1", - "unplugin": "^1.6.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-virtual-modules": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.1.tgz", - "integrity": "sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==" - }, "node_modules/zustand": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.2.tgz", diff --git a/package.json b/package.json index a259a82..a2effa4 100644 --- a/package.json +++ b/package.json @@ -9,40 +9,39 @@ "lint": "next lint" }, "dependencies": { - "@mantine/carousel": "^7.5.3", - "@mantine/core": "^7.5.3", - "@mantine/dates": "^7.5.3", - "@mantine/form": "^7.5.3", - "@mantine/hooks": "^7.5.3", - "@mantine/notifications": "^7.5.3", + "@mantine/carousel": "^7.8.0", + "@mantine/core": "^7.8.0", + "@mantine/dates": "^7.8.0", + "@mantine/form": "^7.8.0", + "@mantine/hooks": "^7.8.0", + "@mantine/notifications": "^7.8.0", "@tabler/icons-react": "^2.47.0", - "@tanstack/react-query": "^5.28.9", - "@tanstack/react-query-devtools": "^5.28.10", - "@types/node": "20.12.2", - "@types/react": "18.2.73", - "@types/react-dom": "18.2.23", - "@vidstack/react": "^1.10.7", + "@tanstack/react-query": "^5.29.2", + "@tanstack/react-query-devtools": "^5.29.2", + "@types/node": "20.12.7", + "@types/react": "18.2.79", + "@types/react-dom": "18.2.25", + "@vidstack/react": "^1.11.17", "axios": "^1.6.8", "clsx": "^2.1.0", "cookies-next": "^2.1.1", "dayjs": "^1.11.10", - "embla-carousel-react": "^8.0.0", + "embla-carousel-react": "^8.0.2", "events": "^3.3.0", "lodash": "^4.17.21", - "mantine-datatable": "^7.6.1", + "mantine-datatable": "^7.8.1", "media-icons": "^0.10.0", "next": "^14.1.4", "plyr-react": "^5.3.0", "react": "18.2.0", "react-dom": "18.2.0", - "react-hook-form": "^7.51.2", - "typescript": "5.4.3", - "vidstack": "^1.10.7", + "react-hook-form": "^7.51.3", + "typescript": "5.4.5", "zustand": "^4.5.2" }, "devDependencies": { "postcss": "^8.4.38", - "postcss-preset-mantine": "^1.13.0", + "postcss-preset-mantine": "^1.14.4", "postcss-simple-vars": "^7.0.1" } } diff --git a/src/components/Admin/Watched/Drawer.tsx b/src/components/Admin/Watched/Drawer.tsx index 5c59238..40ca664 100644 --- a/src/components/Admin/Watched/Drawer.tsx +++ b/src/components/Admin/Watched/Drawer.tsx @@ -1,11 +1,16 @@ import { + ActionIcon, + Box, Button, + Checkbox, Divider, + Grid, Group, Loader, MultiSelect, NumberInput, Select, + SimpleGrid, Switch, Text, TextInput, @@ -16,7 +21,9 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { useApi } from "../../../hooks/useApi"; -import GanymedeLoader from "../../Utils/GanymedeLoader"; +import { LiveTitleRegex } from "../../../ganymede-defs"; +import { IconPlus, IconTrash } from "@tabler/icons-react"; +import classes from "./Watched.module.css" const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { const { handleSubmit } = useForm(); @@ -42,6 +49,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { [] ); const [selectedTwitchCategories, setSelectedTwitchCategories] = useState([]); + const [liveTitleRegexes, setLiveTitleRegexes] = useState([]); const qualityOptions = [ { label: "Best", value: "best" }, @@ -66,6 +74,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { setRenderChat(watched?.render_chat); setDownloadSubOnly(watched?.download_sub_only); setMaxVideoAge(watched?.video_age); + setLiveTitleRegexes(watched?.edges.title_regex) if (watched?.edges?.categories) { const tmpArr = []; @@ -100,6 +109,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, max_age: maxVideoAge, + regex: liveTitleRegexes }, withCredentials: true, }, @@ -140,6 +150,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, max_age: maxVideoAge, + regex: liveTitleRegexes }, withCredentials: true, }, @@ -163,6 +174,7 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { download_sub_only: downloadSubOnly, categories: selectedTwitchCategories, max_age: maxVideoAge, + regex: liveTitleRegexes }, withCredentials: true, }, @@ -213,8 +225,13 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { }, }); + const getTwitchCategoriesClick = () => { + getTwitchCategories() + } + // Fetch categories - const { data: twitchCategoriesResp } = useQuery({ + const { data: twitchCategoriesResp, refetch: getTwitchCategories } = useQuery({ + enabled: false, queryKey: ["admin-categories"], queryFn: () => { setTwitchCategoriesLoading(true); @@ -373,9 +390,97 @@ const AdminWatchedDrawer = ({ handleClose, watched, mode }) => { onChange={setMaxVideoAge} /> + + {/* title regex */} + + Title Regex + { + const newRegex: LiveTitleRegex = { + apply_to_videos: false, + case_sensitive: false, + negative: false, + regex: "" + } + setLiveTitleRegexes(liveTitleRegexes => [...(liveTitleRegexes ?? []), newRegex]) + }}> + + + +
+ Use regex to filter and match specific patterns in livestream and video titles. See wiki for more information. +
+ +
+ {liveTitleRegexes && liveTitleRegexes.map((regex: LiveTitleRegex, index) => ( +
+ + + { + const updatedRegexes = [...liveTitleRegexes]; + updatedRegexes[index].regex = e.currentTarget.value; + setLiveTitleRegexes(updatedRegexes) + }} + /> + + { + const updatedRegexes = [...liveTitleRegexes]; + updatedRegexes[index].negative = e.currentTarget.checked; + setLiveTitleRegexes(updatedRegexes) + }} + /> + { + const updatedRegexes = [...liveTitleRegexes]; + updatedRegexes[index].apply_to_videos = e.currentTarget.checked; + setLiveTitleRegexes(updatedRegexes) + }} + /> + + + + + { + const updatedRegexs = [...liveTitleRegexes] + updatedRegexs.splice(index, 1) + setLiveTitleRegexes(updatedRegexs) + }}> + + + + + +
+ ))} +
+ + + + Categories + +
+ Archive videos from these categories. Leave blank to archive all categories. Does not apply to live streams. +
+
- {twitchCategoriesLoading || formattedTwitchCategories.length == 0 ? ( - + {formattedTwitchCategories.length == 0 ? ( + ) : ( { onChange={setSelectedTwitchCategories} data={formattedTwitchCategories} comboboxProps={{ position: 'top', middlewares: { flip: false, shift: false } }} - label="Archive specific video categories" placeholder="Search for a category" - description="Archive only videos from these categories. Leave blank to archive all categories. Does not apply to live streams." clearButtonLabel="Clear selection" clearable /> diff --git a/src/components/Admin/Watched/Watched.module.css b/src/components/Admin/Watched/Watched.module.css index 8158372..df40f4d 100644 --- a/src/components/Admin/Watched/Watched.module.css +++ b/src/components/Admin/Watched/Watched.module.css @@ -6,4 +6,7 @@ } .queueDrawer { overflow-y: scroll; +} +.link { + color: var(--mantine-color-blue-6); } \ No newline at end of file diff --git a/src/components/Vod/VideoPlayer.tsx b/src/components/Vod/VideoPlayer.tsx index 19ee1a2..5295883 100644 --- a/src/components/Vod/VideoPlayer.tsx +++ b/src/components/Vod/VideoPlayer.tsx @@ -8,7 +8,7 @@ import { useQuery } from "@tanstack/react-query"; import '@vidstack/react/player/styles/default/theme.css'; import '@vidstack/react/player/styles/default/layouts/video.css'; -import { MediaPlayer, MediaPlayerInstance, MediaProvider, Poster, Track } from '@vidstack/react'; +import { MediaPlayer, MediaPlayerInstance, MediaProvider, MediaSrc, Poster, Track, VideoMimeType } from '@vidstack/react'; import { defaultLayoutIcons, DefaultVideoLayout } from '@vidstack/react/player/layouts/default'; import TheaterModeIcon from "./TheaterModeIcon"; import { escapeURL } from "../../util/util"; @@ -24,7 +24,7 @@ const NewVideoPlayer = ({ vod }: any) => { const player = useRef(null) - const [videoSource, setVideoSource] = useState([{ src: "", type: "" }]); + const [videoSource, setVideoSource] = useState(); const [videoType, setVideoType] = useState(""); const [videoPoster, setVideoPoster] = useState(""); const [videoTitle, setVideoTitle] = useState(""); @@ -97,17 +97,15 @@ const NewVideoPlayer = ({ vod }: any) => { if (!player) return; const ext = vod.video_path.substr(vod.video_path.length - 4); - let type = "video/mp4"; + let type: VideoMimeType = "video/mp4"; if (ext == "m3u8") { - type = "application/x-mpegURL"; + type = "application/x-mpegurl"; } - setVideoSource([ - { - src: `${publicRuntimeConfig.CDN_URL}${escapeURL(vod.video_path)}`, - type: type, - }, - ]); + setVideoSource({ + src: `${publicRuntimeConfig.CDN_URL}${escapeURL(vod.video_path)}`, + type: type + }) setVideoType(type); setVideoTitle(vod.title); diff --git a/src/ganymede-defs.d.ts b/src/ganymede-defs.d.ts index af541ad..5201486 100644 --- a/src/ganymede-defs.d.ts +++ b/src/ganymede-defs.d.ts @@ -167,3 +167,24 @@ export interface ProxyItem { url: string; header: string; } + +export interface Chapter { + startTime: string; + endTime: string; + text: string; +} + +export interface ChapterData { + id: string; + type: string; + title: string; + start?: number; + end: number; + edges: any; +} + +export interface LiveTitleRegex { + regex: string; + negative: boolean; + apply_to_videos: boolean; +} \ No newline at end of file diff --git a/src/pages/vods/[vodId].tsx b/src/pages/vods/[vodId].tsx index ecf0369..b4b970f 100644 --- a/src/pages/vods/[vodId].tsx +++ b/src/pages/vods/[vodId].tsx @@ -17,7 +17,7 @@ import classes from "./vodId.module.css" async function fetchVod(vodId: string) { return useApi( - { method: "GET", url: `/api/v1/vod/${vodId}?with_channel=true` }, + { method: "GET", url: `/api/v1/vod/${vodId}?with_channel=true&with_chapters=true&with_muted_segments=true` }, false ).then((res) => res?.data); }