Skip to content

Commit

Permalink
Merge branch 'release/0.6.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 committed Jul 12, 2017
2 parents 7aadadc + 0e8bb71 commit 8bed8a8
Show file tree
Hide file tree
Showing 174 changed files with 932 additions and 1,017 deletions.
10 changes: 0 additions & 10 deletions .rubocop.yml
Expand Up @@ -164,16 +164,6 @@ Lint/Debugger:
Style/NumericPredicate:
EnforcedStyle: comparison

# Old defaults from rubocop < 0.48.1
Style/PercentLiteralDelimiters:
PreferredDelimiters:
default: '()'
'%i': '()'
'%I': '()'
'%r': '{}'
'%w': '()'
'%W': '()'

# Reset some HoundCI changes back to Rubocop defaults
Style/DotPosition:
EnforcedStyle: leading
Expand Down
12 changes: 11 additions & 1 deletion Changelog.md
@@ -1,3 +1,14 @@
# 0.6.7.0

## Refactor
* Cleanup some translations [#7465](https://github.com/diaspora/diaspora/pull/7465)

## Features
* Change email without confirmation when mail is disabled [#7455](https://github.com/diaspora/diaspora/pull/7455)
* Warn users if they leave the profile editing page with unsaved changes [#7473](https://github.com/diaspora/diaspora/pull/7473)
* Add admin pages to the mobile interface [#7295](https://github.com/diaspora/diaspora/pull/7295)
* Add links to discourse to footer and sidebar [#7446](https://github.com/diaspora/diaspora/pull/7446)

# 0.6.6.0

## Refactor
Expand All @@ -12,7 +23,6 @@
* Fix welcome message when podmin is set to an invalid username [#7452](https://github.com/diaspora/diaspora/pull/7452)

## Features

* Add support for Nodeinfo 2.0 [#7447](https://github.com/diaspora/diaspora/pull/7447)

# 0.6.5.0
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -112,6 +112,7 @@ source "https://rails-assets.org" do

gem "rails-assets-autosize", "3.0.20"
gem "rails-assets-blueimp-gallery", "2.25.0"
gem "rails-assets-jquery.are-you-sure", "1.9.0"
gem "rails-assets-jquery-placeholder", "2.3.1"
gem "rails-assets-jquery-textchange", "0.2.3"
gem "rails-assets-perfect-scrollbar", "0.6.16"
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Expand Up @@ -529,6 +529,8 @@ GEM
rails-assets-jquery (>= 1.6)
rails-assets-jquery-textchange (0.2.3)
rails-assets-jquery
rails-assets-jquery.are-you-sure (1.9.0)
rails-assets-jquery (>= 1.4.2)
rails-assets-jquery.slimscroll (1.3.8)
rails-assets-jquery.ui (1.11.4)
rails-assets-jquery (>= 1.6)
Expand Down Expand Up @@ -847,6 +849,7 @@ DEPENDENCIES
rails-assets-jquery (= 2.2.4)!
rails-assets-jquery-placeholder (= 2.3.1)!
rails-assets-jquery-textchange (= 0.2.3)!
rails-assets-jquery.are-you-sure (= 1.9.0)!
rails-assets-markdown-it (= 8.3.0)!
rails-assets-markdown-it--markdown-it-for-inline (= 0.1.1)!
rails-assets-markdown-it-diaspora-mention (= 1.1.1)!
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/app/pages/settings.js
Expand Up @@ -14,6 +14,7 @@ app.pages.Settings = Backbone.View.extend({
el: $(".aspect_dropdown"),
form: $("#post-default-aspects")
});
$("#update_profile_form").areYouSure();
}
});
// @license-end
5 changes: 3 additions & 2 deletions app/assets/javascripts/main.js
Expand Up @@ -41,5 +41,6 @@
//= require blueimp-gallery/blueimp-gallery-indicator
//= require leaflet
//= require api/authorization_page
// = require bootstrap-markdown/bootstrap-markdown
// = require helpers/markdown_editor
//= require bootstrap-markdown/bootstrap-markdown
//= require helpers/markdown_editor
//= require jquery.are-you-sure
14 changes: 4 additions & 10 deletions app/assets/javascripts/mobile/mobile_drawer.js
@@ -1,17 +1,11 @@
(function(){
(function() {
Diaspora.Mobile.Drawer = {
initialize: function(){
$("#all_aspects").bind("tap click", function(evt){
evt.preventDefault();
$(this).find("+ li").toggleClass("hide");
});

$("#menu-badge").bind("tap click", function(evt){
initialize: function() {
$("#menu-badge").bind("tap click", function(evt) {
evt.preventDefault();
$("#app").toggleClass("draw");
});

$("#followed_tags").bind("tap click", function(evt){
$("#all_aspects, #followed_tags, #admin").bind("tap click", function(evt) {
evt.preventDefault();
$(this).find("+ li").toggleClass("hide");
});
Expand Down
52 changes: 44 additions & 8 deletions app/assets/stylesheets/admin.scss
Expand Up @@ -2,9 +2,9 @@
@import 'bootstrap-variables';
@import 'animations';

/** ADMIN STYlES **/
/** user search **/
// ADMIN STYlES

// user search
.users {
li.user {
border-bottom: 1px solid $light-grey;
Expand All @@ -16,28 +16,64 @@
.avatar {
width: 50px;
height: 50px;
max-width: none;
}

.actions{ width: 150px; }

.pull-right .label{ display: inline-block; }
}
}

/** Invites panel **/
// Invites panel
.more_invites{
#add-invites-section{
line-height: 34px;
margin-bottom: 15px;
}
}

/** reported posts **/
.invite-emails {
margin-bottom: 10px;
}

@import 'report';
// Weekly stats
.week-selector {
margin-top: 10px;
}

/** pod list **/
// Pod stats
.segment-selection {
select,
[type=submit] {
margin-top: 10px;
}
}

.percent-change {
&.increase {
color: $increase;
}

&.decrease {
color: $decrease;
}
}

// reported posts
.reports {
.reason-label {
font-weight: bold;
}

.content {
padding-bottom: 20px;
}

.panel-body .btn-info {
margin-right: 5px;
}
}

// pod list
#pod-list {
.pod-title {
max-width: 200px;
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/color-variables.scss
Expand Up @@ -32,3 +32,6 @@ $left-navbar-drawer-background: darken($white, 6%) !default;
$hovercard-background: $white !default;

$card-shadow: 0 1px 2px 0 rgba(0, 0, 0, .16), 0 2px 10px 0 rgba(0, 0, 0, .12) !default;

$increase: #008000;
$decrease: #fe0000;
10 changes: 5 additions & 5 deletions app/assets/stylesheets/footer.scss
Expand Up @@ -5,6 +5,11 @@ html {

body { margin-bottom: 150px; }

.powered-by-diaspora a {
color: $link-grey;
font-weight: bold;
}

footer.footer {
background-color: $background-grey;
border-top: 1px solid $border-grey;
Expand All @@ -15,11 +20,6 @@ footer.footer {
position: absolute;
width: 100%;

.powered-by-diaspora {
color: $link-grey;
font-weight: bold;
}

ul#footer_nav {
margin: 0;
padding: 0;
Expand Down
6 changes: 6 additions & 0 deletions app/assets/stylesheets/mobile/mobile.scss
Expand Up @@ -885,3 +885,9 @@ select#aspect_ids_ {
.form-control:active, .form-control:focus { border-color: #999999; }

.tag_following_action { margin: 5px 0 10px 0; }

// --- Admin pages ---
.pod-version {
// The fetching of the pod version is not done on mobile currently so we hide this alert.
display: none;
}
5 changes: 3 additions & 2 deletions app/assets/stylesheets/navbar_left.scss
Expand Up @@ -114,13 +114,15 @@
padding: 10px 20px 0;

.excellence-box,
.info-links {
.info-links,
.powered-box {
border-top: 1px solid $border-grey;
padding: 5px;
}

.excellence-box {
margin-top: 10px;
text-align: center;

.content {
font-size: $font-size-base;
Expand Down Expand Up @@ -175,7 +177,6 @@

ul {
list-style: none;
margin-bottom: 5px;
padding-left: 0;
}

Expand Down
12 changes: 0 additions & 12 deletions app/assets/stylesheets/report.scss

This file was deleted.

3 changes: 2 additions & 1 deletion app/controllers/admin/pods_controller.rb
@@ -1,7 +1,7 @@

module Admin
class PodsController < AdminController
respond_to :html, :json
respond_to :html, :json, :mobile

def index
pods_json = PodPresenter.as_collection(Pod.all)
Expand All @@ -15,6 +15,7 @@ def index

render "admins/pods"
end
format.mobile { render "admins/pods" }
format.json { render json: pods_json }
end
end
Expand Down
20 changes: 14 additions & 6 deletions app/controllers/users_controller.rb
Expand Up @@ -220,15 +220,23 @@ def change_language(user_data)
end

def change_email(user_data)
@user.unconfirmed_email = user_data[:email]
if @user.save
@user.send_confirm_email
if @user.unconfirmed_email
if AppConfig.mail.enable?
@user.unconfirmed_email = user_data[:email]
if @user.save
@user.send_confirm_email
flash.now[:notice] = t("users.update.unconfirmed_email_changed")
else
@user.reload # match user object with the database
flash.now[:error] = t("users.update.unconfirmed_email_not_changed")
end
else
@user.reload # match user object with the database
flash.now[:error] = t("users.update.unconfirmed_email_not_changed")
@user.email = user_data[:email]
if @user.save
flash.now[:notice] = t("users.update.settings_updated")
else
@user.reload
flash.now[:error] = t("users.update.unconfirmed_email_not_changed")
end
end
end

Expand Down
7 changes: 1 addition & 6 deletions app/views/admins/_admin_bar.haml
@@ -1,9 +1,5 @@
- content_for :head do
= stylesheet_link_tag :admin

%h2= t(".pages")

%ul#admin_nav.nav.nav-pills.nav-stacked
%ul.nav.nav-pills.nav-stacked#admin-nav
%li{role: "presentation", class: current_page?(admin_dashboard_path) && "active"}
= link_to t(".dashboard"), admin_dashboard_path
%li{role: "presentation", class: current_page?(user_search_path) && "active"}
Expand All @@ -22,4 +18,3 @@
= link_to t(".pod_network"), admin_pods_path
%li{role: "presentation", class: current_page?(sidekiq_path) && "active"}
= link_to t(".sidekiq_monitor"), sidekiq_path

11 changes: 11 additions & 0 deletions app/views/admins/_dashboard.haml
@@ -0,0 +1,11 @@
#pod-status
%h2
= t(".pod_status")
.alert.alert-info.pod-version{role: "alert"}
= t(".fetching_diaspora_version")
- if unreviewed_reports_count > 0
.alert.alert-warning.reports-warning{role: "alert"}
= t("report.unreviewed_reports", count: unreviewed_reports_count)
- else
%p
= t("report.unreviewed_reports", count: 0)
52 changes: 52 additions & 0 deletions app/views/admins/_stats.haml
@@ -0,0 +1,52 @@
- content_for :head do
= stylesheet_link_tag :admin

.container-fluid
.row
.col-sm-9
%h1= t(".usage_statistic")
.col-sm-3
= form_tag("/admins/stats", method: "get", class: "row form-inline segment-selection") do
.col-sm-8
%select.form-control{name: "range"}
- %w(daily week 2weeks month).each do |range|
%option{value: range, selected: ("selected" if params[:range] == range)}
= t(".#{range}")
.col-sm-4
= submit_tag t(".go"), class: "btn btn-primary btn-block"

.row
.col-xs-12
%h4
!= t("admins.stats.display_results", segment: content_tag(:strong, segment))

.row
- %i(posts comments aspect_memberships users).each do |name|
:ruby
model = instance_variable_get("@#{name}")
count = model[:yesterday]
label_with_count = name == :aspect_memberships ? t(".shares", count: count) : t(".#{name}", count: count)

.col-md-3
%h2{style: "font-weight:bold;"}
= label_with_count
%h4
= model[:day_before]
%span.percent-change{class: (model[:change] > 0 ? "increase" : "decrease")}
= "(#{model[:change]}%)"

.row
%p.col-md-12.alert.alert-info.text-center{role: "alert"}
!= t("admins.stats.current_segment",
post_yest: content_tag(:strong, posts[:yesterday] / user_count),
post_day: content_tag(:strong, posts[:day_before] / user_count))

.row
.col-md-12
%h3= t(".50_most")
%ul
- @popular_tags.each do |name, count|
%li
!= t("admins.stats.tag_name",
name_tag: content_tag(:strong, name),
count_tag: content_tag(:strong, count))

0 comments on commit 8bed8a8

Please sign in to comment.