about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-01-07 16:28:59 +0100
committerThibaut Girka <thib@sitedethib.com>2020-01-07 16:28:59 +0100
commit578553ba0583315751d0152344f6bdd3a1916dc9 (patch)
treea87710a720ba8acb921a0562e735e91353e84768 /app
parentbcfd6e3bb48f6e0eb88f7f3a650832842ab69166 (diff)
parent345dd93310a6ce830444f6f875204d30c43c5a1e (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/status/index.js2
-rw-r--r--app/views/filters/index.html.haml37
2 files changed, 23 insertions, 16 deletions
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js
index 6b18f34d1..c058120d6 100644
--- a/app/javascript/mastodon/features/status/index.js
+++ b/app/javascript/mastodon/features/status/index.js
@@ -542,6 +542,7 @@ class Status extends ImmutablePureComponent {
             <HotKeys handlers={handlers}>
               <div className={classNames('focusable', 'detailed-status__wrapper')} tabIndex='0' aria-label={textForScreenReader(intl, status, false)}>
                 <DetailedStatus
+                  key={`details-${status.get('id')}`}
                   status={status}
                   onOpenVideo={this.handleOpenVideo}
                   onOpenMedia={this.handleOpenMedia}
@@ -552,6 +553,7 @@ class Status extends ImmutablePureComponent {
                 />
 
                 <ActionBar
+                  key={`action-bar-${status.get('id')}`}
                   status={status}
                   onReply={this.handleReplyClick}
                   onFavourite={this.handleFavouriteClick}
diff --git a/app/views/filters/index.html.haml b/app/views/filters/index.html.haml
index 18ebee570..530ea6f59 100644
--- a/app/views/filters/index.html.haml
+++ b/app/views/filters/index.html.haml
@@ -1,20 +1,25 @@
 - content_for :page_title do
   = t('filters.index.title')
 
-.table-wrapper
-  %table.table
-    %thead
-      %tr
-        %th= t('simple_form.labels.defaults.phrase')
-        %th= t('simple_form.labels.defaults.context')
-        %th
-    %tbody
-      - @filters.each do |filter|
-        %tr
-          %td= filter.phrase
-          %td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
-          %td
-            = table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
-            = table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete
+- content_for :page_heading_actions do
+  = link_to t('filters.new.title'), new_filter_path, class: 'button'
 
-= link_to t('filters.new.title'), new_filter_path, class: 'button'
+- if @filters.count == 0
+  %div{ style: 'display: flex; justify-content: center' }
+    %div.muted-hint= t 'filters.index.empty'
+- else
+  .table-wrapper
+    %table.table
+      %thead
+        %tr
+          %th= t('simple_form.labels.defaults.phrase')
+          %th= t('simple_form.labels.defaults.context')
+          %th
+      %tbody
+        - @filters.each do |filter|
+          %tr
+            %td= filter.phrase
+            %td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
+            %td
+              = table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
+              = table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete