fix: Can now connect to clusters individually
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
ArrowDown, ArrowUp, ArrowLeft, ArrowRight, Copy, Plus, Star, StarOff, Trash2,
|
||||
ChevronDown, ChevronRight,
|
||||
User, Database, Radio, Cog, Server, Award, Antenna as AntennaIcon,
|
||||
Compass, Wifi, Construction, UploadCloud, Loader2, FolderOpen, Play,
|
||||
Compass, Wifi, Construction, UploadCloud, Loader2, FolderOpen, Play, Power,
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
GetLookupSettings, SaveLookupSettings, ClearLookupCache, TestLookupProvider,
|
||||
@@ -2481,7 +2481,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
<th className="text-left px-3 py-2">{t('clu.name')}</th>
|
||||
<th className="text-left px-3 py-2">{t('clu.hostPort')}</th>
|
||||
<th className="text-left px-3 py-2 w-28">{t('clu.status')}</th>
|
||||
<th className="px-3 py-2 w-32">{t('clu.actions')}</th>
|
||||
<th className="px-3 py-2 w-40">{t('clu.actions')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -2518,6 +2518,15 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan
|
||||
</td>
|
||||
<td className="px-2 py-2">
|
||||
<div className="flex items-center gap-0.5 justify-end">
|
||||
{state === 'connected' || state === 'connecting' || state === 'reconnecting' ? (
|
||||
<Button variant="ghost" size="icon" className="size-6 text-emerald-600 hover:text-emerald-700"
|
||||
onClick={async () => { await DisconnectClusterServer(s.id as number).catch(() => {}); await reloadClusterServers(); }}
|
||||
title={t('clu.disconnect')}><Power className="size-3.5" /></Button>
|
||||
) : (
|
||||
<Button variant="ghost" size="icon" className="size-6"
|
||||
onClick={async () => { await ConnectClusterServer(s.id as number).catch(() => {}); await reloadClusterServers(); }}
|
||||
title={t('clu.connect')}><Power className="size-3.5" /></Button>
|
||||
)}
|
||||
<Button variant="ghost" size="icon" className="size-6" disabled={i === 0} onClick={() => clusterMove(s, -1)} title={t('clu.moveUp')}><ArrowUp className="size-3" /></Button>
|
||||
<Button variant="ghost" size="icon" className="size-6" disabled={i === sorted.length - 1} onClick={() => clusterMove(s, 1)} title={t('clu.moveDown')}><ArrowDown className="size-3" /></Button>
|
||||
<Button variant="ghost" size="icon" className="size-6" onClick={() => setEditingServer(s)} title={t('clu.edit')}><Cog className="size-3.5" /></Button>
|
||||
|
||||
Reference in New Issue
Block a user