diff --git a/src/pages/AdminSettings.tsx b/src/pages/AdminSettings.tsx index 2efd701..0391ea7 100644 --- a/src/pages/AdminSettings.tsx +++ b/src/pages/AdminSettings.tsx @@ -929,6 +929,7 @@ interface MqttClient { topic_scope: string can_publish: boolean can_subscribe: boolean + is_service: boolean active: boolean created_at: string revoked_at: string | null @@ -942,6 +943,7 @@ function MqttClientsTab() { const [topicScope, setTopicScope] = useState('') const [canPublish, setCanPublish] = useState(false) const [canSubscribe, setCanSubscribe] = useState(true) + const [isService, setIsService] = useState(false) const [creating, setCreating] = useState(false) const [error, setError] = useState('') const [created, setCreated] = useState<{ username: string; password: string } | null>(null) @@ -969,14 +971,14 @@ function MqttClientsTab() { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: name.trim(), topic_scope: topicScope.trim(), - can_publish: canPublish, can_subscribe: canSubscribe, + can_publish: canPublish, can_subscribe: canSubscribe, is_service: isService, }), }) const data = await res.json() if (!res.ok) { setError(data.error || 'Failed to create client'); return } setCreated({ username: data.username, password: data.password }) setShowForm(false) - setName(''); setTopicScope(''); setCanPublish(false); setCanSubscribe(true) + setName(''); setTopicScope(''); setCanPublish(false); setCanSubscribe(true); setIsService(false) load() } finally { setCreating(false) @@ -1050,6 +1052,17 @@ function MqttClientsTab() { setCanSubscribe(e.target.checked)} /> Can subscribe +
{c.topic_scope}