add: forum posts ui

This commit is contained in:
trisua 2025-08-03 23:24:57 -04:00
parent ef029c59b3
commit 2be87c397d
90 changed files with 1459 additions and 1299 deletions

View file

@ -919,7 +919,7 @@ media_theme_pref();
}
if (option.input_element_type === "checkbox") {
into_element.innerHTML += `<div class="card flex items-center gap-2">
into_element.innerHTML += `<div class="card flex items_center gap_2">
<input
type="checkbox"
onchange="window.set_setting_field${id_key}('${option.key}', event.target.checked)"
@ -927,7 +927,7 @@ media_theme_pref();
name="${option.key}"
id="${option.key}"
${option.value === "true" ? "checked" : ""}
class="w-content"
class="w_content"
/>
<label for="${option.key}"><b>${option.label.replaceAll("_", " ")}</b></label>
@ -937,10 +937,10 @@ media_theme_pref();
}
if (option.input_element_type === "color") {
into_element.innerHTML += `<div class="flex flex-col gap-2">
into_element.innerHTML += `<div class="flex flex_col gap_2">
<label for="${option.key}"><b>${option.label.replaceAll("_", " ")}</b></label>
<div class="card flex flex-row gap-2">
<div class="card flex flex_row gap_2">
<input
type="color"
onchange="window.update_field_with_color('${option.key}', event.target.value)"
@ -956,7 +956,7 @@ media_theme_pref();
name="${option.key}"
id="${option.key}"
value="${option.value}"
class="w-full"
class="w_full"
style="height: 32px"
/>
</div>
@ -967,12 +967,12 @@ media_theme_pref();
return;
}
into_element.innerHTML += `<div class="card-nest">
into_element.innerHTML += `<div class="card_nest">
<div class="card small">
<label for="${option.key}"><b>${option.label.replaceAll("_", " ")}</b></label>
</div>
<div class="card flex flex-col gap-2">
<div class="card flex flex_col gap_2">
<${option.input_element_type || "input"}
type="text"
onchange="window.set_setting_field${id_key}('${option.key}', event.target.value)"
@ -1122,14 +1122,14 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
let permissions_html = "";
for (const match of matching) {
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
permissions_html += `<div class="card w_full secondary flex justify_between gap_2">
<span>${match} <code>${permissions[match]}</code></span>
<button class="red lowered" onclick="${remove_name}('${match}')">Remove</button>
</div>`;
}
for (const match of not_matching) {
permissions_html += `<div class="card w-full secondary flex justify-between gap-2">
permissions_html += `<div class="card w_full secondary flex justify_between gap_2">
<span>${match} <code>${permissions[match]}</code></span>
<button class="green lowered" onclick="${add_name}('${match}')">Add</button>
</div>`;

View file

@ -725,8 +725,8 @@
self.define("render_token_picker", ({ $ }, element) => {
element.innerHTML = "";
for (const token of Object.entries($.LOGIN_ACCOUNT_TOKENS)) {
element.innerHTML += `<div class="flex gap-2 flex-row">
<button class="lowered w-full justify-start" onclick="trigger('me::login', ['${token[0]}'])">
element.innerHTML += `<div class="flex gap_2 flex_row">
<button class="lowered w_full justify-start" onclick="trigger('me::login', ['${token[0]}'])">
<img
title="${token[0]}'s avatar"
src="/api/v1/auth/user/${token[0]}/avatar?selector_type=username"