add: outbox tab on profile
tab is only visible to profile owner and mods
This commit is contained in:
parent
5dec98d698
commit
7bda718082
12 changed files with 264 additions and 9 deletions
|
@ -65,6 +65,7 @@ pub const PROFILE_BLOCKED: &str = include_str!("./public/html/profile/blocked.li
|
|||
pub const PROFILE_BANNED: &str = include_str!("./public/html/profile/banned.lisp");
|
||||
pub const PROFILE_REPLIES: &str = include_str!("./public/html/profile/replies.lisp");
|
||||
pub const PROFILE_MEDIA: &str = include_str!("./public/html/profile/media.lisp");
|
||||
pub const PROFILE_OUTBOX: &str = include_str!("./public/html/profile/outbox.lisp");
|
||||
|
||||
pub const COMMUNITIES_LIST: &str = include_str!("./public/html/communities/list.lisp");
|
||||
pub const COMMUNITIES_BASE: &str = include_str!("./public/html/communities/base.lisp");
|
||||
|
@ -144,7 +145,13 @@ pub(crate) async fn pull_icon(icon: &str, icons_dir: &str) {
|
|||
}
|
||||
|
||||
println!("download icon: {icon}");
|
||||
let svg = reqwest::get(icon_url).await.unwrap().text().await.unwrap();
|
||||
let svg = reqwest::get(icon_url)
|
||||
.await
|
||||
.unwrap()
|
||||
.text()
|
||||
.await
|
||||
.unwrap()
|
||||
.replace("\n", "");
|
||||
|
||||
write(&file_path, &svg).unwrap();
|
||||
writer.insert(icon.to_string(), svg);
|
||||
|
@ -331,6 +338,7 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
|
|||
write_template!(html_path->"profile/banned.html"(crate::assets::PROFILE_BANNED) --config=config --lisp plugins);
|
||||
write_template!(html_path->"profile/replies.html"(crate::assets::PROFILE_REPLIES) --config=config --lisp plugins);
|
||||
write_template!(html_path->"profile/media.html"(crate::assets::PROFILE_MEDIA) --config=config --lisp plugins);
|
||||
write_template!(html_path->"profile/outbox.html"(crate::assets::PROFILE_OUTBOX) --config=config --lisp plugins);
|
||||
|
||||
write_template!(html_path->"communities/list.html"(crate::assets::COMMUNITIES_LIST) -d "communities" --config=config --lisp plugins);
|
||||
write_template!(html_path->"communities/base.html"(crate::assets::COMMUNITIES_BASE) --config=config --lisp plugins);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue