diff options
Diffstat (limited to 'app/views/home')
-rw-r--r-- | app/views/home/index.html.haml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 498fae105..b4e935041 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,4 +1,22 @@ - content_for :header_tags do + :javascript + window.INITIAL_STATE = { + "meta": { + "access_token": "#{@token}", + "locale": "#{I18n.locale}", + "me": #{current_account.id} + }, + + "compose": { + "me": #{current_account.id}, + "private": #{current_account.locked?} + }, + + "accounts": { + #{current_account.id}: #{render(file: 'api/v1/accounts/show', locals: { account: current_user.account }, formats: :json)} + } + }; + = javascript_include_tag 'application' = react_component 'Mastodon', default_props, class: 'app-holder', prerender: false |