Now asking whether to omit the Makefile
This commit is contained in:
26
ui.js
26
ui.js
@@ -178,7 +178,7 @@ async function assignment_layout(content, result) {
|
||||
}
|
||||
}
|
||||
|
||||
async function finishing_touches_layout(content, result) {
|
||||
async function other_details_layout(content, result) {
|
||||
content.appendChild(new BinaryInputBuilder(result, "has_keywords")
|
||||
.label("Vložit klíčová slova")
|
||||
.finish());
|
||||
@@ -191,6 +191,30 @@ async function finishing_touches_layout(content, result) {
|
||||
.finish());
|
||||
}
|
||||
|
||||
async function toolchain_layout(content, result) {
|
||||
if(!Object.keys(toolchains).includes(result.toolchain)) {
|
||||
document.querySelector("#next-button").disabled = true;
|
||||
}
|
||||
|
||||
let buttons = new ButtonListBuilder(Object.keys(toolchains))
|
||||
.should_be_pressed((key) => result.toolchain == key)
|
||||
.modify((b, key) => b.class("wide").text(toolchains[key].name))
|
||||
.on_click((key) => {
|
||||
result.toolchain = key;
|
||||
document.querySelector("#next-button").disabled = false;
|
||||
})
|
||||
.finish();
|
||||
|
||||
for(const button of buttons) {
|
||||
content.appendChild(button);
|
||||
}
|
||||
|
||||
content.appendChild(new ElementBuilder("div.vertical-spacer").finish());
|
||||
content.appendChild(new ElementBuilder("div.hint")
|
||||
.text("Toto rozhodnutí pouze ovlivní, zda výsledná šablona bude obsahovat soubor Makefile pro jednodušší použití s příkazovou řádkou. Webový editor Typstu tento soubor nepotřebuje.")
|
||||
.finish());
|
||||
}
|
||||
|
||||
async function run() {
|
||||
startbutton.style.cursor = "auto";
|
||||
startbutton.disabled = true;
|
||||
|
Reference in New Issue
Block a user