Added share it
This commit is contained in:
parent
28d8f695c1
commit
cd80d72e32
9 changed files with 219 additions and 7 deletions
|
|
@ -19,6 +19,7 @@ import FromNow from '/imports/ui/components/FromNow/FromNow';
|
|||
import { dateLongFormat } from '/imports/api/Common/dates';
|
||||
import '/imports/startup/client/comments';
|
||||
import FalsePositiveTypes from '/imports/api/FalsePositives/FalsePositiveTypes';
|
||||
import ShareIt from '/imports/ui/components/ShareIt/ShareIt';
|
||||
import './Fires.scss';
|
||||
|
||||
class Fire extends React.Component {
|
||||
|
|
@ -113,6 +114,8 @@ class Fire extends React.Component {
|
|||
<p><Trans>Fuego notificado por uno de nuestros usuarios/as <FromNow {...this.props} /></Trans></p>
|
||||
}
|
||||
|
||||
<ShareIt title={this.title} />
|
||||
|
||||
{(fire.type !== 'vecinal') &&
|
||||
<Fragment>
|
||||
<h5>{t('¿No es un fuego forestal?')}</h5>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
|
|||
import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions';
|
||||
import { isNotHomeAndMobile, isChrome } from '/imports/ui/components/Utils/isMobile';
|
||||
import { isHome } from '/imports/ui/components/Utils/location';
|
||||
import ShareIt from '/imports/ui/components/ShareIt/ShareIt';
|
||||
|
||||
import './FiresMap.scss';
|
||||
|
||||
|
|
@ -137,6 +138,7 @@ class FiresMap extends React.Component {
|
|||
render() {
|
||||
const { t } = this.props;
|
||||
console.log(`Rendering ${this.props.loading ? 'loading' : 'LOADED'} map ${this.props.activefires.length + this.props.firealerts.length} of ${this.props.activefirestotal} total. False positives: ${this.props.falsePositives.length}. Subs users ready ${this.props.subsready} (${this.props.userSubs.length}), reactive ${this.state.viewport.zoom >= MAXZOOMREACTIVE}`);
|
||||
const title = `${t('AppName')}: ${t('Fuegos activos')}`;
|
||||
if (Meteor.isDevelopment) {
|
||||
console.log(`False positives total: ${this.props.falsePositivesTotal}`);
|
||||
}
|
||||
|
|
@ -148,7 +150,7 @@ class FiresMap extends React.Component {
|
|||
>
|
||||
{ !isHome() &&
|
||||
<Helmet>
|
||||
<title>{t('AppName')}: {t('Fuegos activos')}</title>
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={t('Fuegos activos en el mundo actualizados en tiempo real')} />
|
||||
</Helmet> }
|
||||
{this.props.loading || !this.props.subsready ?
|
||||
|
|
@ -255,6 +257,9 @@ class FiresMap extends React.Component {
|
|||
<p className="firesmap-footnote"><span style={{ paddingRight: '5px' }}>(*)</span><Trans i18nKey="mapPrivacy" parent="span"><em>Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.</em></Trans></p>
|
||||
</Col>
|
||||
</Row>
|
||||
{ !isHome() &&
|
||||
<ShareIt title={title} />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import 'bootstrap-carousel-swipe-haven/carousel-swipe';
|
|||
import { isAnyMobile } from '/imports/ui/components/Utils/isMobile';
|
||||
import SubscriptionEditor from '/imports/ui/components/SubscriptionEditor/SubscriptionEditor';
|
||||
import SubscriptionsMap from '/imports/ui/pages/Subscriptions/SubscriptionsMap';
|
||||
import ShareIt from '/imports/ui/components/ShareIt/ShareIt';
|
||||
import FiresMap from '../FiresMap/FiresMap';
|
||||
|
||||
import './Index.scss';
|
||||
|
|
@ -35,7 +36,10 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
$('.carousel').carousel();
|
||||
const c = $('.carousel');
|
||||
if (c.carousel) {
|
||||
c.carousel();
|
||||
}
|
||||
}
|
||||
|
||||
onResize() {
|
||||
|
|
@ -78,10 +82,11 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const title = `${t('AppName')}: ${t('Inicio')}`;
|
||||
return (
|
||||
<div className="IndexDisabled full-width">
|
||||
<Helmet>
|
||||
<title>{t('AppName')}: {t('Inicio')}</title>
|
||||
<title>{title}</title>
|
||||
</Helmet>
|
||||
{/* https://v4-alpha.getbootstrap.com/components/carousel/ */}
|
||||
<Fragment>
|
||||
|
|
@ -291,6 +296,9 @@ class Index extends Component {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-center">
|
||||
<ShareIt title={title} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Fragment>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import Loading from '/imports/ui/components/Loading/Loading';
|
|||
import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions';
|
||||
import { isChrome } from '/imports/ui/components/Utils/isMobile';
|
||||
import { isHome } from '/imports/ui/components/Utils/location';
|
||||
import ShareIt from '/imports/ui/components/ShareIt/ShareIt';
|
||||
|
||||
import './SubscriptionsMap.scss';
|
||||
|
||||
|
|
@ -85,12 +86,13 @@ class SubscriptionsMap extends React.Component {
|
|||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const title = `${t('AppName')}: ${t('Zonas vigiladas')}`;
|
||||
console.log(`Rendering Subs users ready ${this.props.subsready} subs: ${this.props.userSubs.length} viewport: ${JSON.stringify(this.state.viewport)}`);
|
||||
return (
|
||||
<Fragment>
|
||||
{ !isHome() &&
|
||||
<Helmet>
|
||||
<title>{t('AppName')}: {t('Zonas vigiladas')}</title>
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={t('Zonas vigiladas por nuestros usuari@s actualmente')} />
|
||||
</Helmet> }
|
||||
{!this.props.subsready ?
|
||||
|
|
@ -140,6 +142,9 @@ class SubscriptionsMap extends React.Component {
|
|||
<p className="subscriptionsmap-footnote"><span style={{ paddingRight: '5px' }}>(*)</span><Trans i18nKey="mapPrivacy" parent="span"><em>Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.</em></Trans></p>
|
||||
</Col>
|
||||
</Row>
|
||||
{ !isHome() &&
|
||||
<ShareIt title={title} />
|
||||
}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue