about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-08-25 01:41:18 +0200
committerGitHub <noreply@github.com>2017-08-25 01:41:18 +0200
commit9caa90025fd9f1ef46a74f31cefd19335e291e76 (patch)
tree51d91a2c713bcddc9d21cd63836db3ae4bc3d226 /config
parentc5157ef07bbae5c3a307d6a005aef0f1c0452af3 (diff)
Pinned statuses (#4675)
* Pinned statuses

* yarn manage:translations
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml5
-rw-r--r--config/routes.rb13
2 files changed, 14 insertions, 4 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 97bb14186..96d08e6b2 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -434,6 +434,10 @@ en:
   statuses:
     open_in_web: Open in web
     over_character_limit: character limit of %{max} exceeded
+    pin_errors:
+      ownership: Someone else's toot cannot be pinned
+      private: Non-public toot cannot be pinned
+      reblog: A boost cannot be pinned
     show_more: Show more
     visibilities:
       private: Followers-only
@@ -444,6 +448,7 @@ en:
       unlisted_long: Everyone can see, but not listed on public timelines
   stream_entries:
     click_to_show: Click to show
+    pinned: Pinned toot
     reblogged: boosted
     sensitive_content: Sensitive content
   terms:
diff --git a/config/routes.rb b/config/routes.rb
index 94a4ac88e..7588805c0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -162,6 +162,9 @@ Rails.application.routes.draw do
 
           resource :mute, only: :create
           post :unmute, to: 'mutes#destroy'
+
+          resource :pin, only: :create
+          post :unpin, to: 'pins#destroy'
         end
 
         member do
@@ -175,7 +178,8 @@ Rails.application.routes.draw do
         resource :public, only: :show, controller: :public
         resources :tag, only: :show
       end
-      resources :streaming,  only: [:index]
+
+      resources :streaming, only: [:index]
 
       get '/search', to: 'search#index', as: :search
 
@@ -210,6 +214,7 @@ Rails.application.routes.draw do
         resource :search, only: :show, controller: :search
         resources :relationships, only: :index
       end
+
       resources :accounts, only: [:show] do
         resources :statuses, only: :index, controller: 'accounts/statuses'
         resources :followers, only: :index, controller: 'accounts/follower_accounts'
@@ -245,7 +250,7 @@ Rails.application.routes.draw do
   root 'home#index'
 
   match '*unmatched_route',
-    via: :all,
-    to: 'application#raise_not_found',
-    format: false
+        via: :all,
+        to: 'application#raise_not_found',
+        format: false
 end