GIF modal fixes
This commit is contained in:
parent
c6f492b4cd
commit
d76c36ac14
3 changed files with 26 additions and 15 deletions
|
@ -6,7 +6,7 @@ import {
|
|||
addPoll,
|
||||
removePoll,
|
||||
} from 'flavours/glitch/actions/compose';
|
||||
import { openModal } from 'flavours/glitch/actions/modal';
|
||||
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
|
||||
|
||||
import Options from '../components/options';
|
||||
|
||||
|
@ -53,15 +53,21 @@ const mapDispatchToProps = (dispatch) => ({
|
|||
},
|
||||
|
||||
onEmbedTenor() {
|
||||
dispatch(openModal('TENOR', { noEsc: true }));
|
||||
dispatch(openModal({
|
||||
modalType: 'TENOR',
|
||||
modalProps: { noEsc: true },
|
||||
}));
|
||||
},
|
||||
|
||||
onModalClose() {
|
||||
dispatch(closeModal());
|
||||
dispatch(closeModal({
|
||||
modalType: undefined,
|
||||
ignoreFocus: false,
|
||||
}));
|
||||
},
|
||||
|
||||
onModalOpen(props) {
|
||||
dispatch(openModal('ACTIONS', props));
|
||||
dispatch(openModal({ modalType: 'ACTIONS', modalProps: props }));
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import { connect } from 'react-redux';
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
|
||||
import Tenor from 'react-tenor';
|
||||
|
||||
import { tenorSet, uploadCompose } from 'flavours/glitch/actions/compose';
|
||||
import { IconButton } from 'flavours/glitch/components/icon_button';
|
||||
import Tenor from 'react-tenor';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
const messages = defineMessages({
|
||||
search: { id: 'tenor.search', defaultMessage: 'Search for GIFs' },
|
||||
|
@ -32,9 +35,16 @@ const mapStateToProps = state => ({
|
|||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
/** Set options in the redux store */
|
||||
/**
|
||||
* Set options in the redux store
|
||||
* @param opts
|
||||
*/
|
||||
setOpt: (opts) => dispatch(tenorSet(opts)),
|
||||
/** Submit GIF for upload */
|
||||
/**
|
||||
* Submit GIF for upload
|
||||
* @param file
|
||||
* @param alt
|
||||
*/
|
||||
submit: (file, alt) => dispatch(uploadCompose([file], alt)),
|
||||
});
|
||||
|
||||
|
|
|
@ -37,11 +37,6 @@
|
|||
|
||||
= stylesheet_link_tag '/inert.css', skip_pipeline: true, media: 'all', id: 'inert-style'
|
||||
|
||||
-# Add jQuery, Frameloader.js and Fork Awesome
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.1.7/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous">
|
||||
<script src="/frameloader.js"></script>
|
||||
|
||||
= yield :header_tags
|
||||
|
||||
-# These must come after :header_tags to ensure our initial state has been defined.
|
||||
|
|
Loading…
Add table
Reference in a new issue