Compare commits
2 Commits
v0.35.0
...
60c0d63583
Author | SHA1 | Date | |
---|---|---|---|
60c0d63583 | |||
f398d16c22 |
@ -122,7 +122,7 @@ fn set_cookies_method(req: Request<Body>, remove_cookies: bool) -> Response<Body
|
||||
Some(value) => response.insert_cookie(
|
||||
Cookie::build((name.to_owned(), value.clone()))
|
||||
.path("/")
|
||||
.http_only(true)
|
||||
.http_only(name != "ffmpeg_video_downloads")
|
||||
.expires(OffsetDateTime::now_utc() + Duration::weeks(52))
|
||||
.into(),
|
||||
),
|
||||
|
@ -1634,6 +1634,14 @@ td, th {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.nsfw-tag {
|
||||
color: var(--nsfw);
|
||||
border: 2px solid var(--nsfw);
|
||||
padding: 3px;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
|
@ -6,11 +6,11 @@
|
||||
<h1>
|
||||
😱
|
||||
{% if res_type == crate::utils::ResourceType::Subreddit %}
|
||||
r/{{ res }} is a NSFW community!
|
||||
r/{{ res }} is a <b class="nsfw-tag">NSFW</b> community!
|
||||
{% else if res_type == crate::utils::ResourceType::User %}
|
||||
u/{{ res }}'s content is NSFW!
|
||||
u/{{ res }}'s content is <b class="nsfw-tag">NSFW</b>!
|
||||
{% else if res_type == crate::utils::ResourceType::Post %}
|
||||
This post is NSFW!
|
||||
This post is <b class="nsfw-tag">NSFW</b>!
|
||||
{% endif %}
|
||||
</h1>
|
||||
<br />
|
||||
@ -20,6 +20,7 @@
|
||||
This instance of Redlib is SFW-only.</p>
|
||||
{% 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>
|
||||
<div>Alternatively <a href="/settings/update/?show_nsfw=on&redirect={{self.url[1..self.url.len()]}}">enable NSFW posts</a> now and view this {% if res_type == crate::utils::ResourceType::Subreddit %}subreddit{% else if res_type == crate::utils::ResourceType::User %}profile{% else if res_type == crate::utils::ResourceType::Post %}post{% endif %} immediately</div>
|
||||
{% 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 %}
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user