Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gigadoc 2
diaspora
Commits
536d1fe0
Commit
536d1fe0
authored
Jul 30, 2015
by
Steffen van Bergerem
Committed by
Jonne Haß
Jul 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move nsfw-shield to status-message
closes #6270
parent
ed463750
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
38 deletions
+40
-38
Changelog.md
Changelog.md
+1
-0
app/assets/stylesheets/single-post-view.scss
app/assets/stylesheets/single-post-view.scss
+2
-0
app/assets/stylesheets/stream_element.scss
app/assets/stylesheets/stream_element.scss
+3
-0
app/assets/templates/status-message_tpl.jst.hbs
app/assets/templates/status-message_tpl.jst.hbs
+26
-2
app/assets/templates/stream-element_tpl.jst.hbs
app/assets/templates/stream-element_tpl.jst.hbs
+7
-35
spec/javascripts/app/views/stream_post_spec.js
spec/javascripts/app/views/stream_post_spec.js
+1
-1
No files found.
Changelog.md
View file @
536d1fe0
...
...
@@ -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
...
...
app/assets/stylesheets/single-post-view.scss
View file @
536d1fe0
...
...
@@ -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%
;
}
...
...
app/assets/stylesheets/stream_element.scss
View file @
536d1fe0
...
...
@@ -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
{
...
...
app/assets/templates/status-message_tpl.jst.hbs
View file @
536d1fe0
<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
}}}
...
...
app/assets/templates/stream-element_tpl.jst.hbs
View file @
536d1fe0
<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>
spec/javascripts/app/views/stream_post_spec.js
View file @
536d1fe0
...
...
@@ -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
"
);
};
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment