feat: 重命名pm2.sh为deploy.sh并实现自动部署功能

- 重命名pm2.sh为deploy.sh
- 实现自动从远程仓库拉取代码功能
- 添加自动构建功能
- 智能检测PM2进程状态,自动重载或创建进程
- 添加中文输出信息和错误处理

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-24 05:54:23 +08:00
parent 33cdc42b1f
commit 2f16ff959b
3 changed files with 84 additions and 2 deletions

View File

@@ -80,11 +80,28 @@ export function BatchOperations({ selectedCount, selectedAccounts, stats, onBatc
};
const handleDownloadTxt = () => {
const platforms = Array.from(new Set(selectedAccounts.map(account => account.platform)));
const owners = Array.from(new Set(selectedAccounts.map(account => account.ownerId)));
// 构建文件名部分
const platformPart = platforms.length === 1 ? platforms[0] : `${platforms.length}个平台`;
const ownerPart = owners.length === 1 ? owners[0] : `${owners.length}个用户`;
const countPart = `${exportData.count}个账户`;
const datePart = new Date().toLocaleString('zh-CN', {
timeZone: 'Asia/Shanghai',
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
}).replace(/[\/\s:]/g, '-');
const blob = new Blob([exportData.text], { type: 'text/plain;charset=utf-8' });
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = `accounts_export_${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.txt`;
link.download = `${platformPart}_${ownerPart}_${countPart}_${datePart}.txt`;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);