style:代码格式化和更名
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,4 +25,4 @@ logs/
|
|||||||
sync_database.sqlite
|
sync_database.sqlite
|
||||||
|
|
||||||
//暂时忽略
|
//暂时忽略
|
||||||
app.js
|
mappingsEditor.js
|
||||||
@@ -1,27 +1,45 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Gitea-Jira 映射配置生成器</title>
|
<title>Gitea-Jira 映射配置生成器</title>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
<style>
|
<style>
|
||||||
body { font-family: 'Inter', system-ui, sans-serif; }
|
body {
|
||||||
.step-card { transition: all 0.3s ease; }
|
font-family: 'Inter', system-ui, sans-serif;
|
||||||
.step-active { border-left: 4px solid #3b82f6; }
|
}
|
||||||
.jira-icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 6px; }
|
|
||||||
|
.step-card {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-active {
|
||||||
|
border-left: 4px solid #3b82f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jira-icon {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-gray-50 text-gray-800 min-h-screen p-6">
|
<body class="bg-gray-50 text-gray-800 min-h-screen p-6">
|
||||||
|
|
||||||
<div class="max-w-4xl mx-auto">
|
<div class="max-w-4xl mx-auto">
|
||||||
<header class="mb-8 flex items-center justify-between">
|
<header class="mb-8 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="text-2xl font-bold text-gray-900">Gitea-Jira 映射生成器</h1>
|
<h1 class="text-2xl font-bold text-gray-900">Gitea-Jira 映射生成器</h1>
|
||||||
<p class="text-sm text-gray-500 mt-1">连接 Jira,自动提取 ID,生成 mappings.json 配置</p>
|
<p class="text-sm text-gray-500 mt-1">连接 Jira,自动提取 ID,生成 mappings.json 配置</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<button onclick="openSettings()" class="text-sm bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded transition">
|
<button onclick="openSettings()"
|
||||||
|
class="text-sm bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded transition">
|
||||||
全局设置
|
全局设置
|
||||||
</button>
|
</button>
|
||||||
<div class="text-xs bg-blue-100 text-blue-800 px-3 py-1 rounded-full">v2.0</div>
|
<div class="text-xs bg-blue-100 text-blue-800 px-3 py-1 rounded-full">v2.0</div>
|
||||||
@@ -29,32 +47,38 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- 全局设置模态窗口 -->
|
<!-- 全局设置模态窗口 -->
|
||||||
<div id="settingsModal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
<div id="settingsModal"
|
||||||
|
class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
||||||
<div class="bg-white rounded-lg shadow-xl p-6 max-w-lg w-full mx-4">
|
<div class="bg-white rounded-lg shadow-xl p-6 max-w-lg w-full mx-4">
|
||||||
<h2 class="text-xl font-bold mb-4">全局设置</h2>
|
<h2 class="text-xl font-bold mb-4">全局设置</h2>
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Jira 地址 (Base URL)</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">Jira 地址 (Base URL)</label>
|
||||||
<input type="text" id="settingsJiraUrl" placeholder="https://your-domain.atlassian.net" class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="settingsJiraUrl" placeholder="https://your-domain.atlassian.net"
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Jira 用户名/邮箱</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">Jira 用户名/邮箱</label>
|
||||||
<input type="text" id="settingsJiraUser" placeholder="email@example.com" class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="settingsJiraUser" placeholder="email@example.com"
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
<p class="text-xs text-gray-400 mt-1">使用 PAT 时可留空</p>
|
<p class="text-xs text-gray-400 mt-1">使用 PAT 时可留空</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">API Token / 密码</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">API Token / 密码</label>
|
||||||
<input type="password" id="settingsJiraToken" placeholder="ATATT3xFfGF0..." class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="password" id="settingsJiraToken" placeholder="ATATT3xFfGF0..."
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
<p class="text-xs text-gray-400 mt-1">推荐使用 PAT (Personal Access Token)</p>
|
<p class="text-xs text-gray-400 mt-1">推荐使用 PAT (Personal Access Token)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 flex justify-end gap-2">
|
<div class="mt-6 flex justify-end gap-2">
|
||||||
<button onclick="closeSettings()" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="closeSettings()"
|
||||||
|
class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded text-sm font-medium transition">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button onclick="saveSettings()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="saveSettings()"
|
||||||
|
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
||||||
保存设置
|
保存设置
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,20 +92,25 @@
|
|||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">当前名称</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">当前名称</label>
|
||||||
<input type="text" id="renameOldName" readonly class="w-full border rounded px-3 py-2 text-sm bg-gray-100 text-gray-600">
|
<input type="text" id="renameOldName" readonly
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm bg-gray-100 text-gray-600">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">新名称</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">新名称</label>
|
||||||
<input type="text" id="renameNewName" placeholder="例如: owner/repo" class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="renameNewName" placeholder="例如: owner/repo"
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
<p class="text-xs text-gray-400 mt-1">格式: owner/repo</p>
|
<p class="text-xs text-gray-400 mt-1">格式: owner/repo</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="renameError" class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200"></div>
|
<div id="renameError"
|
||||||
|
class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200"></div>
|
||||||
<div class="mt-6 flex justify-end gap-2">
|
<div class="mt-6 flex justify-end gap-2">
|
||||||
<button onclick="closeRenameModal()" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="closeRenameModal()"
|
||||||
|
class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded text-sm font-medium transition">
|
||||||
取消
|
取消
|
||||||
</button>
|
</button>
|
||||||
<button onclick="confirmRename()" id="renameConfirmBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="confirmRename()" id="renameConfirmBtn"
|
||||||
|
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
||||||
确认改名
|
确认改名
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,15 +120,18 @@
|
|||||||
<!-- Step 0: 选择/新建仓库 -->
|
<!-- Step 0: 选择/新建仓库 -->
|
||||||
<div id="step0" class="bg-white rounded-lg shadow p-6 mb-6 step-card step-active">
|
<div id="step0" class="bg-white rounded-lg shadow p-6 mb-6 step-card step-active">
|
||||||
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
||||||
<span class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">0</span>
|
<span
|
||||||
|
class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">0</span>
|
||||||
选择仓库配置
|
选择仓库配置
|
||||||
</h2>
|
</h2>
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<button onclick="loadExistingMappings()" id="loadBtn" class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="loadExistingMappings()" id="loadBtn"
|
||||||
|
class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
||||||
加载现有配置
|
加载现有配置
|
||||||
</button>
|
</button>
|
||||||
<button onclick="createNewMapping()" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition ml-2">
|
<button onclick="createNewMapping()"
|
||||||
|
class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition ml-2">
|
||||||
新建仓库配置
|
新建仓库配置
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -111,33 +143,39 @@
|
|||||||
|
|
||||||
<div id="newRepoContainer" class="hidden">
|
<div id="newRepoContainer" class="hidden">
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">新仓库名称</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">新仓库名称</label>
|
||||||
<input type="text" id="newRepoName" placeholder="例如: loren/issueBotTest" class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="newRepoName" placeholder="例如: loren/issueBotTest"
|
||||||
<button onclick="confirmNewRepo()" class="mt-2 bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
|
<button onclick="confirmNewRepo()"
|
||||||
|
class="mt-2 bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
||||||
确认并继续
|
确认并继续
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="step0Error" class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200"></div>
|
<div id="step0Error" class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Step 1: 项目配置 -->
|
<!-- Step 1: 项目配置 -->
|
||||||
<div id="step1" class="bg-white rounded-lg shadow p-6 mb-6 step-card hidden">
|
<div id="step1" class="bg-white rounded-lg shadow p-6 mb-6 step-card hidden">
|
||||||
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
||||||
<span class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">1</span>
|
<span
|
||||||
|
class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">1</span>
|
||||||
项目配置
|
项目配置
|
||||||
</h2>
|
</h2>
|
||||||
<div class="mb-3 bg-blue-50 border border-blue-200 rounded p-3 flex items-center justify-between">
|
<div class="mb-3 bg-blue-50 border border-blue-200 rounded p-3 flex items-center justify-between">
|
||||||
<p class="text-sm text-blue-800">
|
<p class="text-sm text-blue-800">
|
||||||
<span class="font-semibold">当前配置仓库:</span> <span id="currentRepoName" class="font-mono">-</span>
|
<span class="font-semibold">当前配置仓库:</span> <span id="currentRepoName" class="font-mono">-</span>
|
||||||
</p>
|
</p>
|
||||||
<button onclick="backToStart()" class="text-xs bg-white hover:bg-gray-50 text-gray-700 px-3 py-1 rounded border">
|
<button onclick="backToStart()"
|
||||||
|
class="text-xs bg-white hover:bg-gray-50 text-gray-700 px-3 py-1 rounded border">
|
||||||
返回
|
返回
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-1 gap-4">
|
<div class="grid grid-cols-1 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">目标 Jira 项目 Key</label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">目标 Jira 项目 Key</label>
|
||||||
<input type="text" id="projectKey" placeholder="例如: TEST" class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none uppercase font-bold text-gray-700">
|
<input type="text" id="projectKey" placeholder="例如: TEST"
|
||||||
|
class="w-full border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none uppercase font-bold text-gray-700">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Sprint ID 提取区域 -->
|
<!-- Sprint ID 提取区域 -->
|
||||||
@@ -145,20 +183,25 @@
|
|||||||
<h3 class="text-sm font-semibold text-gray-700 mb-2">配置 Sprint 映射(可选)</h3>
|
<h3 class="text-sm font-semibold text-gray-700 mb-2">配置 Sprint 映射(可选)</h3>
|
||||||
<p class="text-xs text-gray-500 mb-3">输入一个已在目标 Sprint 中的工单 Key,系统将自动提取 Sprint ID 并建立映射</p>
|
<p class="text-xs text-gray-500 mb-3">输入一个已在目标 Sprint 中的工单 Key,系统将自动提取 Sprint ID 并建立映射</p>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<input type="text" id="issueKey" placeholder="例如: TEST-196" class="w-1/5 border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none uppercase">
|
<input type="text" id="issueKey" placeholder="例如: TEST-196"
|
||||||
<button onclick="fetchSprintId()" id="fetchSprintBtn" class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded text-sm font-medium transition whitespace-nowrap">
|
class="w-1/5 border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none uppercase">
|
||||||
|
<button onclick="fetchSprintId()" id="fetchSprintBtn"
|
||||||
|
class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded text-sm font-medium transition whitespace-nowrap">
|
||||||
提取 Sprint
|
提取 Sprint
|
||||||
</button>
|
</button>
|
||||||
<div id="sprintResult" class="flex-1 flex items-center px-3 text-sm"></div>
|
<div id="sprintResult" class="flex-1 flex items-center px-3 text-sm"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="sprintMilestone" class="hidden mt-3 flex gap-2 items-center">
|
<div id="sprintMilestone" class="hidden mt-3 flex gap-2 items-center">
|
||||||
<label class="text-xs font-medium text-gray-600 whitespace-nowrap">里程碑名称:</label>
|
<label class="text-xs font-medium text-gray-600 whitespace-nowrap">里程碑名称:</label>
|
||||||
<input type="text" id="milestoneName" placeholder="例如: v1.0.1" class="flex-1 border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="milestoneName" placeholder="例如: v1.0.1"
|
||||||
<button onclick="addSprintMapping()" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition whitespace-nowrap">
|
class="flex-1 border rounded px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
||||||
|
<button onclick="addSprintMapping()"
|
||||||
|
class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition whitespace-nowrap">
|
||||||
添加映射
|
添加映射
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="sprintError" class="hidden mt-2 bg-red-50 text-red-700 p-2 rounded text-xs border border-red-200"></div>
|
<div id="sprintError"
|
||||||
|
class="hidden mt-2 bg-red-50 text-red-700 p-2 rounded text-xs border border-red-200"></div>
|
||||||
|
|
||||||
<!-- Sprint 映射列表 -->
|
<!-- Sprint 映射列表 -->
|
||||||
<div id="sprintListContainer" class="hidden mt-4">
|
<div id="sprintListContainer" class="hidden mt-4">
|
||||||
@@ -168,24 +211,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 flex justify-end">
|
<div class="mt-4 flex justify-end">
|
||||||
<button onclick="scanJira()" id="scanBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded shadow text-sm font-medium transition flex items-center">
|
<button onclick="scanJira()" id="scanBtn"
|
||||||
|
class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded shadow text-sm font-medium transition flex items-center">
|
||||||
<span id="scanBtnText">开始扫描</span>
|
<span id="scanBtnText">开始扫描</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="scanError" class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200"></div>
|
<div id="scanError" class="hidden mt-3 bg-red-50 text-red-700 p-3 rounded text-sm border border-red-200">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Step 2: 交互映射 -->
|
<!-- Step 2: 交互映射 -->
|
||||||
<div id="step2" class="bg-white rounded-lg shadow p-6 mb-6 hidden">
|
<div id="step2" class="bg-white rounded-lg shadow p-6 mb-6 hidden">
|
||||||
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
<h2 class="text-lg font-semibold mb-4 flex items-center">
|
||||||
<span class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">2</span>
|
<span
|
||||||
|
class="bg-blue-100 text-blue-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">2</span>
|
||||||
配置映射关系
|
配置映射关系
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
<!-- 优先级 -->
|
<!-- 优先级 -->
|
||||||
<div>
|
<div>
|
||||||
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">优先级映射 (Priority)</h3>
|
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">优先级映射
|
||||||
|
(Priority)</h3>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="priorityContainer">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="priorityContainer">
|
||||||
<!-- 动态生成 -->
|
<!-- 动态生成 -->
|
||||||
</div>
|
</div>
|
||||||
@@ -193,7 +240,8 @@
|
|||||||
|
|
||||||
<!-- 工单类型 -->
|
<!-- 工单类型 -->
|
||||||
<div>
|
<div>
|
||||||
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">类型映射 (不填写的类型不会同步)(Issue Types)</h3>
|
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">类型映射
|
||||||
|
(不填写的类型不会同步)(Issue Types)</h3>
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="typeContainer">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="typeContainer">
|
||||||
<!-- 动态生成 -->
|
<!-- 动态生成 -->
|
||||||
</div>
|
</div>
|
||||||
@@ -205,8 +253,10 @@
|
|||||||
|
|
||||||
<!-- 状态流转 -->
|
<!-- 状态流转 -->
|
||||||
<div>
|
<div>
|
||||||
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">状态动作 (Transitions)</h3>
|
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide border-b pb-2 mb-3">状态动作
|
||||||
<div class="bg-yellow-50 border border-yellow-200 rounded p-3 mb-3 text-xs text-yellow-800 hidden" id="transWarning"></div>
|
(Transitions)</h3>
|
||||||
|
<div class="bg-yellow-50 border border-yellow-200 rounded p-3 mb-3 text-xs text-yellow-800 hidden"
|
||||||
|
id="transWarning"></div>
|
||||||
<div class="grid grid-cols-1 gap-3">
|
<div class="grid grid-cols-1 gap-3">
|
||||||
<div class="flex items-center justify-between bg-gray-50 p-3 rounded border">
|
<div class="flex items-center justify-between bg-gray-50 p-3 rounded border">
|
||||||
<span class="font-mono text-sm font-medium text-gray-700">关闭 (Close)</span>
|
<span class="font-mono text-sm font-medium text-gray-700">关闭 (Close)</span>
|
||||||
@@ -228,18 +278,23 @@
|
|||||||
<div class="mt-6 border-t pt-6">
|
<div class="mt-6 border-t pt-6">
|
||||||
<div class="flex items-center justify-between mb-3">
|
<div class="flex items-center justify-between mb-3">
|
||||||
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide">配置预览(可编辑)</h3>
|
<h3 class="text-sm font-bold text-gray-800 uppercase tracking-wide">配置预览(可编辑)</h3>
|
||||||
<button onclick="updatePreview()" class="text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 px-3 py-1 rounded transition">
|
<button onclick="updatePreview()"
|
||||||
|
class="text-xs bg-blue-50 hover:bg-blue-100 text-blue-600 px-3 py-1 rounded transition">
|
||||||
刷新预览
|
刷新预览
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<textarea id="jsonPreview" class="w-full h-96 bg-gray-900 text-gray-100 font-mono text-xs p-4 rounded outline-none border-2 border-gray-700 focus:border-blue-500 transition" spellcheck="false" placeholder="配置将在此显示,可直接编辑..."></textarea>
|
<textarea id="jsonPreview"
|
||||||
<div id="jsonError" class="hidden mt-2 bg-red-50 text-red-700 p-2 rounded text-xs border border-red-200"></div>
|
class="w-full h-96 bg-gray-900 text-gray-100 font-mono text-xs p-4 rounded outline-none border-2 border-gray-700 focus:border-blue-500 transition"
|
||||||
|
spellcheck="false" placeholder="配置将在此显示,可直接编辑..."></textarea>
|
||||||
|
<div id="jsonError"
|
||||||
|
class="hidden mt-2 bg-red-50 text-red-700 p-2 rounded text-xs border border-red-200"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-6 flex justify-end border-t pt-4">
|
<div class="mt-6 flex justify-end border-t pt-4">
|
||||||
<button onclick="saveToFile()" class="bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded shadow text-sm font-medium transition">
|
<button onclick="saveToFile()"
|
||||||
|
class="bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded shadow text-sm font-medium transition">
|
||||||
保存到 mappings.json
|
保存到 mappings.json
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,20 +304,23 @@
|
|||||||
<div id="step3" class="bg-white rounded-lg shadow p-6 mb-12 hidden">
|
<div id="step3" class="bg-white rounded-lg shadow p-6 mb-12 hidden">
|
||||||
<h2 class="text-lg font-semibold mb-4 flex items-center justify-between">
|
<h2 class="text-lg font-semibold mb-4 flex items-center justify-between">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">3</span>
|
<span
|
||||||
|
class="bg-green-100 text-green-600 rounded-full w-8 h-8 flex items-center justify-center text-sm mr-3">3</span>
|
||||||
保存成功
|
保存成功
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<div id="saveResult" class="text-sm"></div>
|
<div id="saveResult" class="text-sm"></div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button onclick="location.reload()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
<button onclick="location.reload()"
|
||||||
|
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition">
|
||||||
继续配置其他仓库
|
继续配置其他仓库
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="app.js"></script>
|
<script src="mappingsEditor.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user