From dec748931ae1043e65ed2e67939dfcba59630a99 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 1 Aug 2026 18:38:46 +0800 Subject: [PATCH] Update App.jsx via upload script - 2026-08-01 18:38:24 --- App.jsx | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/App.jsx b/App.jsx index 1b1023a..a750e50 100644 --- a/App.jsx +++ b/App.jsx @@ -1902,6 +1902,7 @@ function MainApp({ username, onLogout }) { const [dragCustomerIdx, setDragCustomerIdx] = useState(null); const [dragGroupState, setDragGroupState] = useState(null); // { category, index } + const [dragJmsIdx, setDragJmsIdx] = useState(null); const [pwCurrent, setPwCurrent] = useState(''); const [pwNew, setPwNew] = useState(''); @@ -2067,6 +2068,11 @@ function MainApp({ username, onLogout }) { setCustomers(prev => reorderArray(prev, dragCustomerIdx, dropIdx)); setDragCustomerIdx(null); } + function handleJmsDrop(dropIdx) { + if (dragJmsIdx === null || dragJmsIdx === dropIdx) { setDragJmsIdx(null); return; } + setJmsLines(prev => reorderArray(prev, dragJmsIdx, dropIdx)); + setDragJmsIdx(null); + } async function handleAddCatalogFile(file) { if (!file) return; const tempId = 'catdoc_' + Date.now().toString(36) + Math.random().toString(36).slice(2, 6); @@ -3142,6 +3148,10 @@ function MainApp({ username, onLogout }) { onDelete={deleteJmsLine} onCheck={checkJmsLineNow} onNotify={notify} + dragIdx={dragJmsIdx} + onDragStart={setDragJmsIdx} + onDrop={handleJmsDrop} + onDragEnd={() => setDragJmsIdx(null)} /> )} @@ -4228,7 +4238,7 @@ const JMS_PROTO_META = { 'vless-reality': { label: 'VLESS Reality' }, 'vless-cdn': { label: 'VLESS CDN' }, }; -const JMS_PROTOCOLS = ['ss', 'vmess', 'vless-reality']; +const JMS_PROTOCOLS = ['ss', 'vless-reality']; function jmsTimeAgo(ts) { if (!ts) return '尚未检测'; @@ -4279,7 +4289,7 @@ async function jmsResolveIp(domain) { return answer ? answer.data : null; } -function JmsLineCard({ line, ip, onRefreshIp, onCheck, onCopy, onQr, onDuplicate, onEdit, onDelete }) { +function JmsLineCard({ line, ip, onRefreshIp, onCheck, onCopy, onQr, onDuplicate, onEdit, onDelete, dragging, onCardDragStart, onCardDragOver, onCardDrop, onCardDragEnd }) { const meta = JMS_PROTO_META[line.protocol]; const status = line.monitorStatus || 'normal'; const dotClass = status === 'abnormal' ? 'jms-dot-abnormal' : status === 'checking' ? 'jms-dot-checking' : 'jms-dot-normal'; @@ -4288,12 +4298,21 @@ function JmsLineCard({ line, ip, onRefreshIp, onCheck, onCopy, onQr, onDuplicate const checkNote = isVlessCdn ? '检测方式:TCP端口连通性测试(HTTP状态码/WS握手结果仅作为附加参考,不参与判定)' : '检测方式:TCP端口连通性测试'; - const ipDisplay = ip === 'resolving' ? '解析中…' : (ip || '点击右侧刷新解析'); + const ipDisplay = ip === 'resolving' ? '解析中…' : (ip || '试试解析当前IP'); return ( -
+
+ {line.name || line.addr}
@@ -4350,14 +4369,6 @@ function JmsLineFormFields({ group, protocol, draft, setDraft }) {
); } - if (protocol === 'vmess') { - return ( -
-
UUID set({ uuid: e.target.value })} placeholder="用户UUID" />
-
AlterId set({ alterId: e.target.value })} />
-
- ); - } if (protocol === 'vless-reality') { return ( <> @@ -4377,7 +4388,7 @@ function JmsLineFormFields({ group, protocol, draft, setDraft }) { return null; } -function JmsPage({ lines, onSave, onDelete, onCheck, onNotify }) { +function JmsPage({ lines, onSave, onDelete, onCheck, onNotify, dragIdx, onDragStart, onDrop, onDragEnd }) { const [ipMap, setIpMap] = useState({}); const [modalOpen, setModalOpen] = useState(false); const [editingId, setEditingId] = useState(null); @@ -4389,7 +4400,6 @@ function JmsPage({ lines, onSave, onDelete, onCheck, onNotify }) { const total = lines.length; const ssCount = lines.filter(l => l.protocol === 'ss').length; - const vmessCount = lines.filter(l => l.protocol === 'vmess').length; const vlessCount = lines.filter(l => l.protocol.startsWith('vless')).length; async function refreshIp(id, addr) { @@ -4468,7 +4478,6 @@ function JmsPage({ lines, onSave, onDelete, onCheck, onNotify }) {

Just My Socks 节点管理

-
管理自建VLESS-CDN线路和 justmysocks2.net 订阅线路 · DNS解析、订阅链接、二维码和连通性监控
@@ -4476,13 +4485,12 @@ function JmsPage({ lines, onSave, onDelete, onCheck, onNotify }) {
{total}
线路总数
{ssCount}
SS
-
{vmessCount}
VMess
{vlessCount}
VLESS
{lines.length === 0 &&
还没有线路,点右上角"新增线路"添加
} - {lines.map(line => ( + {lines.map((line, idx) => ( onDragStart(idx)} + onCardDragOver={(e) => e.preventDefault()} + onCardDrop={() => onDrop(idx)} + onCardDragEnd={onDragEnd} /> ))}