mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
WIP: source error for all types
This commit is contained in:
@@ -155,13 +155,13 @@ function mapDispatchToProps(dispatch) {
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
...state,
|
||||
app: {
|
||||
...state.app,
|
||||
source: state.domain.sources["Anna News - Horbatenko Tanks Video"]
|
||||
}
|
||||
}),
|
||||
// state => state,
|
||||
// state => ({
|
||||
// ...state,
|
||||
// app: {
|
||||
// ...state.app,
|
||||
// source: state.domain.sources["Anna News - Horbatenko Tanks Video"]
|
||||
// }
|
||||
// }),
|
||||
state => state,
|
||||
mapDispatchToProps,
|
||||
)(Dashboard);
|
||||
|
||||
@@ -12,27 +12,20 @@ class SourceOverlay extends React.Component {
|
||||
|
||||
renderVideo() {
|
||||
// return (
|
||||
// <iframe
|
||||
// className="vimeo-iframe"
|
||||
// src="https://player.vimeo.com/video/33044546"
|
||||
// frameborder="0"
|
||||
// webkitallowfullscreen
|
||||
// mozallowfullscreen
|
||||
// allowfullscreen
|
||||
// ></iframe>
|
||||
// <Media>
|
||||
// <div className="media">
|
||||
// <div className="media-player">
|
||||
// <Player src="http://localhost:8000/Anna News - Horbatenko Tanks Video.mp4" />
|
||||
// </div>
|
||||
// <div className="media-controls">
|
||||
// <controls.PlayPause/>
|
||||
// <controls.MuteUnmute/>
|
||||
// </div>
|
||||
// </div>
|
||||
// </Media>
|
||||
// )
|
||||
return (
|
||||
<Media>
|
||||
<div className="media">
|
||||
<div className="media-player">
|
||||
<Player src="https://player.vimeo.com/video/33044546" />
|
||||
</div>
|
||||
<div className="media-controls">
|
||||
<controls.PlayPause/>
|
||||
<controls.MuteUnmute/>
|
||||
</div>
|
||||
</div>
|
||||
</Media>
|
||||
<NoSource failedUrls={["NOT ALL SOURCES AVAILABLE IN APPLICATION YET"]} />
|
||||
)
|
||||
}
|
||||
|
||||
@@ -50,7 +43,7 @@ class SourceOverlay extends React.Component {
|
||||
|
||||
renderError() {
|
||||
return (
|
||||
<div>ERROR: no support for this source</div>
|
||||
<NoSource failedUrls={["NOT ALL SOURCES AVAILABLE IN APPLICATION YET"]} />
|
||||
)
|
||||
}
|
||||
|
||||
@@ -96,7 +89,7 @@ class SourceOverlay extends React.Component {
|
||||
{type ? <div>Type: <span className="indent">{type}</span></div> : null}
|
||||
{date ? <div>Date:<span className="indent">{date}</span></div> : null}
|
||||
<hr/>
|
||||
{url ? <div><a href={url} target="_blank">Link to original webpage</a></div> : null}
|
||||
{url ? <div><a href={url} target="_blank">Link to original URL</a></div> : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,14 +7,14 @@ const NoSource = ({ failedUrls }) => {
|
||||
<i className="material-icons no-source-icon">
|
||||
error
|
||||
</i>
|
||||
<div>No media found.</div>
|
||||
<div>No media found, as the original media has not yet been uploaded to the platform.</div>
|
||||
</div>
|
||||
<div className="no-source-row">
|
||||
The following URLs were tried:
|
||||
</div>
|
||||
<ul>
|
||||
{failedUrls.map((url, idx) => <li key={idx}>{url}</li>)}
|
||||
</ul>
|
||||
{/* <div className="no-source-row"> */}
|
||||
{/* The following URLs were tried: */}
|
||||
{/* </div> */}
|
||||
{/* <ul> */}
|
||||
{/* {failedUrls.map((url, idx) => <li key={idx}>{url}</li>)} */}
|
||||
{/* </ul> */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
$panel-width: 800px;
|
||||
$panel-height: 800px;
|
||||
$vimeo-width: $panel-width - 100;
|
||||
// $vimeo-height: $panel-height - 100;
|
||||
$vimeo-height: $panel-height / 2;
|
||||
|
||||
$header-inset: 10px;
|
||||
|
||||
@@ -104,12 +104,22 @@ $header-inset: 10px;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.vimeo-iframe {
|
||||
// min-height: $vimeo-height;
|
||||
// max-height: $vimeo-height;
|
||||
.media-player {
|
||||
min-width: $vimeo-width;
|
||||
max-width: $vimeo-width;
|
||||
min-height: $vimeo-height;
|
||||
max-height: $vimeo-height;
|
||||
border: none;
|
||||
|
||||
iframe, video {
|
||||
width: $vimeo-width;
|
||||
height: $vimeo-height - 50;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.media-controls {
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user