Change the bypass message and format code

The bypass message now indicates that the bypass is only temporary.
This commit is contained in:
gmnsii 2023-03-23 11:09:33 -07:00
parent e046144bf3
commit a0726c5903
7 changed files with 12 additions and 17 deletions

View file

@ -1,6 +1,4 @@
use std::{ use std::process::{Command, ExitStatus, Output};
process::{Command, ExitStatus, Output},
};
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
use std::os::unix::process::ExitStatusExt; use std::os::unix::process::ExitStatusExt;

View file

@ -234,4 +234,3 @@ async fn parse_duplicates(json: &serde_json::Value, filters: &HashSet<String>) -
let (num_posts_filtered, all_posts_filtered) = filter_posts(&mut duplicates, filters); let (num_posts_filtered, all_posts_filtered) = filter_posts(&mut duplicates, filters);
(duplicates, num_posts_filtered, all_posts_filtered) (duplicates, num_posts_filtered, all_posts_filtered)
} }

View file

@ -190,4 +190,3 @@ fn parse_comments(json: &serde_json::Value, post_link: &str, post_author: &str,
}) })
.collect() .collect()
} }

View file

@ -434,4 +434,3 @@ async fn subreddit(sub: &str, quarantined: bool) -> Result<Subreddit, String> {
nsfw: res["data"]["over18"].as_bool().unwrap_or_default(), nsfw: res["data"]["over18"].as_bool().unwrap_or_default(),
}) })
} }

View file

@ -20,7 +20,7 @@
This instance of Libreddit is SFW-only.</p> This instance of Libreddit is SFW-only.</p>
{% else %} {% else %}
Enable "Show NSFW posts" in <a href="/settings">settings</a> to view this {% if res_type == crate::utils::ResourceType::Subreddit %}subreddit{% else if res_type == crate::utils::ResourceType::User %}user's posts or comments{% else if res_type == crate::utils::ResourceType::Post %}post{% endif %}. <br> Enable "Show NSFW posts" in <a href="/settings">settings</a> to view this {% if res_type == crate::utils::ResourceType::Subreddit %}subreddit{% else if res_type == crate::utils::ResourceType::User %}user's posts or comments{% else if res_type == crate::utils::ResourceType::Post %}post{% endif %}. <br>
{% if res_type == crate::utils::ResourceType::Post %} You can also bypass this gate by clicking on this <a href="{{url}}&bypass_nsfw_landing">link</a>.{% endif %} {% if res_type == crate::utils::ResourceType::Post %} You can also temporarily bypass this gate and view the post by clicking on this <a href="{{url}}&bypass_nsfw_landing">link</a>.{% endif %}
{% endif %} {% endif %}
</p> </p>
</div> </div>