add: post tags

This commit is contained in:
trisua 2025-05-08 20:08:43 -04:00
parent efeb660de6
commit 8c3024cb40
13 changed files with 180 additions and 34 deletions

View file

@ -197,6 +197,7 @@
reactions_enabled: true,
is_nsfw: false,
content_warning: "",
tags: "",
};
window.BLANK_INITIAL_SETTINGS = JSON.stringify(
@ -238,12 +239,28 @@
window.POST_INITIAL_SETTINGS.content_warning,
"textarea",
],
[
["tags", "Tags"],
window.POST_INITIAL_SETTINGS.tags,
"input",
{
embed_html:
'<span class="fade">Tags should be separated by a comma.</span>',
},
],
];
trigger("ui::generate_settings_ui", [
document.getElementById("post_options"),
settings_fields,
window.POST_INITIAL_SETTINGS,
{
tags: (new_tags) => {
window.POST_INITIAL_SETTINGS.tags = new_tags
.split(",")
.map((t) => t.trim());
},
},
]);
}, 250);
</script>