fix: compose post modal button

This commit is contained in:
trisua 2025-04-08 22:13:55 -04:00
parent 437724065b
commit bfcb35e18b
4 changed files with 7 additions and 5 deletions

1
.env Normal file
View file

@ -0,0 +1 @@
BODY_LIMIT=8388608 # edit this to change maximum request body size

View file

@ -47,7 +47,7 @@ async fn main() {
.merge(routes::routes(&config))
.layer(Extension(Arc::new(RwLock::new((database, tera, client)))))
.layer(axum::extract::DefaultBodyLimit::max(
var("MAX_BODY_LIMIT")
var("BODY_LIMIT")
.unwrap_or("8388608".to_string())
.parse::<usize>()
.unwrap(),

View file

@ -38,12 +38,13 @@
<div class="flex nav_side">
{% if user %}
<button
onclick="document.getElementById('town_square_post_dialog').showModal()"
<a
href="javascript:document.getElementById('town_square_post_dialog').showModal()"
class="button"
title="Create post"
>
{{ icon "square-pen" }}
</button>
</a>
<a
href="/notifs"

View file

@ -308,7 +308,7 @@ macros -%}
<div class="flex gap-2">
<button
class="bold red quaternary"
onclick="document.getElementById('town_square_post_dialog').remove()"
onclick="document.getElementById('town_square_post_dialog').close()"
type="button"
>
{{ icon "x" }} {{ text "dialog:action.close" }}