Unverified Commit b88f53a3 authored by Dennis Schubert's avatar Dennis Schubert

Merge branch 'release/0.6.1.0'

parents 55219372 e18627f5
# 0.6.1.0
Note: Although this is a minor release, the configuration file changed because the old Mapbox implementation is no longer valid, and the current implementation requires additional fields. Chances are high that if you're using the old integration, it will be broken anyway. If you do use Mapbox, please check out the `diaspora.yml.example` for new parameters.
## Refactor
* Indicate proper way to report bugs in the sidebar [#7039](https://github.com/diaspora/diaspora/pull/7039)
* Remove text color from notification mails and fix sender avatar [#7054](https://github.com/diaspora/diaspora/pull/7054)
* Make the session cookies HttpOnly again [#7041](https://github.com/diaspora/diaspora/pull/7041)
* Invalidate sessions with invalid CSRF tokens [#7050](https://github.com/diaspora/diaspora/pull/7050)
* Liking a post will no longer update its interacted timestamp [#7030](https://github.com/diaspora/diaspora/pull/7030)
* Improve W3C compliance [#7068](https://github.com/diaspora/diaspora/pull/7068) [#7082](https://github.com/diaspora/diaspora/pull/7082) [#7091](https://github.com/diaspora/diaspora/pull/7091) [#7092](https://github.com/diaspora/diaspora/pull/7092)
* Load jQuery in the head on mobile [#7086](https://github.com/diaspora/diaspora/pull/7086)
* Use translation for NodeInfo services [#7102](https://github.com/diaspora/diaspora/pull/7102)
* Adopt new Mapbox tile URIs [#7066](https://github.com/diaspora/diaspora/pull/7066)
* Refactored post interactions on the single post view [#7089](https://github.com/diaspora/diaspora/pull/7089)
* Extract inline JavaScript [#7113](https://github.com/diaspora/diaspora/pull/7113)
* Port conversations inbox to backbone.js [#7108](https://github.com/diaspora/diaspora/pull/7108)
* Refactored stream shortcuts for more flexibility [#7127](https://github.com/diaspora/diaspora/pull/7127)
* Link to admin dashboard instead of admin panel from the podmin landing page [#7130](https://github.com/diaspora/diaspora/pull/7130)
## Bug fixes
* Post comments no longer get collapsed when interacting with a post [#7040](https://github.com/diaspora/diaspora/pull/7040)
* Closed accounts will no longer show up in the account search [#7042](https://github.com/diaspora/diaspora/pull/7042)
* Code blocks in conversations no longer overflow the content [#7055](https://github.com/diaspora/diaspora/pull/7055)
* More buttons in mobile streams are fixed [#7036](https://github.com/diaspora/diaspora/pull/7036)
* Fixed missing sidebar background in the contacts tab [#7064](https://github.com/diaspora/diaspora/pull/7064)
* Fix tags URLs in hovercards [#7075](https://github.com/diaspora/diaspora/pull/7075)
* Fix 500 in html requests for post interactions [#7085](https://github.com/diaspora/diaspora/pull/7085)
* Remove whitespaces next to like link in stream [#7088](https://github.com/diaspora/diaspora/pull/7088)
* Prevent overflow of interaction avatars in the single post view [#7070](https://github.com/diaspora/diaspora/pull/7070)
* Fix moving publisher on first click after page load [#7094](https://github.com/diaspora/diaspora/pull/7094)
* Fix link to comment on report page [#7105](https://github.com/diaspora/diaspora/pull/7105)
* Fix duplicate flash message on mobile profile edit [#7107](https://github.com/diaspora/diaspora/pull/7107)
* Clicking photos on mobile should no longer cause 404s [#7071](https://github.com/diaspora/diaspora/pull/7071)
* Fix avatar size on mobile privacy page for ignored people [#7148](https://github.com/diaspora/diaspora/pull/7148)
* Don't display tag following button when logged out [#7155](https://github.com/diaspora/diaspora/pull/7155)
* Fix message modal on profile page [#7137](https://github.com/diaspora/diaspora/pull/7137)
* Display error message when aspect membership changes fail [#7132](https://github.com/diaspora/diaspora/pull/7132)
* Avoid the creation of pod that are none [#7145](https://github.com/diaspora/diaspora/pull/7145)
* Fixed tag pages with alternate default aspect settings [#7262](https://github.com/diaspora/diaspora/pull/7162)
* Suppressed CSP related deprecation warnings [#7263](https://github.com/diaspora/diaspora/pull/7163)
## Features
* Deleted comments will be removed when loading more comments [#7045](https://github.com/diaspora/diaspora/pull/7045)
* The "subscribe" indicator on a post now gets toggled when you like or rehsare a post [#7040](https://github.com/diaspora/diaspora/pull/7040)
* Add OpenGraph video support [#7043](https://github.com/diaspora/diaspora/pull/7043)
* You'll now get redirected to the invites page if you follow an invitation but you're already logged in [#7061](https://github.com/diaspora/diaspora/pull/7061)
* Add support for setting BOSH access protocol via chat configuration [#7100](https://github.com/diaspora/diaspora/pull/7100)
* Add number of unreviewed reports to admin dashboard and admin sidebar [#7109](https://github.com/diaspora/diaspora/pull/7109)
* Don't federate to pods that have been offline for an extended period of time [#7120](https://github.com/diaspora/diaspora/pull/7120)
* Add In-Reply-To and References headers to notification mails [#7122](https://github.com/diaspora/diaspora/pull/7122)
* Directly link to a comment in commented notification mails [#7124](https://github.com/diaspora/diaspora/pull/7124)
* Add optional `Content-Security-Policy` header [#7128](https://github.com/diaspora/diaspora/pull/7128)
* Add links to main stream and public stream to the mobile drawer [#7144](https://github.com/diaspora/diaspora/pull/7144)
* Allow opening search results from the dropdown in a new tab [#7021](https://github.com/diaspora/diaspora/issues/7021)
* Add user setting for default post visibility [#7118](https://github.com/diaspora/diaspora/issues/7118)
# 0.6.0.1
Fixes an issue with installing an running diaspora\*, caused by a recent bundler update that fixes a bundler bug on which we depended on.
......
......@@ -4,7 +4,7 @@ gem "rails", "4.2.7.1"
# Legacy Rails features, remove me!
# responders (class level)
gem "responders", "2.2.0"
gem "responders", "2.3.0"
# Appserver
......@@ -13,13 +13,13 @@ gem "unicorn-worker-killer", "0.4.4"
# Federation
gem "diaspora_federation-rails", "0.1.4"
gem "diaspora_federation-rails", "0.1.5"
# API and JSON
gem "acts_as_api", "0.4.3"
gem "json", "1.8.3"
gem "json-schema", "2.6.2"
gem "json-schema", "2.7.0"
# Authentication
......@@ -33,16 +33,15 @@ gem "simple_captcha2", "0.4.0", require: "simple_captcha"
# Background processing
gem "sidekiq", "4.1.4"
gem "sinatra", "1.4.7"
gem "sidekiq", "4.2.2"
# Scheduled processing
gem "sidekiq-cron", "0.4.2"
gem "sidekiq-cron", "0.4.4"
# Compression
gem "uglifier", "3.0.1"
gem "uglifier", "3.0.2"
# Configuration
......@@ -57,7 +56,7 @@ gem "rack-cors", "0.4.0", require: "rack/cors"
gem "bootstrap-sass", "3.3.7"
gem "compass-rails", "2.0.5"
gem "sass-rails", "5.0.6"
gem "autoprefixer-rails", "6.4.0.2"
gem "autoprefixer-rails", "6.5.1"
gem "bootstrap-switch-rails", "3.3.3"
# Database
......@@ -66,7 +65,7 @@ group :mysql, optional: true do
gem "mysql2", "0.4.4"
end
group :postgresql, optional: true do
gem "pg", "0.18.4"
gem "pg", "0.19.0"
end
......@@ -77,7 +76,6 @@ gem "activerecord-import", "0.15.0"
gem "carrierwave", "0.11.2"
gem "fog", "1.38.0"
gem "mini_magick", "4.5.1"
gem "remotipart", "1.2.1"
# GUID generation
gem "uuid", "2.3.8"
......@@ -90,22 +88,22 @@ gem "entypo-rails", "3.0.0.pre.rc2"
gem "backbone-on-rails", "1.2.0.0"
gem "handlebars_assets", "0.23.1"
gem "jquery-rails", "4.1.1"
gem "jquery-rails", "4.2.1"
gem "jquery-ui-rails", "5.0.5"
gem "js_image_paths", "0.1.0"
gem "js-routes", "1.2.9"
source "https://rails-assets.org" do
gem "rails-assets-jquery", "2.2.1" # Should be kept in sync with jquery-rails
gem "rails-assets-jquery", "2.2.4" # Should be kept in sync with jquery-rails
gem "rails-assets-markdown-it", "7.0.0"
gem "rails-assets-markdown-it", "8.0.0"
gem "rails-assets-markdown-it-hashtag", "0.4.0"
gem "rails-assets-markdown-it-diaspora-mention", "1.0.0"
gem "rails-assets-markdown-it-sanitizer", "0.4.2"
gem "rails-assets-markdown-it-sanitizer", "0.4.3"
gem "rails-assets-markdown-it--markdown-it-for-inline", "0.1.1"
gem "rails-assets-markdown-it-sub", "1.0.0"
gem "rails-assets-markdown-it-sup", "1.0.0"
gem "rails-assets-highlightjs", "9.6.0"
gem "rails-assets-highlightjs", "9.7.0"
gem "rails-assets-bootstrap-markdown", "2.10.0"
# jQuery plugins
......@@ -132,12 +130,16 @@ gem "leaflet-rails", "0.7.7"
# Parsing
gem "nokogiri", "1.6.8"
gem "nokogiri", "1.6.8.1"
gem "redcarpet", "3.3.4"
gem "twitter-text", "1.14.0"
gem "ruby-oembed", "0.10.1"
gem "open_graph_reader", "0.6.1"
# Security Headers
gem "secure_headers", "3.5.0"
# Services
gem "omniauth", "1.3.1"
......@@ -155,8 +157,8 @@ gem "openid_connect", "0.12.0"
gem "active_model_serializers", "0.9.5"
# XMPP chat dependencies
gem "diaspora-prosody-config", "0.0.5"
gem "rails-assets-diaspora_jsxc", "0.1.5.develop.1", source: "https://rails-assets.org"
gem "diaspora-prosody-config", "0.0.7"
gem "rails-assets-diaspora_jsxc", "0.1.5.develop.7", source: "https://rails-assets.org"
# Tags
......@@ -164,7 +166,7 @@ gem "acts-as-taggable-on", "3.5.0"
# URIs and HTTP
gem "addressable", "2.3.8", require: "addressable/uri"
gem "addressable", "2.4.0", require: "addressable/uri"
gem "faraday", "0.9.2"
gem "faraday_middleware", "0.10.0"
gem "faraday-cookie_jar", "0.0.6"
......@@ -173,9 +175,9 @@ gem "typhoeus", "1.1.0"
# Views
gem "gon", "6.1.0"
gem "hamlit", "2.5.0"
gem "hamlit", "2.7.5"
gem "mobile-fu", "1.3.1"
gem "will_paginate", "3.1.0"
gem "will_paginate", "3.1.5"
gem "rails-timeago", "2.11.0"
# Logging
......@@ -212,10 +214,6 @@ group :production do # we don"t install these on travis to speed up test runs
gem "rack-google-analytics", "1.2.0"
gem "rack-piwik", "0.3.0", require: "rack/piwik"
# Click-jacking protection
gem "rack-protection", "1.5.3"
# Process management
gem "eye", "0.8.1"
......@@ -241,8 +239,8 @@ group :development do
# Linters
gem "rubocop", "0.40.0"
gem "haml_lint", "0.18.1"
gem "pronto", "0.7.0"
gem "haml_lint", "0.18.2"
gem "pronto", "0.7.1"
gem "pronto-eslint", "0.7.0"
gem "pronto-rubocop", "0.7.0"
gem "pronto-haml", "0.7.0"
......@@ -250,7 +248,7 @@ group :development do
# Preloading environment
gem "spring", "1.7.2"
gem "spring", "2.0.0"
gem "spring-commands-rspec", "1.0.4"
gem "spring-commands-cucumber", "1.0.1"
......@@ -268,14 +266,14 @@ group :test do
# RSpec (unit tests, some integration tests)
gem "fixture_builder", "0.4.1"
gem "fuubar", "2.1.1"
gem "fuubar", "2.2.0"
gem "test_after_commit", "1.1.0"
# Cucumber (integration tests)
gem "capybara", "2.7.1"
gem "capybara", "2.10.1"
gem "database_cleaner", "1.5.3"
gem "poltergeist", "1.10.0"
gem "poltergeist", "1.11.0"
gem "cucumber-api-steps", "0.13", require: false
gem "json_spec", "1.1.4"
......@@ -287,7 +285,7 @@ group :test do
gem "webmock", "2.1.0", require: false
gem "shoulda-matchers", "3.1.1"
gem "diaspora_federation-test", "0.1.4"
gem "diaspora_federation-test", "0.1.5"
# Coverage
gem 'coveralls', require: false
......@@ -295,13 +293,13 @@ end
group :development, :test do
# RSpec (unit tests, some integration tests)
gem "rspec-rails", "3.5.1"
gem "rspec-rails", "3.5.2"
# Cucumber (integration tests)
gem "cucumber-rails", "1.4.4", require: false
gem "cucumber-rails", "1.4.5", require: false
# Jasmine (client side application tests (JS))
gem "jasmine", "2.4.0"
gem "jasmine", "2.5.1"
gem "jasmine-jquery-rails", "2.0.3"
gem "rails-assets-jasmine-ajax", "3.2.0", source: "https://rails-assets.org"
gem "sinon-rails", "1.15.0"
......
This diff is collapsed.
......@@ -3,9 +3,9 @@
getTiles: function() {
// If the mapbox option is enabled in the diaspora.yml, the mapbox tiles with the podmin's credentials are used.
if (gon.appConfig.map.mapbox.enabled) {
return L.tileLayer("https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}", {
id: gon.appConfig.map.mapbox.id,
return L.tileLayer("https://api.mapbox.com/styles/v1/{style}/tiles/256/{z}/{x}/{y}?access_token={accessToken}", {
accessToken: gon.appConfig.map.mapbox.access_token,
style: gon.appConfig.map.mapbox.style,
attribution: "Map data &copy; <a href='http://openstreetmap.org'>OpenStreetMap</a> contributors, " +
"<a href='http://creativecommons.org/licenses/by-sa/2.0/''>CC-BY-SA</a>, " +
"Imagery © <a href='https://www.mapbox.com'>Mapbox</a>",
......
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function(){
app.helpers.openGraph = {
html : function (open_graph_cache) {
if (!open_graph_cache) { return ""; }
return '<img src="' + open_graph_cache.image + '" />';
},
};
})();
// @license-end
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
(function() {
app.helpers.Shortcuts = function(evtname, fn) {
var textAcceptingInputTypes = [
"color",
"date",
"datetime",
"datetime-local",
"email",
"month",
"number",
"password",
"range",
"search",
"select",
"text",
"textarea",
"time",
"url",
"week"
];
$("body").on(evtname, function(event) {
// make sure that the user is not typing in an input field
if (textAcceptingInputTypes.indexOf(event.target.type) === -1) {
fn(event);
}
});
};
})();
// @license-end
......@@ -67,6 +67,7 @@ app.models.Post.Interactions = Backbone.Model.extend({
var self = this;
this.likes.create({}, {
success: function() {
self.post.set({participation: true});
self.trigger("change");
self.set({"likes_count" : self.get("likes_count") + 1});
},
......@@ -94,6 +95,7 @@ app.models.Post.Interactions = Backbone.Model.extend({
this.comments.make(text).fail(function () {
app.flashMessages.error(Diaspora.I18n.t("failed_to_comment"));
}).done(function() {
self.post.set({participation: true});
self.trigger('change'); //updates after sync
});
......@@ -109,6 +111,7 @@ app.models.Post.Interactions = Backbone.Model.extend({
.done(function(reshare) {
app.flashMessages.success(Diaspora.I18n.t("reshares.successful"));
interactions.reshares.add(reshare);
interactions.post.set({participation: true});
if (app.stream && /^\/(?:stream|activity|aspects)/.test(app.stream.basePath())) {
app.stream.addNow(reshare);
}
......
......@@ -2,6 +2,7 @@
app.pages.AdminDashboard = Backbone.View.extend({
initialize: function() {
this.podVersionAlert = $("#pod-status .alert.pod-version");
this.updatePodStatus();
},
......@@ -38,15 +39,15 @@ app.pages.AdminDashboard = Backbone.View.extend({
},
updatePodStatusSuccess: function() {
$("#pod-status .alert").removeClass("alert-info");
this.podVersionAlert.removeClass("alert-info");
var podStatusMessage = Diaspora.I18n.t("admins.dashboard.up_to_date");
if(this.podUpToDate()) {
$("#pod-status .alert").addClass("alert-success");
this.podVersionAlert.addClass("alert-success");
} else {
podStatusMessage = Diaspora.I18n.t("admins.dashboard.outdated");
$("#pod-status .alert").addClass("alert-danger");
this.podVersionAlert.addClass("alert-danger");
}
$("#pod-status .alert")
this.podVersionAlert
.html("<strong>" + podStatusMessage + "</strong>")
.append(" ")
.append(Diaspora.I18n.t("admins.dashboard.compare_versions", {
......@@ -56,7 +57,7 @@ app.pages.AdminDashboard = Backbone.View.extend({
},
updatePodStatusFail: function() {
$("#pod-status .alert")
this.podVersionAlert
.removeClass("alert-info")
.addClass("alert-warning")
.text(Diaspora.I18n.t("admins.dashboard.error"));
......
......@@ -4,6 +4,16 @@ app.pages.Settings = Backbone.View.extend({
$(".settings-visibility").tooltip({placement: "top"});
$(".profile-visibility-hint").tooltip({placement: "top"});
$("[name='profile[public_details]']").bootstrapSwitch();
new Diaspora.TagsAutocomplete("#profile_tag_string", {
preFill: gon.preloads.tagsArray
});
new Diaspora.ProfilePhotoUploader();
this.viewAspectSelector = new app.views.PublisherAspectSelector({
el: $(".aspect_dropdown"),
form: $("#post-default-aspects")
});
}
});
// @license-end
......@@ -9,7 +9,7 @@ app.Router = Backbone.Router.extend({
"commented(/)": "stream",
"community_spotlight(/)": "spotlight",
"contacts(/)": "contacts",
"conversations(/)": "conversations",
"conversations(/)(:id)(/)": "conversations",
"followed_tags(/)": "followed_tags",
"getting_started(/)": "gettingStarted",
"help(/)": "help",
......@@ -93,8 +93,11 @@ app.Router = Backbone.Router.extend({
app.page = new app.pages.Contacts({stream: stream});
},
conversations: function() {
app.conversations = new app.views.Conversations();
conversations: function(id) {
app.conversations = app.conversations || new app.views.ConversationsInbox();
if (parseInt("" + id, 10)) {
app.conversations.renderConversation(id);
}
},
/* eslint-disable camelcase */
......@@ -110,10 +113,12 @@ app.Router = Backbone.Router.extend({
app.tagFollowings.reset(gon.preloads.tagFollowings);
if (name) {
var followedTagsAction = new app.views.TagFollowingAction(
if (app.currentUser.authenticated()) {
var followedTagsAction = new app.views.TagFollowingAction(
{tagText: decodeURIComponent(name).toLowerCase()}
);
$("#author_info").prepend(followedTagsAction.render().el);
);
$("#author_info").prepend(followedTagsAction.render().el);
}
app.tags = new app.views.Tags({hashtagName: name});
}
this._hideInactiveStreamLists();
......
......@@ -96,9 +96,7 @@ app.views.AspectMembership = app.views.Base.extend({
}
this.listenToOnce(this.person.contact.aspectMemberships, "sync", this._successSaveCb);
this.listenToOnce(this.person.contact.aspectMemberships, "error", function() {
this._displayError('aspect_dropdown.error');
});
this.listenToOnce(this.person.contact.aspectMemberships, "error", this._displayError);
return this.person.contact.aspectMemberships.create({"aspect_id": aspectId, "person_id": this._personId()});
},
......@@ -124,21 +122,17 @@ app.views.AspectMembership = app.views.Base.extend({
},
// show an error flash msg
_displayError: function(msg_id) {
_displayError: function(model, resp) {
this._done();
this.dropdown.closest('.aspect_membership_dropdown').removeClass('open'); // close the dropdown
var msg = Diaspora.I18n.t(msg_id, { 'name': this._name() });
app.flashMessages.error(msg);
this.dropdown.closest(".aspect_membership_dropdown").removeClass("open"); // close the dropdown
app.flashMessages.error(resp.responseText);
},
// remove the membership with the given id
removeMembership: function(membershipId) {
var membership = this.person.contact.aspectMemberships.get(membershipId);
this.listenToOnce(membership, "sync", this._successDestroyCb);
this.listenToOnce(membership, "error", function() {
this._displayError("aspect_dropdown.error_remove");
});
this.listenToOnce(membership, "error", this._displayError);
return membership.destroy();
},
......
......@@ -13,14 +13,14 @@ app.views.CommentStream = app.views.Base.extend({
"click .toggle_post_comments": "expandComments"
},
initialize: function(options) {
this.commentTemplate = options.commentTemplate;
initialize: function() {
this.CommentView = app.views.Comment;
this.setupBindings();
},
setupBindings: function() {
this.model.comments.bind('add', this.appendComment, this);
this.model.comments.bind("add", this.appendComment, this);
this.model.comments.bind("remove", this.removeComment, this);
},
postRenderTemplate : function() {
......@@ -83,15 +83,20 @@ app.views.CommentStream = app.views.Base.extend({
// on post ownership in the Comment view.
comment.set({parent : this.model.toJSON()});
var commentHtml = new app.views.Comment({model: comment}).render().el;
var commentHtml = new this.CommentView({model: comment}).render().el;
var commentBlocks = this.$(".comments div.comment.media");
this._moveInsertPoint(comment.get("created_at"), commentBlocks);
if (this._insertPoint === commentBlocks.length) {
if (this._insertPoint >= commentBlocks.length) {
this.$(".comments").append(commentHtml);
} else if (this._insertPoint <= 0) {
this.$(".comments").prepend(commentHtml);
} else {
commentBlocks.eq(this._insertPoint).before(commentHtml);
}
this._insertPoint++;
},
removeComment: function(comment) {
this.$("#" + comment.get("guid")).closest(".comment.media").remove();
},
commentTextareaFocused: function(){
......@@ -100,14 +105,10 @@ app.views.CommentStream = app.views.Base.extend({
expandComments: function(evt){
if(evt){ evt.preventDefault(); }
var self = this;
this.model.comments.fetch({
success : function(resp){
self.$("div.comment.show_comments").addClass("hidden");
self.model.trigger("commentsExpanded", self);
}
success: function() {
this.$("div.comment.show_comments").addClass("hidden");
}.bind(this)
});
}
});
......
......@@ -151,6 +151,10 @@ app.views.OEmbed = app.views.Base.extend({
app.views.OpenGraph = app.views.Base.extend({
templateName : "opengraph",
events: {
"click .video-overlay": "loadVideo"
},
initialize: function() {