diff options
Diffstat (limited to 'app/views/home')
-rw-r--r-- | app/views/home/index.html.haml | 1 | ||||
-rw-r--r-- | app/views/home/initial_state.json.rabl | 14 |
2 files changed, 8 insertions, 7 deletions
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 0147f4064..9e3b94463 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,5 +1,6 @@ - content_for :header_tags do :javascript + window.STREAMING_API_BASE_URL = '#{Rails.configuration.x.streaming_api_base_url}'; window.INITIAL_STATE = #{json_escape(render(file: 'home/initial_state', formats: :json))} = javascript_include_tag 'application' diff --git a/app/views/home/initial_state.json.rabl b/app/views/home/initial_state.json.rabl index 0e9736f5f..71949ab0e 100644 --- a/app/views/home/initial_state.json.rabl +++ b/app/views/home/initial_state.json.rabl @@ -1,24 +1,24 @@ object false -node(:meta) { +node(:meta) do { access_token: @token, locale: I18n.locale, me: current_account.id, } -} +end -node(:compose) { +node(:compose) do { me: current_account.id, - private: current_account.locked?, + default_privacy: current_account.user.setting_default_privacy, } -} +end -node(:accounts) { +node(:accounts) do { current_account.id => partial('api/v1/accounts/show', object: current_account), } -} +end node(:settings) { @web_settings } |