diff options
Diffstat (limited to 'web/templates')
-rw-r--r-- | web/templates/channel.html | 2 | ||||
-rw-r--r-- | web/templates/head.html | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/web/templates/channel.html b/web/templates/channel.html index dcc50115b..94d79a022 100644 --- a/web/templates/channel.html +++ b/web/templates/channel.html @@ -6,7 +6,7 @@ <body> <div id="channel_view" class='channel-view'></div> <script> -window.setup_channel_page({{ .Props }}, {{ .Team }}, {{ .Channel }}, {{ .User }}); + window.setup_channel_page({{ .Props }}, {{ .Team }}, {{ .Channel }}); $('body').tooltip( {selector: '[data-toggle=tooltip]'} ); var modals = $('.modal-body').not('.edit-modal-body'); if($(window).height() > 1200){ diff --git a/web/templates/head.html b/web/templates/head.html index 32bf337bc..14b447325 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -62,14 +62,11 @@ <style id="antiClickjack">body{display:none !important;}</style> <script> - // if ('ReactIntl' in window && 'ReactIntlLocaleData' in window) { - // Object.keys(ReactIntlLocaleData).forEach((lang) => { - // ReactIntl.addLocaleData(ReactIntlLocaleData[lang]); - // }); - // } - - ReactIntl.addLocaleData(ReactIntlLocaleData.en); - ReactIntl.addLocaleData(ReactIntlLocaleData.es); + if ('ReactIntl' in window && 'ReactIntlLocaleData' in window) { + Object.keys(ReactIntlLocaleData).forEach(function(lang) { + ReactIntl.addLocaleData(ReactIntlLocaleData[lang]); + }); + } window.mm_config = {{ .ClientCfg }}; window.mm_license = {{ .ClientLicense }}; @@ -77,6 +74,11 @@ window.mm_user = {{ .User }}; window.mm_channel = {{ .Channel }}; window.mm_locale = {{ .Locale }}; + window.mm_preferences = {{ .Preferences }}; + + $(function() { + PreferenceStore.setPreferences(window.mm_preferences); + }); if ({{.SessionTokenIndex}} >= 0) { window.mm_session_token_index = {{.SessionTokenIndex}}; |