"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigView = void 0; const BaseView_1 = require("./BaseView"); class ConfigView extends BaseView_1.BaseView { render(data) { const container = data?.container; const configs = data?.configs || []; const gitRepos = data?.gitRepos || []; const currentGitRepo = data?.currentGitRepo; const gitFileTree = data?.gitFileTree || []; const gitLoading = data?.gitLoading || false; const gitBranches = data?.gitBranches || []; const gitRepoUrl = data?.gitRepoUrl || ''; // 生成配置列表的 HTML - 包含配置文件和 Git 仓库 const configsHtml = configs.map((config) => ` 🔧 ${config.name} 📄 ${config.fileName} `).join(''); // 生成 Git 仓库列表的 HTML - 以配置文件形式显示 const gitReposHtml = gitRepos.map(repo => ` 📁 ${repo.name}
模型1、模型2
${repo.url.split('/').pop()} `).join(''); // 生成分支选择的 HTML const branchesHtml = gitBranches.length > 0 ? this.generateBranchesHtml(gitBranches) : ''; return ` 配置管理 ${this.getStyles()}

⚙️ 配置管理 - ${container?.name || '未知容器'}

📋 配置文件管理

${configsHtml} ${gitReposHtml}
配置 文件 操作

📚 Git 仓库管理

🔗 添加 Git 仓库

${branchesHtml}
${currentGitRepo ? `
当前仓库: ${currentGitRepo.name} (${currentGitRepo.url})
` : ''}
`; } generateBranchesHtml(branches) { if (branches.length === 0) return ''; let html = '
'; html += '

🌿 选择要克隆的分支 (共 ' + branches.length + ' 个)

'; html += '
'; branches.forEach(branch => { const branchId = 'branch-' + branch.name.replace(/[^a-zA-Z0-9]/g, '-'); html += '
'; html += ''; html += '
'; }); html += '
'; html += '
'; html += ''; html += ''; html += '
'; return html; } } exports.ConfigView = ConfigView; //# sourceMappingURL=ConfigView.js.map