Merge branch 'next-minor' into develop

This commit is contained in:
Benjamin Neff 2018-11-04 03:07:50 +01:00
commit 0c2cd2ef1b
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
9 changed files with 61 additions and 17 deletions

View file

@ -15,15 +15,17 @@
# 0.7.8.0 # 0.7.8.0
## Refactor ## Refactor
* Make setting up a development environment 9001% easier by adding a Docker-based setup [#7870](https://github.com/diaspora/diaspora/pull/7870) * Make setting up a development environment 9001% easier by adding a Docker-based setup [#7870](https://github.com/diaspora/diaspora/pull/7870)
* Improve `web+diaspora://` handler description [#7909](https://github.com/diaspora/diaspora/pull/7909) * Improve `web+diaspora://` handler description [#7909](https://github.com/diaspora/diaspora/pull/7909)
* Move comment timestamp next to author name [#7905](https://github.com/diaspora/diaspora/pull/7905)
* Sharpen small and medium thumbnails [#7924](https://github.com/diaspora/diaspora/pull/7924)
## Bug fixes ## Bug fixes
* Ignore invalid URLs for camo [#7922](https://github.com/diaspora/diaspora/pull/7922)
## Features ## Features
* Add the ability to assign roles in the admin panel [#7868](https://github.com/diaspora/diaspora/pull/7868) * Add the ability to assign roles in the admin panel [#7868](https://github.com/diaspora/diaspora/pull/7868)
* Improve memory usage with libjemalloc if available [#7919](https://github.com/diaspora/diaspora/pull/7919)
# 0.7.7.0 # 0.7.7.0

View file

@ -44,6 +44,19 @@
} }
} }
.permalink {
@include transition(opacity);
opacity: 0;
}
.comment:hover .permalink {
opacity: .8;
&:hover {
opacity: 1;
}
}
.comment.new-comment-form-wrapper { padding-bottom: 0; } .comment.new-comment-form-wrapper { padding-bottom: 0; }
.submit-button { .submit-button {

View file

@ -122,9 +122,12 @@
opacity: 0; opacity: 0;
} }
&:hover .permalink { &:hover .post-timestamp .permalink {
opacity: .8; opacity: .8;
&:hover { opacity: 1; }
&:hover {
opacity: 1;
}
} }
div.reshare { div.reshare {

View file

@ -20,18 +20,21 @@
{{/if}} {{/if}}
</div> </div>
<div>
{{#linkToAuthor author}} {{#linkToAuthor author}}
{{name}} {{name}}
{{/linkToAuthor}} {{/linkToAuthor}}
-
<a href="/posts/{{parent.id}}#{{guid}}" class="permalink_comment">
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}"/>
</a>
<a href="/posts/{{parent.guid}}#{{guid}}" class="permalink gray" title="{{t "stream.permalink"}}">
<i class="entypo-link"></i>
</a>
</div>
<div class="collapsible comment-content markdown-content"> <div class="collapsible comment-content markdown-content">
{{{text}}} {{{text}}}
</div> </div>
<div class="info">
<a href="/posts/{{parent.id}}#{{guid}}" class="permalink_comment">
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}"/>
</a>
</div>
</div> </div>
</div> </div>

View file

@ -19,7 +19,7 @@
{{~name~}} {{~name~}}
{{/linkToAuthor}} {{/linkToAuthor}}
<span class="details gray"> <span class="details gray post-timestamp">
- -
<a href="/posts/{{id}}"> <a href="/posts/{{id}}">
<time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}" /> <time class="timeago" data-original-title="{{{localTime created_at}}}" datetime="{{created_at}}" />

View file

@ -20,10 +20,10 @@ class ProcessedImage < CarrierWave::Uploader::Base
end end
version :thumb_small do version :thumb_small do
process resize_to_fill: [50, 50] process resize_to_fill: [50, 50, combine_options: {unsharp: "1.5x1+0.7+0.02"}]
end end
version :thumb_medium do version :thumb_medium do
process resize_to_limit: [100, 100] process resize_to_limit: [100, 100, combine_options: {unsharp: "1.5x1+0.7+0.02"}]
end end
version :thumb_large do version :thumb_large do
process resize_to_limit: [300, 1500] process resize_to_limit: [300, 1500]

View file

@ -17,7 +17,11 @@ module Diaspora
return unless url return unless url
return url unless self.url_eligible?(url) return url unless self.url_eligible?(url)
begin
url = Addressable::URI.encode(Addressable::URI.unencode(url)) url = Addressable::URI.encode(Addressable::URI.unencode(url))
rescue Addressable::URI::InvalidURIError
return url
end
digest = OpenSSL::HMAC.hexdigest( digest = OpenSSL::HMAC.hexdigest(
OpenSSL::Digest.new('sha1'), OpenSSL::Digest.new('sha1'),

View file

@ -202,6 +202,21 @@ diaspora.yml.example
" "
fi fi
# Use libjemalloc if it's available for better memory usage
command -v ldconfig > /dev/null 2>&1
if [ $? -eq 0 ]; then
ldconfig=ldconfig
elif [ -x /sbin/ldconfig ]; then
ldconfig=/sbin/ldconfig
fi
if [ -n "${ldconfig}" ]; then
jemalloc_path=$(${ldconfig} -p | grep jemalloc | tr ' ' '\n' | grep '^/' | head -1)
if [ -n "${jemalloc_path}" ]; then
export LD_PRELOAD="${jemalloc_path}"
fi
fi
# Start Diaspora # Start Diaspora
printf "Starting Diaspora in $RAILS_ENV mode " printf "Starting Diaspora in $RAILS_ENV mode "
if [ -n "$PORT" ] if [ -n "$PORT" ]

View file

@ -48,6 +48,10 @@ describe Diaspora::Camo do
expect(Diaspora::Camo.image_url("https://example.com/%C3%A1%C3%A9%C3%B3?foo=%C3%A4%C3%BC%C3%B6&bar=a%CC%80")) expect(Diaspora::Camo.image_url("https://example.com/%C3%A1%C3%A9%C3%B3?foo=%C3%A4%C3%BC%C3%B6&bar=a%CC%80"))
.to eq(camo_image_url) .to eq(camo_image_url)
end end
it "ignores invalid urls" do
expect(Diaspora::Camo.image_url("https://")).to eq("https://")
end
end end
end end