diff options
author | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-17 20:03:57 +0200 |
---|---|---|
committer | Ondřej Hruška <ondra@ondrovo.com> | 2017-07-17 20:03:57 +0200 |
commit | c727eae4412ac9e4f1bafdc68fe89dcd46d602ca (patch) | |
tree | ee7ce8662f6a91c87cf46bf6de70dae66556c0d0 /app/javascript | |
parent | d0aad1ac854eaa53f9b7d38cc8dd90e289790629 (diff) | |
parent | 681c33d1f4c395742918eb66f2db979b0d628118 (diff) |
Updated from tootsuite
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/components/extended_video_player.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/features/compose/components/compose_form.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/main.js | 2 | ||||
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 2 | ||||
-rw-r--r-- | app/javascript/packs/common.js | 2 | ||||
-rw-r--r-- | app/javascript/packs/public.js | 2 | ||||
-rw-r--r-- | app/javascript/styles/components.scss | 11 |
7 files changed, 13 insertions, 10 deletions
diff --git a/app/javascript/mastodon/components/extended_video_player.js b/app/javascript/mastodon/components/extended_video_player.js index b38a4b8ff..5ab5e9e58 100644 --- a/app/javascript/mastodon/components/extended_video_player.js +++ b/app/javascript/mastodon/components/extended_video_player.js @@ -32,7 +32,7 @@ export default class ExtendedVideoPlayer extends React.PureComponent { render () { return ( - <div className='extended-video-player' style={{ width: this.props.width, height: this.props.height }}> + <div className='extended-video-player'> <video ref={this.setRef} src={this.props.src} diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js index 7273edf48..58064fac2 100644 --- a/app/javascript/mastodon/features/compose/components/compose_form.js +++ b/app/javascript/mastodon/features/compose/components/compose_form.js @@ -140,7 +140,7 @@ export default class ComposeForm extends ImmutablePureComponent { handleEmojiPick = (data) => { const position = this.autosuggestTextarea.textarea.selectionStart; - const emojiChar = String.fromCodePoint(parseInt(data.unicode, 16)); + const emojiChar = data.unicode.split('-').map(code => String.fromCodePoint(parseInt(code, 16))).join(''); this._restoreCaret = position + emojiChar.length + 1; this.props.onPickEmoji(position, data); } diff --git a/app/javascript/mastodon/main.js b/app/javascript/mastodon/main.js index b237e9aee..80a169f51 100644 --- a/app/javascript/mastodon/main.js +++ b/app/javascript/mastodon/main.js @@ -8,8 +8,6 @@ function main() { const React = require('react'); const ReactDOM = require('react-dom'); - require.context('../images/', true); - if (window.history && history.replaceState) { const { pathname, search, hash } = window.location; const path = pathname + search + hash; diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 0c5dbccab..4dce634a4 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -126,7 +126,7 @@ const insertSuggestion = (state, position, token, completion) => { }; const insertEmoji = (state, position, emojiData) => { - const emoji = String.fromCodePoint(parseInt(emojiData.unicode, 16)); + const emoji = emojiData.unicode.split('-').map(code => String.fromCodePoint(parseInt(code, 16))).join(''); return state.withMutations(map => { map.update('text', oldText => `${oldText.slice(0, position)}${emoji} ${oldText.slice(position)}`); diff --git a/app/javascript/packs/common.js b/app/javascript/packs/common.js index a0cb91ae4..ba7053f1f 100644 --- a/app/javascript/packs/common.js +++ b/app/javascript/packs/common.js @@ -4,4 +4,6 @@ import { start } from 'rails-ujs'; require('font-awesome/css/font-awesome.css'); require('mastodon-application-style'); +require.context('../images/', true); + start(); diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 4865f3ec0..39daef761 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -7,8 +7,6 @@ import loadPolyfills from '../mastodon/load_polyfills'; import { processBio } from '../glitch/util/bio_metadata'; import ready from '../mastodon/ready'; -require.context('../images/', true); - const { localeData } = getLocale(); localeData.forEach(IntlRelativeFormat.__addLocaleData); diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss index f12c8fbd1..a09a33e00 100644 --- a/app/javascript/styles/components.scss +++ b/app/javascript/styles/components.scss @@ -1384,8 +1384,8 @@ top: 0; left: 0; right: 0; - width: 100%; - height: 100%; + max-width: 100%; + max-height: 100%; background-image: none; } @@ -3313,8 +3313,9 @@ button.icon-button.active i.fa-retweet { video { max-width: 80vw; max-height: 80vh; - width: 100%; + width: auto; height: auto; + margin: auto; } .extended-video-player, @@ -3330,6 +3331,10 @@ button.icon-button.active i.fa-retweet { background: url('../images/void.png') repeat; object-fit: contain; } + + .react-swipeable-view-container { + max-width: 80vw; + } } .media-modal__close { |