Handle empty project links correctly

This commit is contained in:
Ben Visness 2024-06-07 10:35:57 -04:00
parent 7410fbcd4a
commit 75e21ccbe9
2 changed files with 14 additions and 15 deletions

View File

@ -7289,6 +7289,12 @@ pre,
margin-left: auto;
margin-right: auto;
}
.flex-shrink-0 {
flex-shrink: 0;
}
.flex-grow-1 {
flex-grow: 1;
}
.flex-fair {
flex-basis: 1px;
flex-grow: 1;
@ -7705,19 +7711,6 @@ pre,
background-color: var(--bg-5);
}
}
.not-first-of-type:first-of-type {
display: none;
}
.not-last:last-child {
display: none;
}
.not-last-of-type:last-of-type {
display: none;
}
.svgicon svg {
fill: currentColor;
stroke: currentColor;

View File

@ -464,9 +464,15 @@
function updateLinksJSON() {
const links = [];
for (const l of linksContainer.querySelectorAll(".link_row")) {
const value = l.querySelector(".link_name").value;
const url = l.querySelector(".link_url").value;
if (!url) {
continue;
}
links.push({
"name": l.querySelector(".link_name").value,
"url": l.querySelector(".link_url").value,
"name": name,
"url": url,
});
}
linksJSONInput.value = JSON.stringify(links);