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)) .merge(routes::routes(&config))
.layer(Extension(Arc::new(RwLock::new((database, tera, client))))) .layer(Extension(Arc::new(RwLock::new((database, tera, client)))))
.layer(axum::extract::DefaultBodyLimit::max( .layer(axum::extract::DefaultBodyLimit::max(
var("MAX_BODY_LIMIT") var("BODY_LIMIT")
.unwrap_or("8388608".to_string()) .unwrap_or("8388608".to_string())
.parse::<usize>() .parse::<usize>()
.unwrap(), .unwrap(),

View file

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

View file

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