fix: forum signatures
This commit is contained in:
parent
9ec52abfe4
commit
3738a5cd1f
5 changed files with 11 additions and 4 deletions
|
@ -134,7 +134,12 @@
|
|||
("placeholder" "content")
|
||||
("minlength" "2")
|
||||
("maxlength" "4096")
|
||||
(text "{% if draft -%}{{ draft.content }}{%- endif %}")))
|
||||
(text "{% if draft -%}{{ draft.content }}{%- endif %}")
|
||||
(text "{%- if use_signature %}")
|
||||
(text "
|
||||
|
||||
{{ user.settings.forum_signature }}")
|
||||
(text "{%- endif %}")))
|
||||
(div
|
||||
("id" "files_list")
|
||||
("class" "flex gap_2 flex_wrap"))
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
(div
|
||||
("class" "flex gap_2")
|
||||
(a
|
||||
("href" "/communities/intents/post?community={{ community.id }}&topic={{ topic_id }}")
|
||||
("href" "/communities/intents/post?community={{ community.id }}&topic={{ topic_id }}&sig=true")
|
||||
("class" "button small lowered")
|
||||
("data-turbo" "false")
|
||||
(icon (text "plus"))
|
||||
|
|
|
@ -1954,7 +1954,7 @@
|
|||
\"textarea\",
|
||||
],
|
||||
[
|
||||
[\"forum_signature\", \"Forum signature (coming soon)\"],
|
||||
[\"forum_signature\", \"Forum signature\"],
|
||||
settings.forum_signature,
|
||||
\"textarea\",
|
||||
],
|
||||
|
|
|
@ -12,7 +12,6 @@ use tetratto_core::model::{
|
|||
permissions::FinePermission,
|
||||
ApiReturn, Error,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
get_user_from_token,
|
||||
routes::api::v1::{
|
||||
|
|
|
@ -266,6 +266,8 @@ pub struct CreatePostProps {
|
|||
pub from_draft: usize,
|
||||
#[serde(default)]
|
||||
pub quote: usize,
|
||||
#[serde(default, alias = "sig")]
|
||||
pub use_signature: bool,
|
||||
}
|
||||
|
||||
/// `/communities/intents/post`
|
||||
|
@ -359,6 +361,7 @@ pub async fn create_post_request(
|
|||
context.insert("communities", &communities);
|
||||
context.insert("selected_stack", &props.stack);
|
||||
context.insert("selected_community", &props.community);
|
||||
context.insert("use_signature", &props.use_signature);
|
||||
|
||||
// return
|
||||
Ok(Html(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue