workflow_launcher/renderer.js

22 lines
655 B
JavaScript
Raw Normal View History

2024-03-11 11:01:07 -04:00
const workflowsList = document.getElementById('workflows')
fetch('./workflows.json')
.then((response) => response.json())
.then((workflowsJson) => {
workflowsJson.workflows.forEach((site) => {
2024-03-12 08:38:55 -04:00
let li = document.createElement('li')
li.className = "list-group-item"
2024-03-11 11:01:07 -04:00
let img = document.createElement('img')
let a = document.createElement('a')
img.src = site.logo
img.alt = site.name
a.href = site.script
2024-03-12 08:38:55 -04:00
let name = document.createTextNode(site.name)
name.className = "p-1"
2024-03-11 11:01:07 -04:00
a.appendChild(img)
2024-03-12 08:38:55 -04:00
a.appendChild(name)
2024-03-11 11:01:07 -04:00
li.appendChild(a)
workflowsList.appendChild(li)
})
});