增加拖拽排序

This commit is contained in:
qaq
2025-08-05 22:16:21 +08:00
parent a06904ee3a
commit 62f9da97f4
16 changed files with 462 additions and 56 deletions
+52 -45
View File
@@ -688,51 +688,58 @@ export default function UserPage() {
</div>
</div>
<div className="flex gap-1.5 mt-3">
<Button
size="sm"
variant="flat"
color="primary"
onPress={() => handleEdit(user)}
className="flex-1 min-h-8"
startContent={<EditIcon className="w-3 h-3" />}
>
编辑
</Button>
<Button
size="sm"
variant="flat"
color="warning"
onPress={() => handleResetFlow(user)}
className="flex-1 min-h-8"
startContent={
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clipRule="evenodd" />
</svg>
}
>
重置
</Button>
<Button
size="sm"
variant="flat"
color="success"
onPress={() => handleManageTunnels(user)}
className="flex-1 min-h-8"
startContent={<SettingsIcon className="w-3 h-3" />}
>
权限
</Button>
<Button
size="sm"
variant="flat"
color="danger"
onPress={() => handleDelete(user)}
className="flex-1 min-h-8"
startContent={<DeleteIcon className="w-3 h-3" />}
>
删除
</Button>
<div className="space-y-1.5 mt-3">
{/* 第一行:编辑和重置 */}
<div className="flex gap-1.5">
<Button
size="sm"
variant="flat"
color="primary"
onPress={() => handleEdit(user)}
className="flex-1 min-h-8"
startContent={<EditIcon className="w-3 h-3" />}
>
编辑
</Button>
<Button
size="sm"
variant="flat"
color="warning"
onPress={() => handleResetFlow(user)}
className="flex-1 min-h-8"
startContent={
<svg className="w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
<path fillRule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clipRule="evenodd" />
</svg>
}
>
重置
</Button>
</div>
{/* 第二行:权限和删除 */}
<div className="flex gap-1.5">
<Button
size="sm"
variant="flat"
color="success"
onPress={() => handleManageTunnels(user)}
className="flex-1 min-h-8"
startContent={<SettingsIcon className="w-3 h-3" />}
>
权限
</Button>
<Button
size="sm"
variant="flat"
color="danger"
onPress={() => handleDelete(user)}
className="flex-1 min-h-8"
startContent={<DeleteIcon className="w-3 h-3" />}
>
删除
</Button>
</div>
</div>
</CardBody>
</Card>