Skip to content

Commit 4b1a34e

Browse files
stopsopaclaude
andcommitted
test
Co-authored-by: claude <81847+claude@users.noreply.github.com>
1 parent 5da50ed commit 4b1a34e

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

pages/github/co-author.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ <h1>GitHub Co-Author Generator</h1>
4343
<ace-editor id="result-editor" lang="python" min-height-px="200">
4444
<script type="ace"></script>
4545
</ace-editor>
46+
47+
<div id="profile-preview" style="display: none; margin-top: 2rem; align-items: center; gap: 1rem">
48+
<img
49+
id="profile-icon"
50+
src=""
51+
alt="Profile Icon"
52+
style="width: 48px; height: 48px; border-radius: 50%; border: 1px solid #ccc"
53+
/>
54+
<div>
55+
<div style="font-weight: 600; font-size: 0.9rem">Commit Attribution Preview</div>
56+
<div id="profile-name" style="color: #586069; font-size: 0.85rem"></div>
57+
</div>
58+
</div>
4659
</div>
4760
</div>
4861

@@ -60,13 +73,17 @@ <h1>GitHub Co-Author Generator</h1>
6073
const resultEditor = document.getElementById("result-editor");
6174
const urlInput = document.getElementById("github-url");
6275
const generateBtn = document.getElementById("generate-btn");
76+
const profilePreview = document.getElementById("profile-preview");
77+
const profileIcon = document.getElementById("profile-icon");
78+
const profileName = document.getElementById("profile-name");
6379

6480
async function generate() {
6581
const rawUrl = urlInput.value.trim();
6682
if (!rawUrl) return;
6783

6884
resultEditor.value = "\nFetching user data...\n";
6985
generateBtn.disabled = true;
86+
profilePreview.style.display = "none";
7087

7188
try {
7289
// Extract username
@@ -87,6 +104,13 @@ <h1>GitHub Co-Author Generator</h1>
87104
throw new Error("User ID not found in GitHub response");
88105
}
89106

107+
// Show profile preview
108+
if (data.avatar_url) {
109+
profileIcon.src = data.avatar_url;
110+
profileName.textContent = data.login;
111+
profilePreview.style.display = "flex";
112+
}
113+
90114
const coAuthorLine = `Co-authored-by: ${data.login} <${data.id}+${data.login}@users.noreply.github.com>`;
91115
resultEditor.value = `\n${coAuthorLine}\n`;
92116

0 commit comments

Comments
 (0)