Bilibili 配置
diff --git a/server/components/contents/generic.jsx b/server/components/contents/generic.jsx
index 5842c1e..e7a2799 100644
--- a/server/components/contents/generic.jsx
+++ b/server/components/contents/generic.jsx
@@ -1,5 +1,6 @@
import { useState, useEffect } from 'react';
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
+import Toast from "../toast.jsx";
export default function Generic() {
const [config, setConfig] = useState({
@@ -13,6 +14,7 @@ export default function Generic() {
queueConcurrency: 1,
videoDownloadConcurrency: 1,
autoclearTrashtime: '0 0 8 * * ?',
+ xiaohongshuCookie: '',
deeplApiUrls: ''
});
@@ -34,6 +36,7 @@ export default function Generic() {
queueConcurrency: yamlConfig.queueConcurrency || 1,
videoDownloadConcurrency: yamlConfig.videoDownloadConcurrency || 1,
autoclearTrashtime: yamlConfig.autoclearTrashtime || '0 0 8 * * ?',
+ xiaohongshuCookie: yamlConfig.xiaohongshuCookie || '',
deeplApiUrls: yamlConfig.deeplApiUrls || ''
});
}
@@ -57,6 +60,7 @@ export default function Generic() {
queueConcurrency: config.queueConcurrency,
videoDownloadConcurrency: config.videoDownloadConcurrency,
autoclearTrashtime: config.autoclearTrashtime,
+ xiaohongshuCookie: config.xiaohongshuCookie,
deeplApiUrls: config.deeplApiUrls
});
@@ -88,7 +92,8 @@ export default function Generic() {
queueConcurrency: yamlConfig.queueConcurrency || 1,
videoDownloadConcurrency: yamlConfig.videoDownloadConcurrency || 1,
autoclearTrashtime: yamlConfig.autoclearTrashtime || '0 0 8 * * ?',
- deeplApiUrls: yamlConfig.deeplApiUrls || ''
+ xiaohongshuCookie: yamlConfig.xiaohongshuCookie || '',
+ deeplApiUrls: yamlConfig.deeplApiUrls || '',
});
}
};
@@ -96,11 +101,7 @@ export default function Generic() {
return (
{/* 成功提示 */}
-
+
通用配置
@@ -110,7 +111,7 @@ export default function Generic() {
基础配置
- {/* 路径和大小限制配置 */}
+ {/* 路径和大小限制配置 */ }
- {/* 代理配置 */}
+ {/* 代理配置 */ }
- {/* 其他基础配置 */}
+ {/* 其他基础配置 */ }
- {/* 并发和定时配置 */}
+ {/* 并发和定时配置 */ }
- {/* DeepL API配置 */}
+ {/* DeepL API配置 */ }
- {/* 开关配置 */}
+ {/* 开关配置 */ }
@@ -249,7 +262,21 @@ export default function Generic() {
- {/* 定时清理配置 */}
+ {/* 小红书 Cookie */ }
+
+
+ setConfig({ ...config, xiaohongshuCookie: e.target.value }) }
+ placeholder="请输入小红书的Cookie..."
+ className="input input-bordered"
+ />
+
+
+ {/* 定时清理配置 */ }
setConfig({ ...config, autoclearTrashtime: e.target.value })}
+ value={ config.autoclearTrashtime }
+ onChange={ (e) => setConfig({ ...config, autoclearTrashtime: e.target.value }) }
placeholder="请输入Cron表达式..."
className="input input-bordered"
/>
@@ -266,21 +293,21 @@ export default function Generic() {
- {/* 保存按钮 */}
+ {/* 保存按钮 */ }
diff --git a/server/components/contents/ncm.jsx b/server/components/contents/ncm.jsx
index 0df7e4e..f4de29e 100644
--- a/server/components/contents/ncm.jsx
+++ b/server/components/contents/ncm.jsx
@@ -1,6 +1,7 @@
import { useState, useEffect } from 'react';
import { NETEASECLOUD_QUALITY_LIST } from "../../../constants/constant.js";
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
+import Toast from "../toast.jsx";
export default function Ncm() {
const [config, setConfig] = useState({
@@ -85,11 +86,7 @@ export default function Ncm() {
return (
{/* 成功提示 */}
-
+
网易云音乐配置
diff --git a/server/components/contents/tiktok.jsx b/server/components/contents/tiktok.jsx
index e43d7ef..14d9507 100644
--- a/server/components/contents/tiktok.jsx
+++ b/server/components/contents/tiktok.jsx
@@ -1,5 +1,6 @@
import { useState, useEffect } from 'react';
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
+import Toast from "../toast.jsx";
export default function Tiktok() {
const [config, setConfig] = useState({
@@ -64,11 +65,7 @@ export default function Tiktok() {
return (
{/* 成功提示 */}
-
+
抖音配置
diff --git a/server/components/contents/youtube.jsx b/server/components/contents/youtube.jsx
index 90e9923..0c07db5 100644
--- a/server/components/contents/youtube.jsx
+++ b/server/components/contents/youtube.jsx
@@ -1,6 +1,7 @@
import { useState, useEffect } from 'react';
import { BILI_CDN_SELECT_LIST, YOUTUBE_GRAPHICS_LIST } from "../../../constants/constant.js";
import { readYamlConfig, updateYamlConfig } from '../../utils/yamlHelper';
+import Toast from "../toast.jsx";
export default function Youtube() {
const [config, setConfig] = useState({
@@ -69,11 +70,7 @@ export default function Youtube() {
return (
{/* 成功提示 */}
-
+
YouTube 配置
diff --git a/server/components/toast.jsx b/server/components/toast.jsx
new file mode 100644
index 0000000..512fb87
--- /dev/null
+++ b/server/components/toast.jsx
@@ -0,0 +1,9 @@
+export default function Toast({ id }) {
+ return (
+
+ );
+};