The list is empty
Please update filter criteria to add articles to the list.
diff --git a/client/components/ContentLists/Automatic/FilterPanel.jsx b/client/components/ContentLists/Automatic/FilterPanel.jsx
index bc4db0ea..1587e0fa 100644
--- a/client/components/ContentLists/Automatic/FilterPanel.jsx
+++ b/client/components/ContentLists/Automatic/FilterPanel.jsx
@@ -2,9 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import _ from "lodash";
import moment from "moment";
-import { Button, IconButton, Dropdown } from "superdesk-ui-framework/react";
-import MultiSelect from "../../UI/MultiSelect";
-import AsyncMultiSelect from "../../UI/AsyncMultiSelect";
+import { Button, IconButton, Dropdown, TreeSelect, MultiSelect, Container } from "superdesk-ui-framework/react";
import { DatePicker } from "superdesk-ui-framework/react";
class FilterPanel extends React.Component {
@@ -50,8 +48,11 @@ class FilterPanel extends React.Component {
let routesOptions = [];
routes.map((route) => {
routesOptions.push({
- value: parseInt(route.id),
- label: route.name,
+ value: {
+ value: parseInt(route.id),
+ label: route.name,
+ },
+ label: route.name
});
});
this.setState({ routes: routesOptions }, this.prepareFilters);
@@ -59,27 +60,32 @@ class FilterPanel extends React.Component {
});
};
- loadAuthors = (inputValue = null) => {
- if (inputValue && inputValue.length < 3) return this.state.authors;
+ loadAuthors = (inputValue = null, callback = null) => {
+ if (inputValue && inputValue.length < 2) callback(this.state.authors);
- return this.props.publisher
+ this.props.publisher
.queryAuthors({ term: inputValue, limit: 30 })
.then((response) => {
let authorsOptions = [];
response._embedded._items.forEach((item) => {
authorsOptions.push({
- value: item.id,
- label: item.name,
+ value: {
+ value: item.id,
+ label: item.name,
+ },
+ label: item.name
});
});
this.setState({ authors: authorsOptions });
- return authorsOptions;
+ callback(authorsOptions);
})
.catch((err) => {
- return this.state.authors;
+ callback(this.state.authors);
});
+
+ return () => { };
};
prepareFilters = () => {
@@ -89,12 +95,12 @@ class FilterPanel extends React.Component {
if (filters.route) {
filters.route.map((id) => {
let routeObj = this.state.routes.find(
- (route) => parseInt(id) === parseInt(route.value)
+ (route) => parseInt(id) === parseInt(route.value.value)
);
if (routeObj)
newRoute.push({
- value: parseInt(routeObj.value),
- label: routeObj.label,
+ value: routeObj.value.value,
+ label: routeObj.label
});
});
}
@@ -144,8 +150,11 @@ class FilterPanel extends React.Component {
if (serviceItems.length) {
serviceItems.map((item) => {
serviceOptions.push({
- value: item.qcode,
- label: item.name,
+ value: {
+ value: item.qcode,
+ label: item.name,
+ },
+ label: item.name
});
});
}
@@ -183,8 +192,11 @@ class FilterPanel extends React.Component {
if (serviceItems.length) {
serviceItems.map((item) => {
serviceOptions.push({
- value: item.qcode,
- label: item.name,
+ value: {
+ value: item.qcode,
+ label: item.name,
+ },
+ label: item.name
});
});
}
@@ -222,8 +234,11 @@ class FilterPanel extends React.Component {
if (serviceItems.length) {
serviceItems.map((item) => {
serviceOptions.push({
- value: item.qcode,
- label: item.name,
+ value: {
+ value: item.qcode,
+ label: item.name,
+ },
+ label: item.name
});
});
}
@@ -271,8 +286,11 @@ class FilterPanel extends React.Component {
if (subjectItems.length) {
subjectItems.map((item) => {
subjectOptions.push({
- value: item.qcode,
- label: item.name,
+ value: {
+ value: item.qcode,
+ label: item.name,
+ },
+ label: item.name
});
});
}
@@ -440,8 +458,11 @@ class FilterPanel extends React.Component {
if (subjectItems.length) {
subjectItems.map((item) => {
subjectOptions.push({
- value: item.qcode,
- label: item.name,
+ value: {
+ value: item.qcode,
+ label: item.name,
+ },
+ label: item.name
});
});
vocabularies.push({
@@ -487,7 +508,7 @@ class FilterPanel extends React.Component {
let filteredVocabularies = this.props.vocabularies.filter(
(vocabulary) =>
this.state.vocabularies.findIndex((v) => v.id === vocabulary._id) ===
- -1 &&
+ -1 &&
vocabulary.items.length &&
vocabulariesToRemove.indexOf(vocabulary._id) === -1
);
@@ -511,38 +532,42 @@ class FilterPanel extends React.Component {
-
-
+
this.handleRoutesChange(values)}
+ label="Routes"
+ onChange={(values) => this.handleRoutesChange(values)}
options={this.state.routes}
- selectedOptions={this.state.filters.route}
+ optionLabel={(option) => option.label}
+ value={this.state.filters.route}
+ emptyFilterMessage="No routes found"
/>
-
-
-
this.handleAuthorChange(values)}
- loadOptions={(inputValue) => this.loadAuthors(inputValue)}
- selectedOptions={
- this.state.filters.author ? this.state.filters.author : []
- }
+
+ item.label}
+ getId={(item) => item}
+ allowMultiple={true}
+ searchOptions={this.loadAuthors}
+ onChange={(values) => this.handleAuthorChange(values)}
/>
-
-
-
{this.state.vocabularies.map((vocabulary) => (
-
+
-
-
- {/*
{vocabulary.id}
*/}
-
+
- this.handleMetadataChange(values, vocabulary.id)
- }
+ label={vocabulary.name}
options={vocabulary.options}
- selectedOptions={vocabulary.value}
+ optionLabel={(option) => option.label}
+ value={vocabulary.value}
+ emptyFilterMessage="No routes found"
+ onChange={(values) => this.handleMetadataChange(values, vocabulary.id)}
/>
-
+
))}
{this.state.isEditing ? (
-
-
+
-
-
-
+
+
+
) : (
-
- {list.name}
+
{list.enabled && (
-
+
)}
diff --git a/client/components/ContentLists/Listing.jsx b/client/components/ContentLists/Listing.jsx
index 6bc1b5b1..db3c8526 100644
--- a/client/components/ContentLists/Listing.jsx
+++ b/client/components/ContentLists/Listing.jsx
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
import ListCard from "./ListCard";
import Dropdown from "../UI/Dropdown";
import SearchBar from "../UI/SearchBar";
-import { CheckButtonGroup, RadioButton } from "superdesk-ui-framework/react";
+import { CheckButtonGroup, RadioButtonGroup } from "superdesk-ui-framework/react";
class Listing extends React.Component {
constructor(props) {
@@ -53,7 +53,7 @@ class Listing extends React.Component {
/>
- {
- if (inputValue && inputValue.length < 3) return this.state.authors;
+ loadAuthors = (inputValue = null, callback = null) => {
+ if (inputValue && inputValue.length < 2) callback(this.state.authors);
- return this.props.publisher
+ this.props.publisher
.queryAuthors({ term: inputValue, limit: 30 })
.then((response) => {
let authorsOptions = [];
response._embedded._items.forEach((item) => {
authorsOptions.push({
- value: item.id,
- label: item.name,
+ value: {
+ value: item.id,
+ label: item.name,
+ }
});
});
this.setState({ authors: authorsOptions });
- return authorsOptions;
+ callback(authorsOptions);
})
.catch((err) => {
- return this.state.authors;
+ callback(this.state.authors);
});
+
+ return () => { };
};
handleAuthorChange = (arr) => {
@@ -67,6 +69,7 @@ class FilterPanel extends React.Component {
let filters = { ...this.state.filters };
filters.route = arr ? arr : [];
+
this.setState({ filters });
};
@@ -109,8 +112,11 @@ class FilterPanel extends React.Component {
this.state.routes.map((route) => {
routesOptions.push({
- value: parseInt(route.id),
- label: route.name,
+ value: {
+ value: parseInt(route.id),
+ label: route.name,
+ },
+ label: route.name
});
});
@@ -125,7 +131,7 @@ class FilterPanel extends React.Component {
return (
-
+
-
-
-
+
+
this.handleRoutesChange(values)}
+ label="Routes"
+ onChange={(values) => this.handleRoutesChange(values)}
options={routesOptions}
- selectedOptions={this.state.filters.route}
+ optionLabel={(option) => option.label}
+ value={this.state.filters.route}
+ emptyFilterMessage="No routes found"
/>
-
-
-
-
this.handleAuthorChange(values)}
- loadOptions={(inputValue) => this.loadAuthors(inputValue)}
- selectedOptions={
- this.state.filters.author ? this.state.filters.author : []
- }
+
+
+ item.label}
+ getId={(item) => item}
+ allowMultiple={true}
+ searchOptions={this.loadAuthors}
+ onChange={(values) => this.handleAuthorChange(values)}
/>
diff --git a/client/components/ContentLists/Manual/Manual.jsx b/client/components/ContentLists/Manual/Manual.jsx
index a5df6283..35ad7534 100644
--- a/client/components/ContentLists/Manual/Manual.jsx
+++ b/client/components/ContentLists/Manual/Manual.jsx
@@ -357,9 +357,16 @@ class Manual extends React.Component {
getList = (id) => this.state[this.id2List[id]].items;
- onDragEnd = (result) => {
- const { source, destination } = result;
+ getIndexInList = (list, draggableId) => {
+ let ids = draggableId.split('_');
+ let id = parseInt(ids[ids.length - 1]);
+
+ return list.findIndex(item => ids.length > 2 ? item.content.id === id : item.id === id);
+ }
+ onDragEnd = (result) => {
+ const { source, destination, draggableId } = result;
+
// dropped outside the list
if (!destination) {
return;
@@ -377,7 +384,7 @@ class Manual extends React.Component {
let list = { ...this.state.list };
list.items = items;
- this.recordChange("move", destination.index, [...list.items]);
+ this.recordChange("move", this.getIndexInList(list.items, draggableId), [...list.items]);
this.setState({ list });
} else {
const result = move(
@@ -392,7 +399,8 @@ class Manual extends React.Component {
list.items = this.fixPinnedItemsPosition(result.contentList);
articles.items = result.articles;
- this.recordChange("add", destination.index, [...list.items]);
+
+ this.recordChange("add", this.getIndexInList(list.items, draggableId), [...list.items]);
this.setState({
list,
articles,
@@ -488,7 +496,7 @@ class Manual extends React.Component {
-
+
{store.isLanguagesEnabled && (
-
+
)}
diff --git a/client/components/Output/FilterPane.jsx b/client/components/Output/FilterPane.jsx
index a7d02fa5..6c89dc91 100644
--- a/client/components/Output/FilterPane.jsx
+++ b/client/components/Output/FilterPane.jsx
@@ -3,10 +3,8 @@ import PropTypes from "prop-types";
import classNames from "classnames";
import moment from "moment";
import _ from "lodash";
-import { Button, IconButton, DatePicker } from "superdesk-ui-framework/react";
+import { Button, IconButton, DatePicker, MultiSelect, TreeSelect } from "superdesk-ui-framework/react";
-import MultiSelect from "../UI/MultiSelect";
-import AsyncMultiSelect from "../UI/AsyncMultiSelect";
import Store from "./Store";
class FilterPane extends React.Component {
@@ -88,27 +86,31 @@ class FilterPane extends React.Component {
});
};
- loadAuthors = (inputValue = null) => {
- if (inputValue && inputValue.length < 3) return this.state.authors;
+ loadAuthors = (inputValue = null, callback = null) => {
+ if (inputValue && inputValue.length < 2) callback(this.state.authors);
- return this.props.publisher
+ this.props.publisher
.queryAuthors({ term: inputValue, limit: 30 })
.then((response) => {
let authorsOptions = [];
response._embedded._items.forEach((item) => {
authorsOptions.push({
- value: item.id,
- label: item.name,
+ value: {
+ value: item.id,
+ label: item.name,
+ }
});
});
this.setState({ authors: authorsOptions });
- return authorsOptions;
+ callback(authorsOptions);
})
.catch((err) => {
- return this.state.authors;
+ callback(this.state.authors);
});
+
+ return () => { };
};
handleAuthorChange = (arr) => {
@@ -164,8 +166,11 @@ class FilterPane extends React.Component {
this.state.routes.map((route) => {
routesOptions.push({
- value: parseInt(route.id),
- label: route.name,
+ value: {
+ value: parseInt(route.id),
+ label: route.name,
+ },
+ label: route.name
});
});
@@ -173,8 +178,11 @@ class FilterPane extends React.Component {
this.state.ingestSources.items.map((source) => {
ingestSourceOptions.push({
- value: source.name,
- label: source.name,
+ value: {
+ value: source.name,
+ label: source.name,
+ },
+ label: source.name
});
});
@@ -190,40 +198,48 @@ class FilterPane extends React.Component {
}
)}
>
-
-
-
-
-
-
- Advanced Filter
-
+
+
+
+
+
+ Advanced Filter
+
+
+
+
+
+
-
-
-
+
+
this.handleRoutesChange(values)}
+ label="Routes"
+ onChange={(values) => this.handleRoutesChange(values)}
options={routesOptions}
- selectedOptions={this.state.filters.route}
+ optionLabel={(option) => option.label}
+ value={this.state.filters.route}
+ emptyFilterMessage="No routes found"
/>
-
-
-
-
this.handleAuthorChange(values)}
- loadOptions={(inputValue) =>
- this.loadAuthors(inputValue)
- }
- selectedOptions={this.state.filters.author}
+
+
+ item.label}
+ getId={(item) => item}
+ allowMultiple={true}
+ searchOptions={this.loadAuthors}
+ onChange={(values) => this.handleAuthorChange(values)}
/>
@@ -236,9 +252,9 @@ class FilterPane extends React.Component {
value={
this.state.filters.published_after
? moment(
- this.state.filters.published_after,
- "YYYY-MM-DD"
- ).toDate()
+ this.state.filters.published_after,
+ "YYYY-MM-DD"
+ ).toDate()
: null
}
dateFormat="YYYY-MM-DD"
@@ -263,9 +279,9 @@ class FilterPane extends React.Component {
value={
this.state.filters.published_before
? moment(
- this.state.filters.published_before,
- "YYYY-MM-DD"
- ).toDate()
+ this.state.filters.published_before,
+ "YYYY-MM-DD"
+ ).toDate()
: null
}
dateFormat="YYYY-MM-DD"
@@ -288,19 +304,19 @@ class FilterPane extends React.Component {
Ingest source
this.handleSourceChange(values)}
+ onChange={(values) => this.handleSourceChange(values)}
options={ingestSourceOptions}
- selectedOptions={this.state.filters.source}
+ optionLabel={(option) => option.label}
+ value={this.state.filters.source}
+ filterPlaceholder="No options found"
/>
diff --git a/client/components/Output/PreviewPane.jsx b/client/components/Output/PreviewPane.jsx
index dedf457b..6d2aaa3c 100644
--- a/client/components/Output/PreviewPane.jsx
+++ b/client/components/Output/PreviewPane.jsx
@@ -73,7 +73,7 @@ class PreviewPane extends React.Component {
let body = this.props.package.body_html;
if (this.state.loading) {
- body = renderToString(
);
+ body = renderToString(
);
}
let article = {
diff --git a/client/components/Output/PublishPane/Destination.jsx b/client/components/Output/PublishPane/Destination.jsx
index 9a1af7ce..a62fc320 100644
--- a/client/components/Output/PublishPane/Destination.jsx
+++ b/client/components/Output/PublishPane/Destination.jsx
@@ -133,11 +133,6 @@ class Destination extends React.Component {
? destination.route.name
: null}
- {!!destination.is_published_fbia && (
-
-
-
- )}
{!!destination.paywall_secured && (
@@ -238,7 +233,6 @@ class Destination extends React.Component {
)}
- {
-
{!!remainingSites.length && (
-
+
)}
-
-
Add Website
-
- {remainingSites.map((site) => (
- - this.addDestination(site)}
- >
- {site.name}
-
- ))}
-
+
+ {remainingSites.map((site) => (
+ this.addDestination(site)} />
+ ))}
diff --git a/client/components/TargetedPublishing/ContentLists.jsx b/client/components/TargetedPublishing/ContentLists.jsx
index 297870cb..d9a377e4 100644
--- a/client/components/TargetedPublishing/ContentLists.jsx
+++ b/client/components/TargetedPublishing/ContentLists.jsx
@@ -28,7 +28,6 @@ const ContentLists = (props) => {
list={list}
allContentLists={allContentLists}
save={props.save}
- ruleLists={props.ruleLists}
/>
))}
diff --git a/client/components/TargetedPublishing/Destination.jsx b/client/components/TargetedPublishing/Destination.jsx
index 6f7d0bcf..9f2d27c3 100644
--- a/client/components/TargetedPublishing/Destination.jsx
+++ b/client/components/TargetedPublishing/Destination.jsx
@@ -21,13 +21,11 @@ class Destination extends Component {
let pwaUrl = null;
let siteName = null;
let hasOutputChannel = false;
- let hasFbiaEnabled = false;
let hasPaywallEnabled = false;
let hasAppleNewsEnabled = false;
if (props.rule || props.site) {
destination = {
- is_published_fbia: false,
published: true,
paywall_secured: false,
package_guid: props.item.evolvedfrom
@@ -39,7 +37,6 @@ class Destination extends Component {
if (props.site) {
destination.tenant = props.site.code;
- hasFbiaEnabled = props.site.fbia_enabled;
hasPaywallEnabled = props.site.paywall_enabled;
hasAppleNewsEnabled =
props.site.apple_news_config &&
@@ -57,7 +54,6 @@ class Destination extends Component {
} else if (props.rule) {
destination.tenant = props.rule.tenant.code;
destination.route = props.rule.route ? props.rule.route.id : null;
- destination.is_published_fbia = props.rule.is_published_fbia;
destination.is_published_to_apple_news =
props.rule.is_published_to_apple_news;
destination.published = props.rule.published;
@@ -66,7 +62,6 @@ class Destination extends Component {
? props.rule.content_lists
: [];
- hasFbiaEnabled = props.rule.tenant.fbia_enabled;
hasPaywallEnabled = props.rule.tenant.paywall_enabled;
hasAppleNewsEnabled =
props.rule.tenant.apple_news_config &&
@@ -102,7 +97,6 @@ class Destination extends Component {
hasOutputChannel: hasOutputChannel ? hasOutputChannel : false,
hasPaywallEnabled: hasPaywallEnabled ? hasPaywallEnabled : false,
hasAppleNewsEnabled: hasAppleNewsEnabled ? true : false,
- hasFbiaEnabled: hasFbiaEnabled ? hasFbiaEnabled : false,
isOpen: props.isOpen,
deleted: false,
};
@@ -120,7 +114,6 @@ class Destination extends Component {
(props.site && !_.isEqual(props.site, prevProps.site))
) {
let destination = {
- is_published_fbia: false,
published: true,
paywall_secured: false,
package_guid: props.item.evolvedfrom
@@ -136,14 +129,12 @@ class Destination extends Component {
let pwaUrl = null;
let siteName = null;
let hasOutputChannel = false;
- let hasFbiaEnabled = false;
let hasPaywallEnabled = false;
let hasAppleNewsEnabled = false;
if (props.site) {
destination.tenant = props.site.code;
- hasFbiaEnabled = props.site.fbia_enabled;
hasPaywallEnabled = props.site.paywall_enabled;
hasAppleNewsEnabled =
props.site.apple_news_config &&
@@ -159,7 +150,6 @@ class Destination extends Component {
} else if (props.rule) {
destination.tenant = props.rule.tenant.code;
destination.route = props.rule.route ? props.rule.route.id : null;
- destination.is_published_fbia = props.rule.is_published_fbia;
destination.is_published_to_apple_news =
props.rule.is_published_to_apple_news;
destination.published = props.rule.published;
@@ -168,7 +158,6 @@ class Destination extends Component {
? props.rule.content_lists
: [];
- hasFbiaEnabled = props.rule.tenant.fbia_enabled;
hasPaywallEnabled = props.rule.tenant.paywall_enabled;
hasAppleNewsEnabled =
props.rule.tenant.apple_news_config &&
@@ -200,7 +189,6 @@ class Destination extends Component {
hasOutputChannel: hasOutputChannel,
hasPaywallEnabled: hasPaywallEnabled,
hasAppleNewsEnabled: hasAppleNewsEnabled,
- hasFbiaEnabled: hasFbiaEnabled,
isOpen: props.isOpen,
},
this.getContentLists
@@ -371,9 +359,7 @@ class Destination extends Component {
if (this.props.rule.tenant.output_channel) {
publishRoute = this.props.rule.tenant.output_channel.type;
} else {
- publishRoute = this.state.destination.is_published_fbia
- ? this.props.rule.route.name + ", Facebook"
- : this.props.rule.route.name;
+ publishRoute = this.props.rule.route.name;
}
}
@@ -478,7 +464,6 @@ class Destination extends Component {
)}
{
axios
- .get(this.props.apiUrl + "packages/seo/" + this.props.item.guid, {
+ .get(this.props.apiUrl + "packages/seo/" + this.props.item.evolvedfrom, {
headers: this.props.apiHeader
})
.then(res => {
@@ -95,8 +95,8 @@ class MetaData extends Component {
};
toggleOverlay = type => {
+ this.props.toggleOverlay();
this.setState({
- overlayOpen: !this.state.overlayOpen,
overlayType: type
});
@@ -106,37 +106,41 @@ class MetaData extends Component {
// a little hacky but there is no other way
scrollTop = () => {
let scrollElem = document.querySelector(
- "div.side-panel__content-block--overlay-panel-inside div[sd-extension-point='authoring:publish']"
+ "div.metadata-publishing-extension div[sd-extension-point='authoring:publish']"
);
- scrollElem.scrollTop = 0;
+ scrollElem?.scrollTop = 0;
};
render() {
return (
-
-
-
- this.toggleOverlay("Facebook")}
- label="Facebook"
- />
- this.toggleOverlay("Twitter")}
- label="Twitter"
- />
- this.toggleOverlay("SEO")}
- label="SEO"
- />
-
-
+ <>
+ {
+ this.props.overlayOpen === false && (
+
+
+ this.toggleOverlay("Facebook")}
+ label="Facebook"
+ />
+ this.toggleOverlay("Twitter")}
+ label="Twitter"
+ />
+ this.toggleOverlay("SEO")}
+ label="SEO"
+ />
+
+
+ )
+ }
this.toggleOverlay("")}
type={this.state.overlayType}
metaData={this.state.metaData}
@@ -144,7 +148,7 @@ class MetaData extends Component {
uploadImage={e => this.uploadImage(e)}
isUploadingInProgress={this.state.isUploadingInProgress}
/>
-
+ >
);
}
}
@@ -152,7 +156,9 @@ class MetaData extends Component {
MetaData.propTypes = {
apiUrl: PropTypes.string.isRequired,
apiHeader: PropTypes.object.isRequired,
- item: PropTypes.object.isRequired
+ item: PropTypes.object.isRequired,
+ overlayOpen: PropTypes.bool.isRequired,
+ toggleOverlay: PropTypes.func.isRequired,
};
export default MetaData;
diff --git a/client/components/TargetedPublishing/MetaDataOverlay.jsx b/client/components/TargetedPublishing/MetaDataOverlay.jsx
index 6954941d..6c5e5d35 100644
--- a/client/components/TargetedPublishing/MetaDataOverlay.jsx
+++ b/client/components/TargetedPublishing/MetaDataOverlay.jsx
@@ -1,5 +1,4 @@
import React, { Component } from "react";
-import classNames from "classnames";
import PropTypes from "prop-types";
import { IconButton } from "superdesk-ui-framework/react";
@@ -29,7 +28,7 @@ class MetaDataOverlay extends Component {
descriptionFieldName = "twitter_description";
imageHref =
this.props.metaData._links &&
- this.props.metaData._links.twitter_media_url
+ this.props.metaData._links.twitter_media_url
? this.props.metaData._links.twitter_media_url.href
: "";
}
@@ -44,25 +43,22 @@ class MetaDataOverlay extends Component {
: "";
}
- return (
-
-
+ return this.props.isOpen && (
+
-
-
-
+
+
+
+
-
- {this.props.type}
-
+
+ {this.props.type}
+
+
@@ -108,8 +104,7 @@ class MetaDataOverlay extends Component {
-
- );
+ );
}
}
@@ -121,6 +116,7 @@ MetaDataOverlay.propTypes = {
setMetaData: PropTypes.func.isRequired,
uploadImage: PropTypes.func.isRequired,
isUploadingInProgress: PropTypes.bool,
+ isOpen: PropTypes.bool,
};
export default MetaDataOverlay;
diff --git a/client/components/TargetedPublishing/RelatedArticlesStatus.jsx b/client/components/TargetedPublishing/RelatedArticlesStatus.jsx
index 50145a52..5026e741 100644
--- a/client/components/TargetedPublishing/RelatedArticlesStatus.jsx
+++ b/client/components/TargetedPublishing/RelatedArticlesStatus.jsx
@@ -16,7 +16,7 @@ class RelatedArticlesStatus extends React.Component {
}
componentDidMount() {
- if (!this.props.item.associations) return;
+ if (!this.props.item?.associations) return;
this.getRelatedArticles();
}
@@ -37,44 +37,46 @@ class RelatedArticlesStatus extends React.Component {
};
render() {
- if (!this.props.item.associations) {
+ if (!this.props.item?.associations) {
return null;
}
return (
-
- {this.state.loading && }
-
- {this.state.relatedArticles.map(article => (
- -
-
{article.title}
- {this.props.rules.map(rule => {
- let index = article.tenants.findIndex(
- t => t && t.code === rule.tenant.code
- );
- let siteDomain = rule.tenant.subdomain
- ? rule.tenant.subdomain + "." + rule.tenant.domain_name
- : rule.tenant.domain_name;
+
+
+ {this.state.loading && }
+
+ {this.state.relatedArticles.map(article => (
+ -
+
{article.title}
+ {this.props.rules.map(rule => {
+ let index = article.tenants.findIndex(
+ t => t && t.code === rule.tenant.code
+ );
+ let siteDomain = rule.tenant.subdomain
+ ? rule.tenant.subdomain + "." + rule.tenant.domain_name
+ : rule.tenant.domain_name;
- return (
- = 0
- })}
- >
- {siteDomain}
-
- );
- })}
-
- ))}
-
-
+ return (
+
= 0
+ })}
+ >
+ {siteDomain}
+
+ );
+ })}
+
+ ))}
+
+
+
);
}
}
diff --git a/client/components/TargetedPublishing/TargetedPublishing.jsx b/client/components/TargetedPublishing/TargetedPublishing.jsx
index 9bf4d84a..449d0b26 100644
--- a/client/components/TargetedPublishing/TargetedPublishing.jsx
+++ b/client/components/TargetedPublishing/TargetedPublishing.jsx
@@ -23,55 +23,57 @@ class TargetedPublishing extends React.Component {
render() {
return (
-
- {!this.props.rules.length && (
-
- No websites have been set, this article won't show up on any
- website. It will go to:
-
- Publisher > Output Control > Incoming list
-
-
- )}
- {this.props.rules.map((rule, index) => (
- this.setNewDestination({})}
- reload={this.props.reload}
- />
- ))}
+
+
+ {!this.props.rules.length && (
+
+ No websites have been set, this article won't show up on any
+ website. It will go to:
+
+ Publisher > Output Control > Incoming list
+
+
+ )}
+ {this.props.rules.map((rule, index) => (
+ this.setNewDestination({})}
+ reload={this.props.reload}
+ />
+ ))}
- {this.state.newDestination && this.state.newDestination.id && (
- this.setNewDestination({})}
+ reload={this.props.reload}
+ />
+ )}
+ {
+ this.props.reload();
+ this.setNewDestination(newDestination);
+ }}
apiHeader={this.props.apiHeader}
- config={this.props.config}
- item={this.props.item}
- cancel={() => this.setNewDestination({})}
- reload={this.props.reload}
+ apiUrl={this.props.apiUrl}
+ rules={[...this.props.rules, this.state.newDestination]}
/>
- )}
- {
- this.props.reload();
- this.setNewDestination(newDestination);
- }}
- apiHeader={this.props.apiHeader}
- apiUrl={this.props.apiUrl}
- rules={[...this.props.rules, this.state.newDestination]}
- />
-
+
+
);
}
}
diff --git a/client/components/UI/Loading/Loading.css b/client/components/UI/Loading/Loading.css
deleted file mode 100644
index 9179c7e4..00000000
--- a/client/components/UI/Loading/Loading.css
+++ /dev/null
@@ -1,53 +0,0 @@
-.spinner {
- margin: 10px auto 0;
- width: 70px;
- text-align: center;
-}
-
-.spinner > div {
- width: 10px;
- height: 10px;
- background-color: rgba(255, 255, 255, 0.5);
- border-radius: 100%;
- display: inline-block;
- -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
- animation: sk-bouncedelay 1.4s infinite ease-in-out both;
-}
-
-.spinner--dark > div {
- background-color: rgba(0, 0, 0, 0.5);
-}
-
-.spinner .bounce1 {
- -webkit-animation-delay: -0.32s;
- animation-delay: -0.32s;
-}
-
-.spinner .bounce2 {
- -webkit-animation-delay: -0.16s;
- animation-delay: -0.16s;
-}
-
-@-webkit-keyframes sk-bouncedelay {
- 0%,
- 80%,
- 100% {
- -webkit-transform: scale(0);
- }
- 40% {
- -webkit-transform: scale(1);
- }
-}
-
-@keyframes sk-bouncedelay {
- 0%,
- 80%,
- 100% {
- -webkit-transform: scale(0);
- transform: scale(0);
- }
- 40% {
- -webkit-transform: scale(1);
- transform: scale(1);
- }
-}
diff --git a/client/components/UI/Loading/Loading.jsx b/client/components/UI/Loading/Loading.jsx
index cbc390bb..9c54a3b8 100644
--- a/client/components/UI/Loading/Loading.jsx
+++ b/client/components/UI/Loading/Loading.jsx
@@ -1,19 +1,9 @@
/* eslint-disable */
import React from "react";
-import classNames from "classnames";
-import "./Loading.css";
-const Loading = ({ dark = false }) => {
+const Loading = () => {
return (
-
+
);
};
diff --git a/client/components/generic/ArticlePreview.jsx b/client/components/generic/ArticlePreview.jsx
index 016eed6f..94550a0a 100644
--- a/client/components/generic/ArticlePreview.jsx
+++ b/client/components/generic/ArticlePreview.jsx
@@ -66,12 +66,12 @@ const ArticlePreview = ({ article, close }) => {
-
-
+
+
{article.updated_at ? (
-
+
{article.paywall_secured && (
{
) : null}
-
+
{{ newSite.output_channel.type }} settings
@@ -115,7 +115,7 @@
-
PWA settings
+ PWA settings
{{ uploadError }}
Error: Something went wrong. Try again.Error: Something went wrong. Try again.
-