Added thesis assignment format

This commit is contained in:
2025-10-06 20:55:20 +02:00
parent 155fabc4b9
commit c1e7885677
2 changed files with 44 additions and 2 deletions

19
ui.js
View File

@@ -136,6 +136,25 @@ async function collaborators_layout(content, result) {
.finish());
}
async function assignment_layout(content, result) {
if(!Object.keys(assignment_formats).includes(result.format)) {
document.querySelector("#next-button").disabled = true;
}
let buttons = new ButtonListBuilder(Object.keys(assignment_formats))
.should_be_pressed((key) => result.format == key)
.modify((b, key) => b.class("wide").text(assignment_formats[key].name))
.on_click((key) => {
result.format = key;
document.querySelector("#next-button").disabled = false;
})
.finish();
for(const button of buttons) {
content.appendChild(button);
}
}
async function run() {
startbutton.style.cursor = "auto";
startbutton.disabled = true;