mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
Add enabled sites marker from data object
This commit is contained in:
@@ -92,6 +92,7 @@ class Dashboard extends React.Component {
|
||||
|
||||
render () {
|
||||
const { actions, app, domain, ui } = this.props
|
||||
console.log(app)
|
||||
return (
|
||||
<div>
|
||||
<Toolbar
|
||||
@@ -170,7 +171,7 @@ function mapDispatchToProps (dispatch) {
|
||||
}
|
||||
|
||||
export default connect(
|
||||
// state => state,
|
||||
state => injectSource("Hromadske.tv - Paratroopers Video"),
|
||||
state => state,
|
||||
// state => injectSource("Hromadske.tv - Paratroopers Video"),
|
||||
mapDispatchToProps
|
||||
)(Dashboard)
|
||||
|
||||
@@ -141,7 +141,7 @@ class SourceOverlay extends React.Component {
|
||||
</svg>
|
||||
</div>
|
||||
) : null
|
||||
|
||||
console.log(this.props)
|
||||
console.log(this.state.idx)
|
||||
console.log(this.props.source.paths.length)
|
||||
const forwardArrow = this.state.idx < this.props.source.paths.length - 1 ? (
|
||||
|
||||
@@ -161,7 +161,7 @@ class Toolbar extends React.Component {
|
||||
<div className='toolbar-header'><p>{title}</p></div>
|
||||
<div className='toolbar-tabs'>
|
||||
{this.renderToolbarTab(0, narrativesLabel, 'timeline')}
|
||||
{(isCategories) ? this.renderToolbarTab(1, categoriesLabel, 'category') : null}
|
||||
{(isCategories) ? this.renderToolbarTab(1, categoriesLabel, 'widgets') : null}
|
||||
{(isTags) ? this.renderToolbarTab(2, tagsLabel, 'filter_list') : null}
|
||||
</div>
|
||||
<ToolbarBottomActions
|
||||
|
||||
@@ -5,7 +5,8 @@ const siteSchema = Joi.object().keys({
|
||||
description: Joi.string().allow('').required(),
|
||||
site: Joi.string().required(),
|
||||
latitude: Joi.string().required(),
|
||||
longitude: Joi.string().required()
|
||||
longitude: Joi.string().required(),
|
||||
enabled: Joi.string().allow('')
|
||||
})
|
||||
|
||||
export default siteSchema
|
||||
|
||||
@@ -26,6 +26,7 @@ $header-inset: 10px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: $panel-height;
|
||||
max-height: calc(100% - 40px);
|
||||
width: $panel-width;
|
||||
max-width: 90vw;
|
||||
box-shadow: 0 19px 19px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
|
||||
|
||||
@@ -9,7 +9,7 @@ export const getActiveNarrative = state => state.app.narrative
|
||||
export const getActiveStep = state => state.app.narrativeState.current
|
||||
export const getSelected = state => state.app.selected
|
||||
export const getSites = (state) => {
|
||||
if (process.env.features.USE_SITES) return state.domain.sites
|
||||
if (process.env.features.USE_SITES) return state.domain.sites.filter(s => !!(+s.enabled))
|
||||
return []
|
||||
}
|
||||
export const getSources = state => {
|
||||
|
||||
Reference in New Issue
Block a user