Merge pull request 'Remove uri_encode and use Tera filter instead' (#6) from remove_uri_dependency into main
Reviewed-on: #6
This commit is contained in:
commit
6e5c017dd7
7
Cargo.lock
generated
7
Cargo.lock
generated
@ -1384,7 +1384,6 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sled",
|
||||
"uri_encode",
|
||||
"xdg",
|
||||
]
|
||||
|
||||
@ -2614,12 +2613,6 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uri_encode"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34acb51c736f8784bdbca2692c3cc57213bfc1b329fd6eb7668d5e4af8f87ceb"
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
|
@ -13,7 +13,6 @@ license = "MIT"
|
||||
async-std = "1.10"
|
||||
bincode = "1.3"
|
||||
chrono = "0.4"
|
||||
uri_encode = "1"
|
||||
env_logger = "0.9"
|
||||
futures = "0.3"
|
||||
golgi = { git = "https://git.coopcloud.tech/golgi-ssb/golgi.git" }
|
||||
|
@ -89,9 +89,7 @@ pub async fn post(db: &State<Database>, public_key: &str, msg_id: &str) -> Templ
|
||||
let context = context! {
|
||||
peers: &peers_unread,
|
||||
selected_peer: &public_key,
|
||||
selected_peer_encoded: &uri_encode::encode_uri_component(public_key),
|
||||
selected_post: &msg_id,
|
||||
selected_post_encoded: &uri_encode::encode_uri_component(msg_id),
|
||||
posts: &posts,
|
||||
post: &post,
|
||||
post_is_selected: &true
|
||||
|
@ -4,6 +4,8 @@
|
||||
<img src="/icons/download.png">
|
||||
</a>
|
||||
{% if post_is_selected %}
|
||||
{% set selected_peer_encoded = selected_peer | urlencode_strict %}
|
||||
{% set selected_post_encoded = selected_post | urlencode_strict %}
|
||||
{% if post.read %}
|
||||
{% set mark_unread_url = "/posts/" ~ selected_peer_encoded ~ "/" ~ selected_post_encoded ~ "/unread" %}
|
||||
<a class="disabled icon" title="Mark as read">
|
||||
|
Loading…
Reference in New Issue
Block a user