diff --git a/app/assets/stylesheets/views/mod-center.scss b/app/assets/stylesheets/views/mod-center.scss
index 98f9af81a..2311dbcc1 100644
--- a/app/assets/stylesheets/views/mod-center.scss
+++ b/app/assets/stylesheets/views/mod-center.scss
@@ -7,7 +7,7 @@
.mod-index-header {
@media (min-width: $breakpoint-m) {
- padding: var(--su-2) 0 var(--su-6);
+ padding: var(--su-2) 0 var(--su-2);
}
}
@@ -133,17 +133,24 @@
.iframes-container {
display: flex;
- height: 650px;
+ height: 780px;
width: 100%;
+ background-color: var(--base-0);
+ max-height: calc(100vh - 180px);
.article-iframe {
width: 100%;
- height: 650px; // height is arbitrary, will be removed for modal-esque view
+ height: 780px; // height is arbitrary, will be removed for modal-esque view
+ max-height: calc(100vh - 180px);
+ border: 2px solid var(--base-40);
+ border-right: 0;
}
.actions-panel-iframe {
- width: 60%;
- height: 650px; // height is arbitrary, will be removed for modal-esque view
+ width: 40%;
+ height: 780px; // height is arbitrary, will be removed for modal-esque view
+ max-height: calc(100vh - 180px);
+ border: 2px solid var(--base-40);
}
}
}
diff --git a/app/controllers/moderations_controller.rb b/app/controllers/moderations_controller.rb
index f9b83d596..f3bbb950b 100644
--- a/app/controllers/moderations_controller.rb
+++ b/app/controllers/moderations_controller.rb
@@ -1,6 +1,9 @@
class ModerationsController < ApplicationController
after_action :verify_authorized
+ SCORE_MIN = -10
+ SCORE_MAX = 5
+
JSON_OPTIONS = {
only: %i[id title published_at cached_tag_list path],
include: {
@@ -12,9 +15,17 @@ class ModerationsController < ApplicationController
skip_authorization
return unless current_user&.trusted?
+ @feed = params[:state] == "latest" ? "latest" : "inbox"
articles = Article.published
.order(published_at: :desc).limit(70)
articles = articles.cached_tagged_with(params[:tag]) if params[:tag].present?
+ if @feed == "inbox"
+ articles = articles
+ .joins("LEFT OUTER JOIN reactions ON articles.id = reactions.reactable_id AND
+ reactions.reactable_type = 'Article' AND reactions.user_id = #{current_user.id}")
+ .where("articles.score >= ? AND articles.score <= ?", SCORE_MIN, SCORE_MAX)
+ .where(reactions: { id: nil })
+ end
if params[:state] == "new-authors"
articles = articles.where("nth_published_by_author > 0 AND nth_published_by_author < 4 AND published_at > ?",
7.days.ago)
diff --git a/app/views/moderations/actions_panel.html.erb b/app/views/moderations/actions_panel.html.erb
index 21aff8793..916a21f12 100644
--- a/app/views/moderations/actions_panel.html.erb
+++ b/app/views/moderations/actions_panel.html.erb
@@ -77,11 +77,13 @@
<%= t("views.moderations.actions.featured_past_day", count: recent_featured_count) %>
<% end %>
-
-
- <%= t("views.moderations.actions.how") %>
-
-
+ <% unless is_mod_center %>
+
+
+ <%= t("views.moderations.actions.how") %>
+
+
+ <% end %>
diff --git a/app/views/moderations/index.html.erb b/app/views/moderations/index.html.erb
index b0229657a..7117b2ee5 100644
--- a/app/views/moderations/index.html.erb
+++ b/app/views/moderations/index.html.erb
@@ -5,16 +5,22 @@
<% if current_user&.trusted? %>
-
+
<%= render "moderations/mod_sidebar_left" %>
-
+
+ <%= t("views.moderations.feed.#{@feed}_html") %>
+