mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-07-16 21:53:01 +08:00
update
This commit is contained in:
parent
82a13ceb66
commit
ae62a763ed
@ -26,7 +26,7 @@ function InputTagCustom(prop: InputTagCustomProp) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{
|
{
|
||||||
prop.disabled ? <Tag color="red">不支持标签</Tag>:
|
prop.disabled ? <Tag color="default">不支持标签</Tag>:
|
||||||
<>
|
<>
|
||||||
{value.length === 0 &&
|
{value.length === 0 &&
|
||||||
<Tag color="green">全部标签</Tag>
|
<Tag color="green">全部标签</Tag>
|
||||||
@ -77,9 +77,12 @@ export function AddModal({
|
|||||||
}
|
}
|
||||||
const handleSubmit = (value: any) => {
|
const handleSubmit = (value: any) => {
|
||||||
let newVal = Object.assign({}, value)
|
let newVal = Object.assign({}, value)
|
||||||
if (typeof newVal.tags != 'object') {
|
if (typeof newVal.tags !== 'object') {
|
||||||
newVal.tags = []
|
newVal.tags = []
|
||||||
}
|
}
|
||||||
|
if (typeof newVal.cats !== 'object') {
|
||||||
|
newVal.cats = []
|
||||||
|
}
|
||||||
if (newVal.target === '') {
|
if (newVal.target === '') {
|
||||||
newVal.target = 'default'
|
newVal.target = 'default'
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ export function SubscribeCard({groupNumber, config, reload, groupSubscribes}: Su
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Col span={6} key={`${config.platformName}-${config.target}`}>
|
<Col span={8} key={`${config.platformName}-${config.target}`}>
|
||||||
<Card title={`${platformConf.name} - ${config.targetName}`}
|
<Card title={`${platformConf.name} - ${config.targetName}`}
|
||||||
actions={[
|
actions={[
|
||||||
<Tooltip title="编辑">
|
<Tooltip title="编辑">
|
||||||
@ -81,15 +81,18 @@ export function SubscribeCard({groupNumber, config, reload, groupSubscribes}: Su
|
|||||||
<Tooltip title="删除" ><DeleteOutlined /></Tooltip>
|
<Tooltip title="删除" ><DeleteOutlined /></Tooltip>
|
||||||
</Popconfirm>,
|
</Popconfirm>,
|
||||||
]}>
|
]}>
|
||||||
<Form labelCol={{ span: 6 }}>
|
<Form labelCol={{ span: 4 }}>
|
||||||
|
<Form.Item label="订阅帐号">
|
||||||
|
{ platformConf.hasTarget ? config.target : <Tag color="default">无帐号</Tag> }
|
||||||
|
</Form.Item>
|
||||||
<Form.Item label="订阅类型">
|
<Form.Item label="订阅类型">
|
||||||
{Object.keys(platformConf.categories).length > 0 ?
|
{Object.keys(platformConf.categories).length > 0 ?
|
||||||
config.cats.map((catKey: number) => (<Tag color="green" key={catKey}>{platformConf.categories[catKey]}</Tag>)) :
|
config.cats.map((catKey: number) => (<Tag color="green" key={catKey}>{platformConf.categories[catKey]}</Tag>)) :
|
||||||
<Tag color="red">不支持类型</Tag>}
|
<Tag color="default">不支持类型</Tag>}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="订阅Tag">
|
<Form.Item label="订阅Tag">
|
||||||
{platformConf.enabledTag ? config.tags.length > 0 ? config.tags.map(tag => (<Tag color="green" key={tag}>{tag}</Tag>)) : (<Tag color="blue">全部标签</Tag>) :
|
{platformConf.enabledTag ? config.tags.length > 0 ? config.tags.map(tag => (<Tag color="green" key={tag}>{tag}</Tag>)) : (<Tag color="blue">全部标签</Tag>) :
|
||||||
<Tag color="red">不支持Tag</Tag>}
|
<Tag color="default">不支持Tag</Tag>}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -37,7 +37,8 @@ export function ConfigPage(prop: ConfigPageProp) {
|
|||||||
<Collapse.Panel key={key} header={
|
<Collapse.Panel key={key} header={
|
||||||
<span>{`${key} - ${value.name}`}<Button style={{float: "right"}} onClick={clickNew(key)}>添加</Button></span>
|
<span>{`${key} - ${value.name}`}<Button style={{float: "right"}} onClick={clickNew(key)}>添加</Button></span>
|
||||||
}>
|
}>
|
||||||
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }} align="middle">
|
<Row gutter={[{ xs: 8, sm: 16, md: 24, lg: 32},
|
||||||
|
{ xs: 8, sm: 16, md: 24, lg: 32}]} align="middle">
|
||||||
{value.subscribes.map((subs, idx) => <SubscribeCard key={idx}
|
{value.subscribes.map((subs, idx) => <SubscribeCard key={idx}
|
||||||
groupNumber={key} config={subs} groupSubscribes={configData} reload={loadData}
|
groupNumber={key} config={subs} groupSubscribes={configData} reload={loadData}
|
||||||
/>)}
|
/>)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user