mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-03 09:21:25 +08:00
✨ feat(mqtt): 新增 MQTT 数据源连接与测试发消息支持
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { Alert, Form, Input, Modal, Select, Space, Typography, message } from 'antd';
|
||||
import { Alert, Checkbox, Form, Input, Modal, Select, Space, Typography, message } from 'antd';
|
||||
|
||||
import { DBQuery } from '../../wailsjs/go/app/App';
|
||||
import type { SavedConnection } from '../types';
|
||||
@@ -149,6 +149,28 @@ const MessagePublishModal: React.FC<MessagePublishModalProps> = ({
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
{presentation.showQos && (
|
||||
<Form.Item
|
||||
label="QoS"
|
||||
name="qos"
|
||||
extra="0 为至多一次,1 为至少一次,2 为仅一次。"
|
||||
>
|
||||
<Select
|
||||
options={[
|
||||
{ label: '0 · At most once', value: 0 },
|
||||
{ label: '1 · At least once', value: 1 },
|
||||
{ label: '2 · Exactly once', value: 2 },
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
{presentation.showRetain && (
|
||||
<Form.Item name="retain" valuePropName="checked" style={{ marginBottom: 16 }}>
|
||||
<Checkbox>Retain 消息</Checkbox>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
{presentation.showKey && (
|
||||
<Form.Item label="消息 Key(可选)">
|
||||
<Space.Compact style={{ width: '100%' }}>
|
||||
|
||||
Reference in New Issue
Block a user