diff options
Diffstat (limited to 'web')
35 files changed, 83 insertions, 22 deletions
diff --git a/web/react/components/channel_info_modal.jsx b/web/react/components/channel_info_modal.jsx index 18e125de3..72c7c3daa 100644 --- a/web/react/components/channel_info_modal.jsx +++ b/web/react/components/channel_info_modal.jsx @@ -1,6 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import * as Utils from '../utils/utils.jsx'; const Modal = ReactBootstrap.Modal; export default class ChannelInfoModal extends React.Component { @@ -10,10 +11,13 @@ export default class ChannelInfoModal extends React.Component { channel = { display_name: 'No Channel Found', name: 'No Channel Found', + purpose: 'No Channel Found', id: 'No Channel Found' }; } + const channelURL = Utils.getShortenedTeamURL() + channel.name; + return ( <Modal show={this.props.show} @@ -28,13 +32,17 @@ export default class ChannelInfoModal extends React.Component { <div className='col-sm-9'>{channel.display_name}</div> </div> <div className='row form-group'> - <div className='col-sm-3 info__label'>{'Channel Handle:'}</div> - <div className='col-sm-9'>{channel.name}</div> + <div className='col-sm-3 info__label'>{'Channel URL:'}</div> + <div className='col-sm-9'>{channelURL}</div> </div> <div className='row'> <div className='col-sm-3 info__label'>{'Channel ID:'}</div> <div className='col-sm-9'>{channel.id}</div> </div> + <div className='row'> + <div className='col-sm-3 info__label'>{'Channel Purpose:'}</div> + <div className='col-sm-9'>{channel.purpose}</div> + </div> </Modal.Body> <Modal.Footer> <button diff --git a/web/react/components/rhs_thread.jsx b/web/react/components/rhs_thread.jsx index 2edcd8b37..945b09e37 100644 --- a/web/react/components/rhs_thread.jsx +++ b/web/react/components/rhs_thread.jsx @@ -17,6 +17,8 @@ export default class RhsThread extends React.Component { constructor(props) { super(props); + this.mounted = false; + this.onChange = this.onChange.bind(this); this.onChangeAll = this.onChangeAll.bind(this); this.forceUpdateInfo = this.forceUpdateInfo.bind(this); @@ -50,8 +52,11 @@ export default class RhsThread extends React.Component { PostStore.addSelectedPostChangeListener(this.onChange); PostStore.addChangeListener(this.onChangeAll); PreferenceStore.addChangeListener(this.forceUpdateInfo); + this.resize(); window.addEventListener('resize', this.handleResize); + + this.mounted = true; } componentDidUpdate() { if ($('.post-right__scroll')[0]) { @@ -63,7 +68,10 @@ export default class RhsThread extends React.Component { PostStore.removeSelectedPostChangeListener(this.onChange); PostStore.removeChangeListener(this.onChangeAll); PreferenceStore.removeChangeListener(this.forceUpdateInfo); + window.removeEventListener('resize', this.handleResize); + + this.mounted = false; } forceUpdateInfo() { if (this.state.postList) { @@ -82,7 +90,7 @@ export default class RhsThread extends React.Component { } onChange() { var newState = this.getStateFromStores(); - if (!Utils.areObjectsEqual(newState, this.state)) { + if (this.mounted && !Utils.areObjectsEqual(newState, this.state)) { this.setState(newState); } } @@ -120,7 +128,7 @@ export default class RhsThread extends React.Component { } var newState = this.getStateFromStores(); - if (!Utils.areObjectsEqual(newState, this.state)) { + if (this.mounted && !Utils.areObjectsEqual(newState, this.state)) { this.setState(newState); } } diff --git a/web/react/components/user_settings/user_settings_security.jsx b/web/react/components/user_settings/user_settings_security.jsx index d9c5f58a9..d1266dd3f 100644 --- a/web/react/components/user_settings/user_settings_security.jsx +++ b/web/react/components/user_settings/user_settings_security.jsx @@ -206,7 +206,7 @@ export default class SecurityTab extends React.Component { <div> <a className='btn btn-primary' - href={'/' + teamName + '/claim?email=' + user.email} + href={'/' + teamName + '/claim?email=' + encodeURIComponent(user.email)} > {'Switch to using email and password'} </a> @@ -221,7 +221,7 @@ export default class SecurityTab extends React.Component { <div> <a className='btn btn-primary' - href={'/' + teamName + '/claim?email=' + user.email + '&new_type=' + Constants.GITLAB_SERVICE} + href={'/' + teamName + '/claim?email=' + encodeURIComponent(user.email) + '&new_type=' + Constants.GITLAB_SERVICE} > {'Switch to using GitLab SSO'} </a> @@ -236,7 +236,7 @@ export default class SecurityTab extends React.Component { <div> <a className='btn btn-primary' - href={'/' + teamName + '/claim?email=' + user.email + '&new_type=' + Constants.GOOGLE_SERVICE} + href={'/' + teamName + '/claim?email=' + encodeURIComponent(user.email) + '&new_type=' + Constants.GOOGLE_SERVICE} > {'Switch to using Google SSO'} </a> diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 24042321f..db469952b 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1309,6 +1309,10 @@ export function fillArray(value, length) { // Checks if a data transfer contains files not text, folders, etc.. // Slightly modified from http://stackoverflow.com/questions/6848043/how-do-i-detect-a-file-is-being-dragged-rather-than-a-draggable-element-on-my-pa export function isFileTransfer(files) { + if (isBrowserIE()) { + return files.types != null && files.types.contains('Files'); + } + return files.types != null && (files.types.indexOf ? files.types.indexOf('Files') !== -1 : files.types.contains('application/x-moz-file')); } diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index 7b7c2d73a..c5cd10b20 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -183,6 +183,7 @@ body.ios { position: absolute; top: 50%; left: 50%; + pointer-events: none; } .overlay__files { diff --git a/web/sass-files/sass/partials/_sidebar--left.scss b/web/sass-files/sass/partials/_sidebar--left.scss index 6f969ed47..5e7f04724 100644 --- a/web/sass-files/sass/partials/_sidebar--left.scss +++ b/web/sass-files/sass/partials/_sidebar--left.scss @@ -42,6 +42,9 @@ margin-right: 6px; width: 12px; display: inline-block; + svg { + max-height: 14px; + } i, path, ellipse { @include opacity(0.5); &.online--icon, &.away--icon { diff --git a/web/static/config/manifest.json b/web/static/config/manifest.json index 8f29460b3..dd95d917e 100644 --- a/web/static/config/manifest.json +++ b/web/static/config/manifest.json @@ -1,13 +1,40 @@ { - "name": "Mattermost", - "icons": [ - { - "src": "../static/iamges/icon50x50.png", - "sizes": "50x50", - "type": "image/png" - } - ], - "start_url": "/", - "display": "standalone", - "orientation": "portrait" + "name": "Mattermost", + "icons": [{ + "src": "/static/images/favicon/android-chrome-36x36.png", + "type": "image/png", + "sizes": "36x36" + }, { + "src": "/static/images/favicon/android-chrome-48x48.png", + "type": "image/png", + "sizes": "48x48" + }, { + "src": "/static/images/favicon/android-chrome-72x72.png", + "type": "image/png", + "sizes": "72x72" + }, { + "src": "/static/images/favicon/android-chrome-96x96.png", + "type": "image/png", + "sizes": "96x96" + }, { + "src": "/static/images/favicon/android-chrome-144x144.png", + "type": "image/png", + "sizes": "144x144" + }, { + "src": "/static/images/favicon/android-chrome-192x192.png", + "type": "image/png", + "sizes": "192x192" + }, { + "src": "/static/images/favicon/android-chrome-256x256.png", + "type": "image/png", + "sizes": "256x256" + }, { + "src": "/static/images/favicon/android-chrome-384x384.png", + "type": "image/png", + "sizes": "384x384" + }, { + "src": "/static/images/favicon/android-chrome-512x512.png", + "type": "image/png", + "sizes": "512x512" + }] }
\ No newline at end of file diff --git a/web/static/images/favicon/android-chrome-144x144.png b/web/static/images/favicon/android-chrome-144x144.png Binary files differnew file mode 100644 index 000000000..b4cb16a20 --- /dev/null +++ b/web/static/images/favicon/android-chrome-144x144.png diff --git a/web/static/images/favicon/android-chrome-192x192.png b/web/static/images/favicon/android-chrome-192x192.png Binary files differnew file mode 100644 index 000000000..43b64dee2 --- /dev/null +++ b/web/static/images/favicon/android-chrome-192x192.png diff --git a/web/static/images/favicon/android-chrome-256x256.png b/web/static/images/favicon/android-chrome-256x256.png Binary files differnew file mode 100644 index 000000000..17d568314 --- /dev/null +++ b/web/static/images/favicon/android-chrome-256x256.png diff --git a/web/static/images/favicon/android-chrome-36x36.png b/web/static/images/favicon/android-chrome-36x36.png Binary files differnew file mode 100644 index 000000000..a46f34b26 --- /dev/null +++ b/web/static/images/favicon/android-chrome-36x36.png diff --git a/web/static/images/favicon/android-chrome-384x384.png b/web/static/images/favicon/android-chrome-384x384.png Binary files differnew file mode 100644 index 000000000..6a3fde9d3 --- /dev/null +++ b/web/static/images/favicon/android-chrome-384x384.png diff --git a/web/static/images/favicon/android-chrome-48x48.png b/web/static/images/favicon/android-chrome-48x48.png Binary files differnew file mode 100644 index 000000000..6beb5bb2a --- /dev/null +++ b/web/static/images/favicon/android-chrome-48x48.png diff --git a/web/static/images/favicon/android-chrome-512x512.png b/web/static/images/favicon/android-chrome-512x512.png Binary files differnew file mode 100644 index 000000000..b9229a3b7 --- /dev/null +++ b/web/static/images/favicon/android-chrome-512x512.png diff --git a/web/static/images/favicon/android-chrome-72x72.png b/web/static/images/favicon/android-chrome-72x72.png Binary files differnew file mode 100644 index 000000000..9f6afec0d --- /dev/null +++ b/web/static/images/favicon/android-chrome-72x72.png diff --git a/web/static/images/favicon/android-chrome-96x96.png b/web/static/images/favicon/android-chrome-96x96.png Binary files differnew file mode 100644 index 000000000..b6ae0c7a7 --- /dev/null +++ b/web/static/images/favicon/android-chrome-96x96.png diff --git a/web/static/images/favicon/apple-touch-icon-114x114.png b/web/static/images/favicon/apple-touch-icon-114x114.png Binary files differnew file mode 100644 index 000000000..b4cb16a20 --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-114x114.png diff --git a/web/static/images/favicon/apple-touch-icon-120x120.png b/web/static/images/favicon/apple-touch-icon-120x120.png Binary files differnew file mode 100644 index 000000000..29a96291d --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-120x120.png diff --git a/web/static/images/favicon/apple-touch-icon-144x144.png b/web/static/images/favicon/apple-touch-icon-144x144.png Binary files differnew file mode 100644 index 000000000..b4cb16a20 --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-144x144.png diff --git a/web/static/images/favicon/apple-touch-icon-152x152.png b/web/static/images/favicon/apple-touch-icon-152x152.png Binary files differnew file mode 100644 index 000000000..be3f49d99 --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-152x152.png diff --git a/web/static/images/favicon/apple-touch-icon-57x57.png b/web/static/images/favicon/apple-touch-icon-57x57.png Binary files differnew file mode 100644 index 000000000..5e7e3d366 --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-57x57.png diff --git a/web/static/images/favicon/apple-touch-icon-60x60.png b/web/static/images/favicon/apple-touch-icon-60x60.png Binary files differnew file mode 100644 index 000000000..6f6c5e6bf --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-60x60.png diff --git a/web/static/images/favicon/apple-touch-icon-72x72.png b/web/static/images/favicon/apple-touch-icon-72x72.png Binary files differnew file mode 100644 index 000000000..9f6afec0d --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-72x72.png diff --git a/web/static/images/favicon/apple-touch-icon-76x76.png b/web/static/images/favicon/apple-touch-icon-76x76.png Binary files differnew file mode 100644 index 000000000..adb504eab --- /dev/null +++ b/web/static/images/favicon/apple-touch-icon-76x76.png diff --git a/web/static/images/favicon.ico b/web/static/images/favicon/favicon-16x16.png Binary files differindex af5505331..777a60546 100644 --- a/web/static/images/favicon.ico +++ b/web/static/images/favicon/favicon-16x16.png diff --git a/web/static/images/favicon/favicon-32x32.png b/web/static/images/favicon/favicon-32x32.png Binary files differnew file mode 100644 index 000000000..36c4a12e0 --- /dev/null +++ b/web/static/images/favicon/favicon-32x32.png diff --git a/web/static/images/favicon/favicon-96x96.png b/web/static/images/favicon/favicon-96x96.png Binary files differnew file mode 100644 index 000000000..4f6c6d1b2 --- /dev/null +++ b/web/static/images/favicon/favicon-96x96.png diff --git a/web/static/images/favicon/iTunesArtwork@2x.png b/web/static/images/favicon/iTunesArtwork@2x.png Binary files differnew file mode 100644 index 000000000..10321f3a1 --- /dev/null +++ b/web/static/images/favicon/iTunesArtwork@2x.png diff --git a/web/static/images/icon50x50.png b/web/static/images/icon50x50.png Binary files differindex 7ac6ce1c9..4791e755f 100644 --- a/web/static/images/icon50x50.png +++ b/web/static/images/icon50x50.png diff --git a/web/static/images/logo-email.png b/web/static/images/logo-email.png Binary files differindex c16978ba8..d0a38e21d 100644 --- a/web/static/images/logo-email.png +++ b/web/static/images/logo-email.png diff --git a/web/static/images/logo.png b/web/static/images/logo.png Binary files differindex 423d4d270..1a35cdf01 100644 --- a/web/static/images/logo.png +++ b/web/static/images/logo.png diff --git a/web/static/images/logoWhite.png b/web/static/images/logoWhite.png Binary files differindex 11bbd4632..3166c974c 100644 --- a/web/static/images/logoWhite.png +++ b/web/static/images/logoWhite.png diff --git a/web/static/images/logo_compact.png b/web/static/images/logo_compact.png Binary files differindex b861b7c6d..a4bce6281 100644 --- a/web/static/images/logo_compact.png +++ b/web/static/images/logo_compact.png diff --git a/web/templates/head.html b/web/templates/head.html index 689c69d3c..b5eb3a9b3 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -15,6 +15,19 @@ <!-- iOS add to homescreen --> <!-- Android add to homescreen --> + <link rel="apple-touch-icon" sizes="57x57" href="/static/images/favicon/apple-touch-icon-57x57.png"> + <link rel="apple-touch-icon" sizes="60x60" href="/static/images/favicon/apple-touch-icon-60x60.png"> + <link rel="apple-touch-icon" sizes="72x72" href="/static/images/favicon/apple-touch-icon-72x72.png"> + <link rel="apple-touch-icon" sizes="76x76" href="/static/images/favicon/apple-touch-icon-76x76.png"> + <link rel="apple-touch-icon" sizes="114x114" href="/static/images/favicon/apple-touch-icon-114x114.png"> + <link rel="apple-touch-icon" sizes="120x120" href="/static/images/favicon/apple-touch-icon-120x120.png"> + <link rel="apple-touch-icon" sizes="144x144" href="/static/images/favicon/apple-touch-icon-144x144.png"> + <link rel="apple-touch-icon" sizes="152x152" href="/static/images/favicon/apple-touch-icon-152x152.png"> + <link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicon/apple-touch-icon-180x180.png"> + <link rel="icon" type="image/png" sizes="32x32" href="/static/images/favicon/favicon-32x32.png"> + <link rel="icon" type="image/png" sizes="192x192" href="/static/images/favicon/android-chrome-192x192.png"> + <link rel="icon" type="image/png" sizes="96x96" href="/static/images/favicon/favicon-96x96.png"> + <link rel="icon" type="image/png" sizes="16x16" href="/static/images/favicon/favicon-16x16.png"> <link rel="manifest" href="/static/config/manifest.json"> <!-- Android add to homescreen --> @@ -27,9 +40,6 @@ <link rel="stylesheet" href="/static/css/katex.min.css"> <link rel="stylesheet" class="code_theme" href=""> - <link id="favicon" rel="icon" href="/static/images/favicon.ico" type="image/x-icon"> - <link rel="shortcut icon" href="/static/images/favicon.ico" type="image/x-icon"> - <script src="/static/js/react-0.14.3.js"></script> <script src="/static/js/react-dom-0.14.3.js"></script> <script src="/static/js/jquery-2.1.4.js"></script> diff --git a/web/web_test.go b/web/web_test.go index 8d40810b5..97e5ff154 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -45,7 +45,7 @@ func TestStatic(t *testing.T) { // add a short delay to make sure the server is ready to receive requests time.Sleep(1 * time.Second) - resp, err := http.Get(URL + "/static/images/favicon.ico") + resp, err := http.Get(URL + "/static/images/favicon/favicon-16x16.png") if err != nil { t.Fatalf("got error while trying to get static files %v", err) |