Skip to content

Commit f43ec2d

Browse files
committed
"added changelog to webui, it will always fetch latest changelog"
1 parent 14b9199 commit f43ec2d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/server/templates/components/footer.jinja

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,24 @@
1616
{{ footer_icon_link('https://discord.gg/zerRaGK9EC',
1717
'icons/discord.svg',
1818
'Discord') }}
19-
{{ footer_icon_link('https://github.com/coderamp-labs/gitingest/releases/tag/v0.1.5',
19+
{{ footer_icon_link('https://github.com/coderamp-labs/gitingest/releases/latest',
2020
'icons/changelog.svg',
21-
'Changelog: v0.1.5') }}
21+
'Latest Changelog') }}
2222
</div>
2323
</div>
2424
</div>
25+
<script>
26+
fetch('https://api.github.com/repos/coderamp-labs/gitingest/releases/latest')
27+
.then(response => response.json())
28+
.then(data => {
29+
const changelogLink = document.querySelector('a[href="https://github.com/coderamp-labs/gitingest/releases/latest"]');
30+
if (changelogLink && data.html_url) {
31+
changelogLink.href = data.html_url;
32+
const span = changelogLink.querySelector('span');
33+
if (span) {
34+
span.textContent = `Changelog (${data.tag_name})`;
35+
}
36+
}
37+
});
38+
</script>
2539
</footer>

0 commit comments

Comments
 (0)