新增控制台配置项;修改图片列表字段
This commit is contained in:
@@ -32,6 +32,36 @@ export interface CronSpec {
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'disableSyncList'?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'parallelCount'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'enableWeiboImageRecordAndDownload'?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'imageSavePath'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'imageBaseUrl'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CronSpec
|
||||
*/
|
||||
'imageReferer'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
|
||||
@@ -38,6 +38,12 @@ export interface FriendPostSpec {
|
||||
* @memberof FriendPostSpec
|
||||
*/
|
||||
'description'?: string;
|
||||
/**
|
||||
* Comma-separated image file names.
|
||||
* @type {string}
|
||||
* @memberof FriendPostSpec
|
||||
*/
|
||||
'imageFiles'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
|
||||
@@ -18,7 +18,12 @@ const initialFormState: CronFriendPost = {
|
||||
cron: "@daily",
|
||||
timezone:"Asia/Shanghai",
|
||||
suspend: false,
|
||||
enableWeiboImageRecordAndDownload: false,
|
||||
parallelCount: 1,
|
||||
successfulRetainLimit: 0,
|
||||
imageSavePath: "",
|
||||
imageBaseUrl: "",
|
||||
imageReferer: "",
|
||||
disableSyncList: undefined,
|
||||
},
|
||||
kind: "CronFriendPost",
|
||||
@@ -130,6 +135,20 @@ const { mutate:save, isLoading:saveIsLoading } = useMutation({
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<FormKit
|
||||
type="number"
|
||||
name="parallelCount"
|
||||
label="并行请求数量"
|
||||
number="integer"
|
||||
validation="required|number|min:1"
|
||||
help="默认 1(串行),大于 1 为并行"
|
||||
/>
|
||||
<FormKit
|
||||
type="checkbox"
|
||||
name="enableWeiboImageRecordAndDownload"
|
||||
label="记录并下载微博图片"
|
||||
help="默认关闭,开启后才会记录 imageFiles 字段并下载微博图片"
|
||||
/>
|
||||
<FormKit
|
||||
type="number"
|
||||
name="successfulRetainLimit"
|
||||
@@ -138,6 +157,24 @@ const { mutate:save, isLoading:saveIsLoading } = useMutation({
|
||||
validation="required|number|min:0"
|
||||
help="设置之后会保留的数据条数,设置为 0 即为5条"
|
||||
/>
|
||||
<FormKit
|
||||
type="text"
|
||||
name="imageSavePath"
|
||||
label="图片保存路径"
|
||||
help="为空时使用默认路径 /root/.halo2/attachments/upload/image-host/"
|
||||
/>
|
||||
<FormKit
|
||||
type="text"
|
||||
name="imageBaseUrl"
|
||||
label="图片下载 Base URL"
|
||||
help="为空时默认 https://wx3.sinaimg.cn/middle/"
|
||||
/>
|
||||
<FormKit
|
||||
type="text"
|
||||
name="imageReferer"
|
||||
label="图片下载 Referer"
|
||||
help="当 Base URL 为空时默认 https://weibo.com/;当 Base URL 不为空时可留空"
|
||||
/>
|
||||
<LinkFormKit
|
||||
name="disableSyncList"
|
||||
label="禁止同步名单"
|
||||
|
||||
Reference in New Issue
Block a user