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

@ -102,6 +102,17 @@ button {
#types {
grid-area: navigation;
}
#types .label {
display: grid;
grid-template-columns: 1fr min-content;
align-items: center;
}
#types .label div:first-child {
font-size: 1.5em;
font-weight: bold;
color: var(--section-color);
margin-right: 8px;
}
#types .group {
font-weight: bold;
white-space: nowrap;
@ -411,6 +422,17 @@ dialog#connection-data div.button {
color: #fff;
z-index: 8192;
}
#scripts .label {
display: grid;
grid-template-columns: 1fr min-content;
align-items: center;
}
#scripts .label div:first-child {
font-size: 1.5em;
font-weight: bold;
color: var(--section-color);
margin-right: 8px;
}
#scripts .group {
font-weight: bold;
margin-top: 32px;

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) {

View file

@ -137,6 +137,19 @@ button {
#types {
grid-area: navigation;
.label {
div:first-child {
font-size: 1.5em;
font-weight: bold;
color: var(--section-color);
margin-right: 8px;
}
display: grid;
grid-template-columns: 1fr min-content;
align-items: center;
}
.group {
font-weight: bold;
white-space: nowrap;
@ -534,6 +547,19 @@ dialog#connection-data {
}
#scripts {
.label {
div:first-child {
font-size: 1.5em;
font-weight: bold;
color: var(--section-color);
margin-right: 8px;
}
display: grid;
grid-template-columns: 1fr min-content;
align-items: center;
}
.group {
font-weight: bold;
margin-top: 32px;