author_genders -> author_pronouns

This commit is contained in:
2025-10-06 19:33:17 +02:00
parent 14ceb9635e
commit 3136b3cc1a
2 changed files with 9 additions and 9 deletions

12
ui.js
View File

@@ -50,15 +50,15 @@ async function author_info_layout(content, result) {
.on_input((e) => result.name = e.target.value)
.finish();
if(!Object.keys(genders).includes(result.gender)) {
if(!Object.keys(pronounss).includes(result.pronouns)) {
document.querySelector("#next-button").disabled = true;
}
let gender_buttons = new ButtonListBuilder(Object.keys(genders))
.should_be_pressed((key) => result.gender == key)
.modify((b, key) => b.class("expand").text(genders[key].name))
let pronouns_buttons = new ButtonListBuilder(Object.keys(pronounss))
.should_be_pressed((key) => result.pronouns == key)
.modify((b, key) => b.class("expand").text(pronounss[key].name))
.on_click((key) => {
result.gender = key;
result.pronouns = key;
document.querySelector("#next-button").disabled = false;
})
.finish();
@@ -69,7 +69,7 @@ async function author_info_layout(content, result) {
.text("Způsob sebeoslovení")
.finish());
content.appendChild(new ElementBuilder("div.horizontal-list")
.append_all(gender_buttons)
.append_all(pronouns_buttons)
.finish());
}