Add bookmarks (#7107)

* Add backend support for bookmarks

Bookmarks behave like favourites, except they aren't shared with other
users and do not have an associated counter.

* Add spec for bookmark endpoints

* Add front-end support for bookmarks

* Introduce OAuth scopes for bookmarks

* Add bookmarks to archive takeout

* Fix migration

* Coding style fixes

* Fix rebase issue

* Update bookmarked_statuses to latest UI changes

* Update bookmark actions to properly reflect status changes in state

* Add bookmarks item to single-column layout

* Make active bookmarks red
This commit is contained in:
ThibG 2019-11-13 23:02:10 +01:00 committed by Eugen Rochko
parent afb398b583
commit dfea7368c9
33 changed files with 712 additions and 1 deletions

View file

@ -58,6 +58,7 @@ Doorkeeper.configure do
optional_scopes :write,
:'write:accounts',
:'write:blocks',
:'write:bookmarks',
:'write:conversations',
:'write:favourites',
:'write:filters',
@ -71,6 +72,7 @@ Doorkeeper.configure do
:read,
:'read:accounts',
:'read:blocks',
:'read:bookmarks',
:'read:favourites',
:'read:filters',
:'read:follows',

View file

@ -125,6 +125,7 @@ en:
read: read all your account's data
read:accounts: see accounts information
read:blocks: see your blocks
read:bookmarks: see your bookmarks
read:favourites: see your favourites
read:filters: see your filters
read:follows: see your follows
@ -137,6 +138,7 @@ en:
write: modify all your account's data
write:accounts: modify your profile
write:blocks: block accounts and domains
write:bookmarks: bookmark statuses
write:favourites: favourite statuses
write:filters: create filters
write:follows: follow people

View file

@ -289,6 +289,9 @@ Rails.application.routes.draw do
resource :favourite, only: :create
post :unfavourite, to: 'favourites#destroy'
resource :bookmark, only: :create
post :unbookmark, to: 'bookmarks#destroy'
resource :mute, only: :create
post :unmute, to: 'mutes#destroy'
@ -324,6 +327,7 @@ Rails.application.routes.draw do
resources :blocks, only: [:index]
resources :mutes, only: [:index]
resources :favourites, only: [:index]
resources :bookmarks, only: [:index]
resources :reports, only: [:create]
resources :trends, only: [:index]
resources :filters, only: [:index, :create, :show, :update, :destroy]