mirror of https://github.com/Siphonay/mastodon
Let the front-end know the current account is a moderator
This commit is contained in:
parent
b3fdd166e8
commit
6ad7dac791
|
@ -21,5 +21,6 @@ export const deleteModal = getMeta('delete_modal');
|
||||||
export const me = getMeta('me');
|
export const me = getMeta('me');
|
||||||
export const searchEnabled = getMeta('search_enabled');
|
export const searchEnabled = getMeta('search_enabled');
|
||||||
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
|
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
|
||||||
|
export const isStaff = getMeta('is_staff');
|
||||||
|
|
||||||
export default initialState;
|
export default initialState;
|
||||||
|
|
|
@ -32,6 +32,7 @@ class InitialStateSerializer < ActiveModel::Serializer
|
||||||
store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif
|
store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif
|
||||||
store[:display_sensitive_media] = object.current_account.user.setting_display_sensitive_media
|
store[:display_sensitive_media] = object.current_account.user.setting_display_sensitive_media
|
||||||
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
|
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
|
||||||
|
store[:is_staff] = object.current_account.user.staff?
|
||||||
end
|
end
|
||||||
|
|
||||||
store
|
store
|
||||||
|
|
Loading…
Reference in New Issue