mirror of https://github.com/Siphonay/mastodon
Merge branch 'gs-master' into merge-upstream
This commit is contained in:
commit
e27eedbd08
|
@ -21,9 +21,9 @@ export default class AttachmentList extends ImmutablePureComponent {
|
||||||
|
|
||||||
<ul className='attachment-list__list'>
|
<ul className='attachment-list__list'>
|
||||||
{media.map(attachment =>
|
{media.map(attachment =>
|
||||||
<li key={attachment.get('id')}>
|
(<li key={attachment.get('id')}>
|
||||||
<a href={attachment.get('remote_url')} target='_blank' rel='noopener'>{filename(attachment.get('remote_url'))}</a>
|
<a href={attachment.get('remote_url')} target='_blank' rel='noopener'>{filename(attachment.get('remote_url'))}</a>
|
||||||
</li>
|
</li>)
|
||||||
)}
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,9 +6,9 @@ import PropTypes from 'prop-types';
|
||||||
const Collapsable = ({ fullHeight, isVisible, children }) => (
|
const Collapsable = ({ fullHeight, isVisible, children }) => (
|
||||||
<Motion defaultStyle={{ opacity: !isVisible ? 0 : 100, height: isVisible ? fullHeight : 0 }} style={{ opacity: spring(!isVisible ? 0 : 100), height: spring(!isVisible ? 0 : fullHeight) }}>
|
<Motion defaultStyle={{ opacity: !isVisible ? 0 : 100, height: isVisible ? fullHeight : 0 }} style={{ opacity: spring(!isVisible ? 0 : 100), height: spring(!isVisible ? 0 : fullHeight) }}>
|
||||||
{({ opacity, height }) =>
|
{({ opacity, height }) =>
|
||||||
<div style={{ height: `${height}px`, overflow: 'hidden', opacity: opacity / 100, display: Math.floor(opacity) === 0 ? 'none' : 'block' }}>
|
(<div style={{ height: `${height}px`, overflow: 'hidden', opacity: opacity / 100, display: Math.floor(opacity) === 0 ? 'none' : 'block' }}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>)
|
||||||
}
|
}
|
||||||
</Motion>
|
</Motion>
|
||||||
);
|
);
|
||||||
|
|
|
@ -116,7 +116,7 @@ export default class IconButton extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<Motion defaultStyle={motionDefaultStyle} style={motionStyle}>
|
<Motion defaultStyle={motionDefaultStyle} style={motionStyle}>
|
||||||
{({ rotate }) =>
|
{({ rotate }) =>
|
||||||
<button
|
(<button
|
||||||
aria-label={title}
|
aria-label={title}
|
||||||
aria-pressed={pressed}
|
aria-pressed={pressed}
|
||||||
aria-expanded={expanded}
|
aria-expanded={expanded}
|
||||||
|
@ -128,7 +128,7 @@ export default class IconButton extends React.PureComponent {
|
||||||
>
|
>
|
||||||
<i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' />
|
<i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' />
|
||||||
{this.props.label}
|
{this.props.label}
|
||||||
</button>
|
</button>)
|
||||||
}
|
}
|
||||||
</Motion>
|
</Motion>
|
||||||
);
|
);
|
||||||
|
|
|
@ -318,14 +318,14 @@ export default class Status extends ImmutablePureComponent {
|
||||||
|
|
||||||
media = (
|
media = (
|
||||||
<Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >
|
<Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >
|
||||||
{Component => <Component
|
{Component => (<Component
|
||||||
preview={video.get('preview_url')}
|
preview={video.get('preview_url')}
|
||||||
src={video.get('url')}
|
src={video.get('url')}
|
||||||
sensitive={status.get('sensitive')}
|
sensitive={status.get('sensitive')}
|
||||||
letterbox={settings.getIn(['media', 'letterbox'])}
|
letterbox={settings.getIn(['media', 'letterbox'])}
|
||||||
fullwidth={settings.getIn(['media', 'fullwidth'])}
|
fullwidth={settings.getIn(['media', 'fullwidth'])}
|
||||||
onOpenVideo={this.handleOpenVideo}
|
onOpenVideo={this.handleOpenVideo}
|
||||||
/>}
|
/>)}
|
||||||
</Bundle>
|
</Bundle>
|
||||||
);
|
);
|
||||||
mediaIcon = 'video-camera';
|
mediaIcon = 'video-camera';
|
||||||
|
|
|
@ -95,10 +95,10 @@ export default class AccountGallery extends ImmutablePureComponent {
|
||||||
|
|
||||||
<div className='account-gallery__container'>
|
<div className='account-gallery__container'>
|
||||||
{medias.map(media =>
|
{medias.map(media =>
|
||||||
<MediaItem
|
(<MediaItem
|
||||||
key={media.get('id')}
|
key={media.get('id')}
|
||||||
media={media}
|
media={media}
|
||||||
/>
|
/>)
|
||||||
)}
|
)}
|
||||||
{loadMore}
|
{loadMore}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,10 +36,10 @@ export default function ComposerUploadFormProgress ({ progress }) {
|
||||||
style={{ width: spring(progress) }}
|
style={{ width: spring(progress) }}
|
||||||
>
|
>
|
||||||
{({ width }) =>
|
{({ width }) =>
|
||||||
<div
|
(<div
|
||||||
className='tracker'
|
className='tracker'
|
||||||
style={{ width: `${width}%` }}
|
style={{ width: `${width}%` }}
|
||||||
/>
|
/>)
|
||||||
}
|
}
|
||||||
</Motion>
|
</Motion>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,9 +67,9 @@ export default class ListEditor extends ImmutablePureComponent {
|
||||||
|
|
||||||
<Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}>
|
<Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}>
|
||||||
{({ x }) =>
|
{({ x }) =>
|
||||||
<div className='drawer__inner backdrop' style={{ transform: x === 0 ? null : `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}>
|
(<div className='drawer__inner backdrop' style={{ transform: x === 0 ? null : `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}>
|
||||||
{searchAccountIds.map(accountId => <Account key={accountId} accountId={accountId} />)}
|
{searchAccountIds.map(accountId => <Account key={accountId} accountId={accountId} />)}
|
||||||
</div>
|
</div>)
|
||||||
}
|
}
|
||||||
</Motion>
|
</Motion>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,12 +38,12 @@ export default class UploadArea extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<Motion defaultStyle={{ backgroundOpacity: 0, backgroundScale: 0.95 }} style={{ backgroundOpacity: spring(active ? 1 : 0, { stiffness: 150, damping: 15 }), backgroundScale: spring(active ? 1 : 0.95, { stiffness: 200, damping: 3 }) }}>
|
<Motion defaultStyle={{ backgroundOpacity: 0, backgroundScale: 0.95 }} style={{ backgroundOpacity: spring(active ? 1 : 0, { stiffness: 150, damping: 15 }), backgroundScale: spring(active ? 1 : 0.95, { stiffness: 200, damping: 3 }) }}>
|
||||||
{({ backgroundOpacity, backgroundScale }) =>
|
{({ backgroundOpacity, backgroundScale }) =>
|
||||||
<div className='upload-area' style={{ visibility: active ? 'visible' : 'hidden', opacity: backgroundOpacity }}>
|
(<div className='upload-area' style={{ visibility: active ? 'visible' : 'hidden', opacity: backgroundOpacity }}>
|
||||||
<div className='upload-area__drop'>
|
<div className='upload-area__drop'>
|
||||||
<div className='upload-area__background' style={{ transform: `scale(${backgroundScale})` }} />
|
<div className='upload-area__background' style={{ transform: `scale(${backgroundScale})` }} />
|
||||||
<div className='upload-area__content'><FormattedMessage id='upload_area.title' defaultMessage='Drag & drop to upload' /></div>
|
<div className='upload-area__content'><FormattedMessage id='upload_area.title' defaultMessage='Drag & drop to upload' /></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>)
|
||||||
}
|
}
|
||||||
</Motion>
|
</Motion>
|
||||||
);
|
);
|
||||||
|
|
|
@ -98,7 +98,7 @@ const DOCUMENT_START = /^/;
|
||||||
const DOCUMENT_END = /$/;
|
const DOCUMENT_END = /$/;
|
||||||
const ALLOWED_CHAR = unirex( // `c-printable` in the YAML 1.2 spec.
|
const ALLOWED_CHAR = unirex( // `c-printable` in the YAML 1.2 spec.
|
||||||
compat_mode ? '[\t\n\r\x20-\x7e\x85\xa0-\ufffd]' : '[\t\n\r\x20-\x7e\x85\xa0-\ud7ff\ue000-\ufffd\u{10000}-\u{10FFFF}]'
|
compat_mode ? '[\t\n\r\x20-\x7e\x85\xa0-\ufffd]' : '[\t\n\r\x20-\x7e\x85\xa0-\ud7ff\ue000-\ufffd\u{10000}-\u{10FFFF}]'
|
||||||
);
|
);
|
||||||
const WHITE_SPACE = /[ \t]/;
|
const WHITE_SPACE = /[ \t]/;
|
||||||
const LINE_BREAK = /\r?\n|\r|<br\s*\/?>/;
|
const LINE_BREAK = /\r?\n|\r|<br\s*\/?>/;
|
||||||
const INDICATOR = /[-?:,[\]{}&#*!|>'"%@`]/;
|
const INDICATOR = /[-?:,[\]{}&#*!|>'"%@`]/;
|
||||||
|
|
Loading…
Reference in New Issue