initial_state.json.rabl 868 B

123456789101112131415161718192021222324252627282930313233343536
  1. object false
  2. node(:meta) do
  3. {
  4. streaming_api_base_url: @streaming_api_base_url,
  5. access_token: @token,
  6. locale: I18n.locale,
  7. domain: site_hostname,
  8. me: current_account.id,
  9. admin: @admin.try(:id),
  10. boost_modal: current_account.user.setting_boost_modal,
  11. auto_play_gif: current_account.user.setting_auto_play_gif,
  12. }
  13. end
  14. node(:compose) do
  15. {
  16. me: current_account.id,
  17. default_privacy: current_account.user.setting_default_privacy,
  18. }
  19. end
  20. node(:accounts) do
  21. store = {}
  22. store[current_account.id] = partial('api/v1/accounts/show', object: current_account)
  23. store[@admin.id] = partial('api/v1/accounts/show', object: @admin) unless @admin.nil?
  24. store
  25. end
  26. node(:media_attachments) do
  27. {
  28. accept_content_types: MediaAttachment::IMAGE_MIME_TYPES + MediaAttachment::VIDEO_MIME_TYPES
  29. }
  30. end
  31. node(:settings) { @web_settings }