diff --git a/crates/app/src/public/css/style.css b/crates/app/src/public/css/style.css index 7bb2eef..f992b29 100644 --- a/crates/app/src/public/css/style.css +++ b/crates/app/src/public/css/style.css @@ -162,6 +162,10 @@ p { margin-bottom: 0; } +.post_right { + max-width: calc(84% + 4px); +} + .name { max-width: 250px; overflow: hidden; @@ -178,6 +182,10 @@ p { .name.lg\:long { max-width: unset; } + + .post_right { + max-width: calc(91% + 4px); + } } ul, @@ -357,6 +365,7 @@ img.emoji { height: 100dvh; top: 0; left: 0; + animation: fadein ease-in-out 1 0.1s forwards running; } .lightbox_exit { @@ -369,6 +378,7 @@ img.emoji { box-shadow: var(--shadow-x-offset) var(--shadow-y-offset) var(--shadow-size) var(--color-shadow); border-radius: var(--radius); + animation: popin ease-in-out 1 0.15s forwards running; } /* avatar/banner */ @@ -1096,6 +1106,26 @@ dialog::backdrop { min-width: max-content; } +@keyframes fadein { + from { + opacity: 0%; + } + + to { + opacity: 100%; + } +} + +@keyframes static_fadeout { + from { + opacity: 100%; + } + + to { + opacity: 0%; + } +} + @keyframes popin { from { opacity: 0%; diff --git a/crates/app/src/public/html/components.html b/crates/app/src/public/html/components.html index 78a7765..f2bf48e 100644 --- a/crates/app/src/public/html/components.html +++ b/crates/app/src/public/html/components.html @@ -189,7 +189,7 @@ and show_community and community.id != config.town_square or question %} selector_type="username") }} -
+
{{ self::full_username(user=owner) }} {{ icon "triangle-alert" }} {{ post.context.content_warning }} diff --git a/crates/app/src/public/js/atto.js b/crates/app/src/public/js/atto.js index cae62b4..35eae31 100644 --- a/crates/app/src/public/js/atto.js +++ b/crates/app/src/public/js/atto.js @@ -1036,7 +1036,13 @@ ${option.input_element_type === "textarea" ? `${option.value}` : ""} }); self.define("lightbox_close", () => { - document.getElementById("lightbox").classList.add("hidden"); + document.getElementById("lightbox").style.animation = + "static_fadeout ease-in-out 1 0.1s forwards running"; + + setTimeout(() => { + document.getElementById("lightbox").removeAttribute("style"); + document.getElementById("lightbox").classList.add("hidden"); + }, 250); }); })(); diff --git a/crates/core/src/database/auth.rs b/crates/core/src/database/auth.rs index 0a919da..2ee5a0f 100644 --- a/crates/core/src/database/auth.rs +++ b/crates/core/src/database/auth.rs @@ -422,7 +422,7 @@ impl DataManager { let res = execute!( &conn, "UPDATE users SET username = $1 WHERE id = $2", - params![&to.as_str(), &(id as i64)] + params![&to.to_lowercase(), &(id as i64)] ); if let Err(e) = res { @@ -430,7 +430,6 @@ impl DataManager { } self.cache_clear_user(&user).await; - Ok(()) }