UI changes

This commit is contained in:
Magnus Åhall 2025-08-07 20:59:59 +02:00
parent df4cee56af
commit fc992b8bdc
3 changed files with 66 additions and 2 deletions

View file

@ -808,12 +808,20 @@ class TypesList extends Component {
renderComponent() {// {{{
const div = document.createElement('div')
const label = document.createElement('div')
const inner = document.createElement('div')
label.classList.add('label')
inner.innerText = 'Types'
label.appendChild(inner)
const create = document.createElement('img')
create.setAttribute('src', `/images/${_VERSION}/node_modules/@mdi/svg/svg/plus-box.svg`)
create.style.height = '32px'
create.style.cursor = 'pointer';
create.addEventListener('click', () => this.createType())
div.appendChild(create)
label.append(create)
div.appendChild(label)
this.types.sort(_app.typeSort)
@ -1155,6 +1163,12 @@ class ScriptsList extends Component {
})
}// }}}
renderComponent() {// {{{
const label = document.createElement('div')
const inner = document.createElement('div')
label.classList.add('label')
inner.innerText = 'Scripts'
label.appendChild(inner)
let prevGroup = null
const elements = []
const imgAdd = document.createElement('img')
@ -1162,7 +1176,9 @@ class ScriptsList extends Component {
imgAdd.style.height = '32px'
imgAdd.style.cursor = 'pointer'
imgAdd.addEventListener('click', () => this.createScript())
elements.push(imgAdd)
label.append(imgAdd)
elements.push(label)
for (const s of this.scripts) {
if (prevGroup != s.Group) {