import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { FormattedMessage, injectIntl } from 'react-intl';
-import api from '../../../api';
+import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+import api from 'mastodon/api';
+import IconButton from 'mastodon/components/icon_button';
+
+const messages = defineMessages({
+ close: { id: 'lightbox.close', defaultMessage: 'Close' },
+});
export default @injectIntl
class EmbedModal extends ImmutablePureComponent {
}
render () {
+ const { intl, onClose } = this.props;
const { oembed } = this.state;
return (
- <div className='modal-root__modal embed-modal'>
- <h4><FormattedMessage id='status.embed' defaultMessage='Embed' /></h4>
+ <div className='modal-root__modal report-modal embed-modal'>
+ <div className='report-modal__target'>
+ <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />
+ <FormattedMessage id='status.embed' defaultMessage='Embed' />
+ </div>
- <div className='embed-modal__container'>
+ <div className='report-modal__container embed-modal__container' style={{ display: 'block' }}>
<p className='hint'>
<FormattedMessage id='embed.instructions' defaultMessage='Embed this status on your website by copying the code below.' />
</p>
}
}
+.status-card__actions button,
+.status-card__actions a {
+ color: rgba($white, 0.8);
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: $white;
+ }
+}
+
// Change default background colors of columns
.column > .scrollable,
.getting-started,
-.column-inline-form {
+.column-inline-form,
+.error-column,
+.regeneration-indicator {
background: $white;
border: 1px solid lighten($ui-base-color, 8%);
border-top: 0;
}
+.directory__card__img {
+ background: lighten($ui-base-color, 12%);
+}
+
+.filter-form,
+.directory__card__bar {
+ background: $white;
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+}
+
+.scrollable .directory__list {
+ width: calc(100% + 2px);
+ margin-left: -1px;
+ margin-right: -1px;
+}
+
+.directory__card,
+.table-of-contents {
+ border: 1px solid lighten($ui-base-color, 8%);
+}
+
.column-back-button,
.column-header {
background: $white;
}
&--slim-button {
- border: 0;
- top: -49px;
- right: 1px;
+ top: -50px;
+ right: 0;
}
}
.column-header__back-button,
.column-header__button,
.column-header__button.active,
-.account__header__bar {
+.account__header__bar,
+.directory__card__extra {
background: $white;
}
text-decoration: underline;
}
+.confirmation-modal__secondary-button,
+.confirmation-modal__cancel-button,
+.mute-modal__cancel-button,
+.block-modal__cancel-button {
+ color: lighten($ui-base-color, 26%);
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: $primary-text-color;
+ }
+}
+
.column-subheading {
background: darken($ui-base-color, 4%);
border-bottom: 1px solid lighten($ui-base-color, 8%);
.report-modal,
.embed-modal,
.error-modal,
-.onboarding-modal {
- background: $ui-base-color;
+.onboarding-modal,
+.report-modal__comment .setting-text__wrapper,
+.report-modal__comment .setting-text {
+ background: $white;
+ border: 1px solid lighten($ui-base-color, 8%);
+}
+
+.report-modal__comment {
+ border-right-color: lighten($ui-base-color, 8%);
+}
+
+.report-modal__container {
+ border-top-color: lighten($ui-base-color, 8%);
}
.column-header__collapsible-inner {
border-top: 0;
}
+.focal-point__preview strong {
+ color: $white;
+}
+
.boost-modal__action-bar,
.confirmation-modal__action-bar,
.mute-modal__action-bar,
.embed-modal .embed-modal__container .embed-modal__html {
background: $white;
+ border: 1px solid lighten($ui-base-color, 8%);
&:focus {
- background: darken($ui-base-color, 6%);
+ border-color: lighten($ui-base-color, 12%);
+ background: $white;
}
}