diff --git a/src/pages/Settings.tsx b/src/pages/Settings.tsx index 7acac7a..5082bf2 100644 --- a/src/pages/Settings.tsx +++ b/src/pages/Settings.tsx @@ -747,7 +747,8 @@ function IntegrationsSection() { setStatusMsg((prev) => ({ ...prev, [rowKey]: '' })) try { const { config, secrets } = buildPayload(def, editDrafts[existing.id] ?? {}) - const { integration } = await api.updateIntegration(existing.id, { config, secrets }) + const name = editDrafts[existing.id]?.__name?.trim() + const { integration } = await api.updateIntegration(existing.id, { ...(name ? { name } : {}), config, secrets }) setIntegrations((prev) => (prev ?? []).map((i) => (i.id === integration.id ? integration : i))) setStatusMsg((prev) => ({ ...prev, [rowKey]: 'Saved' })) } catch (err) { @@ -763,7 +764,8 @@ function IntegrationsSection() { setStatusMsg((prev) => ({ ...prev, [rowKey]: '' })) try { const { config, secrets } = buildPayload(def, draft.values) - const { integration } = await api.createIntegration({ type: def.type, name: def.name, config, secrets }) + const name = draft.values.__name?.trim() || def.name + const { integration } = await api.createIntegration({ type: def.type, name, config, secrets }) setIntegrations((prev) => [...(prev ?? []), integration]) removeNewDraft(draft.id) } catch (err) { @@ -879,7 +881,11 @@ function IntegrationsSection() { boxShadow: online ? '0 0 6px rgba(46,204,113,0.6)' : 'none', }} /> - {existing.name || def.name} + setEditField(existing.id, '__name', e.target.value)} + style={{ fontSize: '13px', color: '#E8E6E0', fontWeight: 600, backgroundColor: 'transparent', border: 'none', outline: 'none', padding: 0, width: '160px' }} + /> {existing.config.baseUrl || existing.config.hostname ? ( {existing.config.baseUrl || existing.config.hostname} ) : null} @@ -952,6 +958,17 @@ function IntegrationsSection() { +
+
+ + setNewDraftField(draft.id, '__name', e.target.value)} + placeholder={def.name} + /> +
+
{renderFields( def, rowKey,