Merge branch 'develop' into dp/automated-build-workflow

This commit is contained in:
~dolled-possum 2024-06-07 20:37:05 -04:00
commit 5b29149ad7

View File

@ -100,26 +100,28 @@ fn make_widget() -> String {
.then(data => { .then(data => {
const container = document.getElementById('latest-apps'); const container = document.getElementById('latest-apps');
data.forEach(app => { data.forEach(app => {
const a = document.createElement('a'); if (app.metadata) {
a.className = 'app p-2 grow flex items-stretch rounded-lg shadow bg-white/10 hover:bg-white/20 font-sans cursor-pointer'; const a = document.createElement('a');
a.href = `/main:app_store:sys/app-details/${app.package}:${app.publisher}` a.className = 'app p-2 grow flex items-stretch rounded-lg shadow bg-white/10 hover:bg-white/20 font-sans cursor-pointer';
a.target = '_blank'; a.href = `/main:app_store:sys/app-details/${app.package}:${app.publisher}`
a.rel = 'noopener noreferrer'; a.target = '_blank';
const iconLetter = app.metadata_hash.replace('0x', '')[0].toUpperCase(); a.rel = 'noopener noreferrer';
a.innerHTML = `<div const iconLetter = app.metadata_hash.replace('0x', '')[0].toUpperCase();
class="app-image rounded mr-2 grow" a.innerHTML = `<div
style=" class="app-image rounded mr-2 grow"
background-image: url('${app.metadata.image || `/icons/${iconLetter}`}'); style="
height: 92px; background-image: url('${app.metadata.image || `/icons/${iconLetter}`}');
width: 92px; height: 92px;
max-width: 33%; width: 92px;
" max-width: 33%;
></div> "
<div class="app-info flex flex-col grow"> ></div>
<h2 class="font-bold">${app.metadata.name}</h2> <div class="app-info flex flex-col grow">
<p>${app.metadata.description}</p> <h2 class="font-bold">${app.metadata.name}</h2>
</div>`; <p>${app.metadata.description}</p>
container.appendChild(a); </div>`;
container.appendChild(a);
}
}); });
}) })
.catch(error => console.error('Error fetching apps:', error)); .catch(error => console.error('Error fetching apps:', error));