Hide cw pictures behind a summary/details (#483)

* Hide cw pictures behind a summary/details
* refactor md_to_html a bit and add cw support
* use random id for cw checkbox
This commit is contained in:
fdb-hiroshima
2019-04-06 19:20:33 +02:00
committed by GitHub
parent eabe73ddc0
commit 12c2078c89
11 changed files with 239 additions and 63 deletions
+3 -2
View File
@@ -15,8 +15,8 @@ use plume_common::{
utils,
};
use plume_models::{
blogs::Blog, comments::*, db_conn::DbConn, instance::Instance, mentions::Mention, posts::Post,
safe_string::SafeString, tags::Tag, users::User,
blogs::Blog, comments::*, db_conn::DbConn, instance::Instance, medias::Media,
mentions::Mention, posts::Post, safe_string::SafeString, tags::Tag, users::User,
};
use routes::errors::ErrorPage;
use Worker;
@@ -49,6 +49,7 @@ pub fn create(
.expect("comments::create: local instance error")
.public_domain,
true,
Some(Media::get_media_processor(&conn, vec![&user])),
);
let comm = Comment::insert(
&*conn,