sync: auto-sync from HOWARD-HOME at 2026-07-18 11:15:48
Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-07-18 11:15:48
This commit is contained in:
@@ -570,7 +570,19 @@ async function showDetail(repo, num) {
|
||||
Updated ${new Date(issue.updated_at).toLocaleString()} ·
|
||||
<a href="${giteaUrl}" target="_blank">Open in Gitea</a>
|
||||
</div>
|
||||
<div class="m-actions">
|
||||
<div class="m-actions" style="flex-wrap:wrap;gap:8px">
|
||||
<select class="btn" onchange="changePriority('${repo}',${num},this.value)" style="font-size:12px">
|
||||
<option value="" disabled ${!getPriority(issue)?'selected':''}>Priority</option>
|
||||
<option value="P1-critical" ${'P1'===getPriority(issue)?'selected':''}>P1 - Critical</option>
|
||||
<option value="P2-high" ${'P2'===getPriority(issue)?'selected':''}>P2 - High</option>
|
||||
<option value="P3-normal" ${'P3'===getPriority(issue)?'selected':''}>P3 - Normal</option>
|
||||
<option value="P4-low" ${'P4'===getPriority(issue)?'selected':''}>P4 - Low</option>
|
||||
</select>
|
||||
<select class="btn" onchange="changeAssignee('${repo}',${num},this.value)" style="font-size:12px">
|
||||
<option value="" ${!getAssignee(issue)?'selected':''}>Unassigned</option>
|
||||
<option value="assigned:howard" ${'howard'===getAssignee(issue)?'selected':''}>Howard</option>
|
||||
<option value="assigned:mike" ${'mike'===getAssignee(issue)?'selected':''}>Mike</option>
|
||||
</select>
|
||||
${issue.state==='open' ? `
|
||||
<button class="btn" onclick="toggleLabel('${repo}',${num},'in-progress')">In-Progress</button>
|
||||
<button class="btn" onclick="toggleLabel('${repo}',${num},'blocked')">Blocked</button>
|
||||
@@ -613,6 +625,35 @@ async function toggleLabel(repo,num,name) {
|
||||
showDetail(repo,num); loadIssues();
|
||||
}
|
||||
|
||||
async function changePriority(repo, num, newPrio) {
|
||||
const lc = labelCache[repo] || {};
|
||||
const prioLabels = ['P1-critical','P2-high','P3-normal','P4-low'];
|
||||
// Remove all existing priority labels
|
||||
for (const p of prioLabels) {
|
||||
const id = lc[p];
|
||||
if (id) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels/${id}`, {method:'DELETE', headers:headers()});
|
||||
}
|
||||
// Add new one
|
||||
const newId = lc[newPrio];
|
||||
if (newId) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels`, {method:'POST', headers:{...headers(),'Content-Type':'application/json'}, body:JSON.stringify({labels:[newId]})});
|
||||
showDetail(repo, num); loadIssues();
|
||||
}
|
||||
|
||||
async function changeAssignee(repo, num, newAssign) {
|
||||
const lc = labelCache[repo] || {};
|
||||
// Remove existing assigned: labels
|
||||
for (const a of ['assigned:howard','assigned:mike']) {
|
||||
const id = lc[a];
|
||||
if (id) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels/${id}`, {method:'DELETE', headers:headers()});
|
||||
}
|
||||
// Add new one (if not empty)
|
||||
if (newAssign) {
|
||||
const newId = lc[newAssign];
|
||||
if (newId) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels`, {method:'POST', headers:{...headers(),'Content-Type':'application/json'}, body:JSON.stringify({labels:[newId]})});
|
||||
}
|
||||
showDetail(repo, num); loadIssues();
|
||||
}
|
||||
|
||||
// --- New issue ---
|
||||
function showNewIssue() {
|
||||
const m = document.getElementById('new-modal');
|
||||
|
||||
Reference in New Issue
Block a user