Commit 536d1fe0 authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Jonne Haß

Move nsfw-shield to status-message

closes #6270
parent ed463750
......@@ -16,6 +16,7 @@
## Features
* Implement NodeInfo [#6239](https://github.com/diaspora/diaspora/pull/6239)
* Display original author on reshares of NSFW posts [#6270](https://github.com/diaspora/diaspora/pull/6270)
# 0.5.2.0
......
......@@ -103,6 +103,8 @@
padding-left: 10px;
}
.nsfw-off { display: none; }
.nsfw-shield { display: none; }
.oembed { width: 95%; }
.photo_attachments {
img.big_stream_photo { max-width: 90%; }
......
......@@ -45,6 +45,9 @@
border-bottom: 1px solid $border-grey;
padding: 10px;
& > .media {
&.shield-active .nsfw-hidden { display: none; }
&:not(.shield-active) .nsfw-shield { display: none; }
&:not(.shield-off) .nsfw-off { display: none; }
& > .img > .avatar {
margin-top: 5px;
&.small {
......
<div class="nsfw-shield">
<strong>
#NSFW
</strong>
|
<a href="#" class="show_nsfw_post">
{{t "stream.show_nsfw_post"}}
</a>
|
<a href="#" class="toggle_nsfw_state">
{{t "stream.show_nsfw_posts"}}
</a>
</div>
<div class="nsfw-off">
<strong>
#NSFW
</strong>
|
<a href="#" class="toggle_nsfw_state">
{{t "stream.hide_nsfw_posts"}}
</a>
</div>
{{#if largePhoto}}
<div class="photo_attachments">
<div class="photo_attachments nsfw-hidden">
<a href="#" class="stream-photo-link">
{{#with largePhoto}}
<img src="{{sizes.large}}" class="stream-photo big_stream_photo" data-small-photo="{{sizes.small}}" data-full-photo="{{sizes.large}}" rel="lightbox">
......@@ -14,7 +38,7 @@
</div>
{{/if}}
<div class="collapsible">
<div class="collapsible nsfw-hidden">
<div class="markdown-content">
{{#if text}}
{{{text}}}
......
<div class="media">
<div class="media {{#if showPost}} {{#if nsfw}} shield-off {{/if}} {{else}} shield-active {{/if}}">
{{#with author}}
<a href="/people/{{guid}}" class="img {{{hovercardable this}}}">
{{{personImage this}}}
......@@ -54,38 +53,11 @@
</span>
</div>
{{#if showPost}}
{{#if nsfw}}
<div class="nsfw_off">
<strong>
#NSFW
</strong>
|
<a href="#" class="toggle_nsfw_state">
{{t "stream.hide_nsfw_posts"}}
</a>
</div>
{{/if}}
<div class="post-content"> </div>
<div class="status-message-location"> </div>
<div class="feedback"> </div>
<div class="likes"> </div>
<div class="comments"> </div>
{{else}}
<div class="nsfw-shield">
<strong>
#NSFW
</strong>
|
<a href="#" class="show_nsfw_post">
{{t "stream.show_nsfw_post"}}
</a>
|
<a href="#" class="toggle_nsfw_state">
{{t "stream.show_nsfw_posts"}}
</a>
</div>
{{/if}}
<div class="post-content"> </div>
<div class="status-message-location nsfw-hidden"> </div>
<div class="feedback nsfw-hidden"> </div>
<div class="likes nsfw-hidden"> </div>
<div class="comments nsfw-hidden"> </div>
</div>
</div>
......@@ -144,7 +144,7 @@ describe("app.views.StreamPost", function(){
this.view = new this.PostViewClass({model : this.statusMessage}).render();
this.hiddenPosts = function(){
return this.view.$(".nsfw-shield");
return this.view.$(".media.shield-active .nsfw-shield");
};
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment