add: ability to join/leave/be banned from communities

This commit is contained in:
trisua 2025-03-31 15:39:49 -04:00
parent f3c2157dfc
commit 619184d02e
28 changed files with 618 additions and 197 deletions

View file

@ -667,7 +667,7 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
self.define(
"generate_settings_ui",
({ $ }, into_element, options, settings_ref) => {
({ $ }, into_element, options, settings_ref, key_map = {}) => {
for (const option of options) {
$.render_settings_ui_field(into_element, {
key: Array.isArray(option[0]) ? option[0][0] : option[0],
@ -678,7 +678,12 @@ ${option.input_element_type === "textarea" ? `${option.value}</textarea>` : ""}
}
window.set_setting_field = (key, value) => {
settings_ref[key] = value;
if (settings_ref) {
settings_ref[key] = value;
} else {
key_map[key](value);
}
console.log("update", key);
};
},