修复系统通知错误提示,gotifyPriority 配置参数

This commit is contained in:
whyour
2023-05-03 18:18:28 +08:00
parent 77dc7817fb
commit 9db0095e29
3 changed files with 246 additions and 169 deletions
+11 -5
View File
@@ -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>