Skip to content

Commit 4ca847e

Browse files
committed
UI: Only display important Release info
1 parent 960c5c9 commit 4ca847e

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

static/script.js

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ document.addEventListener('DOMContentLoaded', () => {
494494
'Valid-Until'
495495
];
496496

497-
// First display the important fields in a specific order
497+
// Only display the important fields if they exist
498498
importantFields.forEach(field => {
499499
if (releaseInfo[field]) {
500500
const div = document.createElement('div');
@@ -507,31 +507,7 @@ document.addEventListener('DOMContentLoaded', () => {
507507
infoGridDiv.appendChild(div);
508508
}
509509
});
510-
511-
// Then display any other fields not already shown
512-
Object.keys(releaseInfo).forEach(field => {
513-
// Exclude Architectures, Components, and Description fields
514-
if (!importantFields.includes(field) &&
515-
field !== 'Architectures' &&
516-
field !== 'Components' &&
517-
field !== 'Description') {
518-
const div = document.createElement('div');
519-
const strong = document.createElement('strong');
520-
strong.textContent = field + ': ';
521-
const span = document.createElement('span');
522-
523-
// Handle array-like values
524-
if (Array.isArray(releaseInfo[field])) {
525-
span.textContent = releaseInfo[field].join(', ');
526-
} else {
527-
span.textContent = releaseInfo[field];
528-
}
529-
530-
div.appendChild(strong);
531-
div.appendChild(span);
532-
infoGridDiv.appendChild(div);
533-
}
534-
});
510+
535511
}
536512

537513
function showReleaseInfo() {

0 commit comments

Comments
 (0)