mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复系统通知错误提示,gotifyPriority 配置参数
This commit is contained in:
@@ -12,6 +12,7 @@ const NotificationSetting = ({ data }: any) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleOk = (values: any) => {
|
||||
setLoading(true);
|
||||
const { type } = values;
|
||||
if (type == 'closed') {
|
||||
values.type = '';
|
||||
@@ -30,7 +31,8 @@ const NotificationSetting = ({ data }: any) => {
|
||||
})
|
||||
.catch((error: any) => {
|
||||
console.log(error);
|
||||
});
|
||||
})
|
||||
.finally(() => setLoading(false));
|
||||
};
|
||||
|
||||
const notificationModeChange = (value: string) => {
|
||||
@@ -56,7 +58,7 @@ const NotificationSetting = ({ data }: any) => {
|
||||
style={{ maxWidth: 400 }}
|
||||
initialValue={notificationMode}
|
||||
>
|
||||
<Select onChange={notificationModeChange}>
|
||||
<Select onChange={notificationModeChange} disabled={loading}>
|
||||
{config.notificationModes.map((x) => (
|
||||
<Option key={x.value} value={x.value}>
|
||||
{x.label}
|
||||
@@ -74,7 +76,10 @@ const NotificationSetting = ({ data }: any) => {
|
||||
style={{ maxWidth: 400 }}
|
||||
>
|
||||
{x.items ? (
|
||||
<Select placeholder={x.placeholder || `请选择${x.label}`}>
|
||||
<Select
|
||||
placeholder={x.placeholder || `请选择${x.label}`}
|
||||
disabled={loading}
|
||||
>
|
||||
{x.items.map((y) => (
|
||||
<Option key={y.value} value={y.value}>
|
||||
{y.label || y.value}
|
||||
@@ -83,14 +88,15 @@ const NotificationSetting = ({ data }: any) => {
|
||||
</Select>
|
||||
) : (
|
||||
<Input.TextArea
|
||||
disabled={loading}
|
||||
autoSize={true}
|
||||
placeholder={x.placeholder || `请输入${x.label}`}
|
||||
/>
|
||||
)}
|
||||
</Form.Item>
|
||||
))}
|
||||
<Button type="primary" htmlType="submit">
|
||||
保存
|
||||
<Button type="primary" htmlType="submit" disabled={loading}>
|
||||
{loading ? '测试中...' : '保存'}
|
||||
</Button>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user