Compare commits
17 commits
2.11.0
...
tcef-maste
| Author | SHA1 | Date | |
|---|---|---|---|
| 39415808bf | |||
| 9d92ec4f88 | |||
| 2a31435135 | |||
| 8281fa3427 | |||
|
|
ee7af168d6 | ||
|
|
4cbbe65fa3 | ||
|
|
b9457fe141 | ||
|
|
c4cb52abaf | ||
|
|
423dbc5ed9 | ||
|
|
1fdf86dd47 | ||
|
|
5f9a84dfd7 | ||
|
|
564b9e8ead | ||
|
|
df51368d50 | ||
|
|
0f6dd21541 | ||
|
|
8903c765e3 | ||
|
|
266707052c | ||
|
|
3f8bc3666b |
24 changed files with 600 additions and 686 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -12,3 +12,8 @@ public/locales/undefined/
|
||||||
.screenshots
|
.screenshots
|
||||||
.vscode
|
.vscode
|
||||||
output.json
|
output.json
|
||||||
|
|
||||||
|
# fase-0 higiene: variantes de settings con secretos (no versionar)
|
||||||
|
settings-production-*.json
|
||||||
|
settings-tests.json
|
||||||
|
*.json~
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ TEST_PORT=3000 TEST_WATCH=1 TEST_CLIENT=0 MONGO_URL=mongodb://localhost:27017/fu
|
||||||
|
|
||||||
# and
|
# and
|
||||||
|
|
||||||
chimp --watch --ddp=http://localhost:3000 --path=cucumber
|
node_modules/.bin/chimp --watch --ddp=http://localhost:3000 --path=cucumber
|
||||||
|
|
||||||
# and
|
# and
|
||||||
|
|
||||||
chimp --ddp=http://localhost:3000 --path=cucumber
|
node_modules/.bin/chimp --ddp=http://localhost:3000 --path=cucumber
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
29
cucumber/chimp-config.js
Normal file
29
cucumber/chimp-config.js
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
module.exports = {
|
||||||
|
// - - - - CHIMP - - - -
|
||||||
|
/* watch: false,
|
||||||
|
* watchTags: '@watch',
|
||||||
|
* offline: false,
|
||||||
|
*/
|
||||||
|
// - - - - CUCUMBER - - - -
|
||||||
|
/* path: './features',
|
||||||
|
* jsonOutput: 'output.json', */
|
||||||
|
|
||||||
|
// '- - - - DEBUGGING - - - -
|
||||||
|
log: 'info',
|
||||||
|
debug: false,
|
||||||
|
seleniumDebug: false,
|
||||||
|
webdriverLogLevel: false,
|
||||||
|
// debugBrkCucumber: 5858,
|
||||||
|
// - - - - WEBDRIVER-IO - - - -
|
||||||
|
webdriverio: {
|
||||||
|
waitforTimeout: 10000,
|
||||||
|
waitforInterval: 250, // KEEP SMALL (!!!) this is the INTERVAL in which waitFor* is looped fo
|
||||||
|
desiredCapabilities: {
|
||||||
|
chromeOptions: {
|
||||||
|
// args: ["headless", "disable-gpu"]
|
||||||
|
args: ['--disable-gpu', '--no-sandbox', '--headless']
|
||||||
|
},
|
||||||
|
isHeadless: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -40,7 +40,6 @@ Feature: Test all secundary pages
|
||||||
| fire/Fe26.2**1a0361ed0384f741403682e26b4bbc3850bee24e775da13c9782b22365ea895f*r_3gmVad5vzkeyqPpo6UcA*1s5fFz3iDGKTYP2RCvXMshof00QCHf4ErDl9K2dxoX0u-J-t6scyOWG8pGp3ehg_FfEtyR_kYcEKU3rE0jaSlZbD09TIvhiIJeS3C6Uc8YD-rit0XBrgsVKfYSxKzTRoOYiYFJ8JYd298hMtfiASePjS05Z58hhicyCcJYYRlarqDScG3LiVY3lL5y2nfcdIMNuSjCiKOJWuMkxwd9nR1UHMudLl0hEoy56mPdnHpDYtP9IYUlIOk1LlWBxcmHKifbXeqHu94p8j13Kk20dh2R49Hw3KsSoE9UbWmGQA9wAZXT82301i3rGF5GPAKjlTlRYcWisQurnPwHSVmx3DhUdiYwKGxt4KeaM5QVI4BE9octvE41OOprB_-Il105diQEh2Y9vdvX51ZVWIRfCboICPM6rJb0Oin7U7F1iM-oD_5s3DGnelfM5LGBcKwiB5paMo5M5vdBMaO-zR216cW9yGVXw9IZqHx8xDQWnoHAZjt8NLHeiGF2QOmIGtEUH7qnwhGpkcvszajmAZzR8saZgoH1qfBfvpVA41YfV14gU**4d030f05e23ad75409cebc609107467fc60be5077d52cf041087cd024fc4dc45*GY97aGFc1MyAsoO3Qxqtgwk9j-MbAPdEGBmEHq6r8VU | Additional information | false |
|
| fire/Fe26.2**1a0361ed0384f741403682e26b4bbc3850bee24e775da13c9782b22365ea895f*r_3gmVad5vzkeyqPpo6UcA*1s5fFz3iDGKTYP2RCvXMshof00QCHf4ErDl9K2dxoX0u-J-t6scyOWG8pGp3ehg_FfEtyR_kYcEKU3rE0jaSlZbD09TIvhiIJeS3C6Uc8YD-rit0XBrgsVKfYSxKzTRoOYiYFJ8JYd298hMtfiASePjS05Z58hhicyCcJYYRlarqDScG3LiVY3lL5y2nfcdIMNuSjCiKOJWuMkxwd9nR1UHMudLl0hEoy56mPdnHpDYtP9IYUlIOk1LlWBxcmHKifbXeqHu94p8j13Kk20dh2R49Hw3KsSoE9UbWmGQA9wAZXT82301i3rGF5GPAKjlTlRYcWisQurnPwHSVmx3DhUdiYwKGxt4KeaM5QVI4BE9octvE41OOprB_-Il105diQEh2Y9vdvX51ZVWIRfCboICPM6rJb0Oin7U7F1iM-oD_5s3DGnelfM5LGBcKwiB5paMo5M5vdBMaO-zR216cW9yGVXw9IZqHx8xDQWnoHAZjt8NLHeiGF2QOmIGtEUH7qnwhGpkcvszajmAZzR8saZgoH1qfBfvpVA41YfV14gU**4d030f05e23ad75409cebc609107467fc60be5077d52cf041087cd024fc4dc45*GY97aGFc1MyAsoO3Qxqtgwk9j-MbAPdEGBmEHq6r8VU | Additional information | false |
|
||||||
Then I check that all page urls works properly
|
Then I check that all page urls works properly
|
||||||
|
|
||||||
@watch
|
|
||||||
Scenario: Check that other non visible pages work well
|
Scenario: Check that other non visible pages work well
|
||||||
Given I logout if logged
|
Given I logout if logged
|
||||||
And a list of non visible pages ids and contents
|
And a list of non visible pages ids and contents
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,14 @@ Meteor.publish('activefiresunionmyloc', function activeInMyLoc(northEastLng, nor
|
||||||
check(northEastLat, NumberBetween(-90, 90));
|
check(northEastLat, NumberBetween(-90, 90));
|
||||||
check(withMarks, Boolean);
|
check(withMarks, Boolean);
|
||||||
|
|
||||||
if (!Meteor.isDevelopment) return this.ready(); // empty
|
// I use this for fire stats
|
||||||
|
// if (!Meteor.isDevelopment) return this.ready(); // empty
|
||||||
return activeFiresUnion(northEastLng, northEastLat, southWestLng, southWestLat, withMarks);
|
return activeFiresUnion(northEastLng, northEastLat, southWestLng, southWestLat, withMarks);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Warning: this increase always by one the fire stats
|
// Warning: this increase always by one the fire stats
|
||||||
Meteor.publish('lastFireUnionDetected', function lastFireDetected() {
|
Meteor.publish('lastFireUnionDetected', function lastFireDetected() {
|
||||||
if (!Meteor.isDevelopment) return this.ready(); // empty
|
// I use this for fire stats
|
||||||
|
// if (!Meteor.isDevelopment) return this.ready(); // empty
|
||||||
return ActiveFiresUnion.find({}, { limit: 1, sort: { when: -1 } });
|
return ActiveFiresUnion.find({}, { limit: 1, sort: { when: -1 } });
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
import { Meteor } from 'meteor/meteor';
|
import { Meteor } from 'meteor/meteor';
|
||||||
import { check } from 'meteor/check';
|
import { check } from 'meteor/check';
|
||||||
import { NumberBetween } from '/imports/modules/server/other-checks';
|
import { NumberBetween } from '/imports/modules/server/other-checks';
|
||||||
import L from 'leaflet-headless';
|
import '/imports/startup/server/leaflet-workaround.js';
|
||||||
|
import L from 'leaflet';
|
||||||
import calcUnion from '/imports/ui/components/Maps/SubsUnion/Unify';
|
import calcUnion from '/imports/ui/components/Maps/SubsUnion/Unify';
|
||||||
import Industries from '/imports/api/Industries/Industries';
|
import Industries from '/imports/api/Industries/Industries';
|
||||||
import FalsePositives from '../FalsePositives';
|
import FalsePositives from '../FalsePositives';
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ export function fireFromHash(fireEnc, params) {
|
||||||
// const unsealed = Promise.await(urlEnc.decrypt(fireEnc));
|
// const unsealed = Promise.await(urlEnc.decrypt(fireEnc));
|
||||||
const unsealed = Promise.await(unsealW(fireEnc));
|
const unsealed = Promise.await(unsealW(fireEnc));
|
||||||
if (unsealed === undefined) {
|
if (unsealed === undefined) {
|
||||||
throw Error('Undefined unsealed');
|
throw Error(`Fail to unseal '${fireEnc}'`);
|
||||||
}
|
}
|
||||||
const w = unsealed.when;
|
const w = unsealed.when;
|
||||||
unsealed.when = new Date(w);
|
unsealed.when = new Date(w);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,18 @@ function imgUrl(lat, lng) {
|
||||||
return `<img src="${imgUrl(lat, lng)}" width="640" height="480"/>`;
|
return `<img src="${imgUrl(lat, lng)}" width="640" height="480"/>`;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
|
// Cutover flag (fase 1a): channels listed in
|
||||||
|
// Meteor.settings.private.notifDisabledChannels (e.g. ['mobile','web']) are
|
||||||
|
// handled by the tcef-notifications microservice, so the old observer/cron must
|
||||||
|
// NOT send them. Mutual exclusion per channel — reversible by editing settings,
|
||||||
|
// no code deploy needed. ES5-compatible on purpose (Meteor 1.6 / Node 8).
|
||||||
|
const notifDisabledChannels = (Meteor.settings.private && Meteor.settings.private.notifDisabledChannels) || [];
|
||||||
|
|
||||||
const processNotif = (notif) => {
|
const processNotif = (notif) => {
|
||||||
|
if (notifDisabledChannels.indexOf(notif.type) !== -1) {
|
||||||
|
// This channel was migrated to tcef-notifications; do nothing here.
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isMailServerMaster && validFcmSender && notif.type === 'mobile' && notif.notified !== true) {
|
if (isMailServerMaster && validFcmSender && notif.type === 'mobile' && notif.notified !== true) {
|
||||||
const fcmSender = new gcm.Sender(Meteor.settings.private.fcmApiToken);
|
const fcmSender = new gcm.Sender(Meteor.settings.private.fcmApiToken);
|
||||||
const user = Meteor.users.findOne({ _id: notif.userId });
|
const user = Meteor.users.findOne({ _id: notif.userId });
|
||||||
|
|
|
||||||
|
|
@ -17,5 +17,4 @@ import './prerender';
|
||||||
import './feedback';
|
import './feedback';
|
||||||
import './cron';
|
import './cron';
|
||||||
import './isMaster';
|
import './isMaster';
|
||||||
import './segfaults';
|
|
||||||
import './rest';
|
import './rest';
|
||||||
|
|
|
||||||
19
imports/startup/server/leaflet-workaround.js
Normal file
19
imports/startup/server/leaflet-workaround.js
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
// imports/startup/server/leaflet-workaround.js
|
||||||
|
global.window = {
|
||||||
|
screen: {
|
||||||
|
deviceXDPI: 1,
|
||||||
|
logicalXDPI: 1
|
||||||
|
}
|
||||||
|
};
|
||||||
|
global.document = {
|
||||||
|
documentElement: {
|
||||||
|
style: {}
|
||||||
|
},
|
||||||
|
createElement: () => {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
global.navigator = {
|
||||||
|
userAgent: 'foo',
|
||||||
|
platform: 'bar'
|
||||||
|
};
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
import SegfaultHandler from 'segfault-handler';
|
|
||||||
import moment from 'moment';
|
|
||||||
// import ravenLogger from './ravenLogger';
|
|
||||||
|
|
||||||
// https://github.com/ddopson/node-segfault-handler
|
|
||||||
|
|
||||||
const dateFileFormat = moment().format('YYYYMMDD_HH:mm:ss');
|
|
||||||
|
|
||||||
SegfaultHandler.registerHandler(`/var/tmp/tcef-stacktrace-${dateFileFormat}.log`);
|
|
||||||
|
|
||||||
|
|
||||||
// This callaback does not work:
|
|
||||||
// https://github.com/ddopson/node-segfault-handler/issues/49
|
|
||||||
|
|
||||||
/* SegfaultHandler.registerHandler('/var/tmp/tcef-crash.log', (signal, address, stack) => {
|
|
||||||
* // Do what you want with the signal, address, or stack (array)
|
|
||||||
* // This callback will execute before the signal is forwarded on.
|
|
||||||
* ravenLogger.log(stack, signal);
|
|
||||||
* }); */
|
|
||||||
|
|
||||||
// Only uncomment for segv tests
|
|
||||||
// SegfaultHandler.causeSegfault();
|
|
||||||
|
|
||||||
// Or this for normal error (should go to raven in configured)
|
|
||||||
// throw new Error('This is just a test of error in server');
|
|
||||||
|
|
@ -4,7 +4,8 @@ import { Meteor } from 'meteor/meteor';
|
||||||
import Subscriptions from '/imports/api/Subscriptions/Subscriptions';
|
import Subscriptions from '/imports/api/Subscriptions/Subscriptions';
|
||||||
import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
|
import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
|
||||||
import Perlin from 'loms.perlin';
|
import Perlin from 'loms.perlin';
|
||||||
import L from 'leaflet-headless';
|
import './leaflet-workaround';
|
||||||
|
import L from 'leaflet';
|
||||||
import calcUnion from '/imports/ui/components/Maps/SubsUnion/Unify';
|
import calcUnion from '/imports/ui/components/Maps/SubsUnion/Unify';
|
||||||
import { isMailServerMaster } from '/imports/startup/server/email';
|
import { isMailServerMaster } from '/imports/startup/server/email';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ class DefMapLayers extends Component {
|
||||||
<TileLayer
|
<TileLayer
|
||||||
opacity={defOpacity}
|
opacity={defOpacity}
|
||||||
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
attribution="© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors"
|
||||||
url="https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png"
|
// url="https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png"
|
||||||
|
url="https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"
|
||||||
/>
|
/>
|
||||||
</BaseLayer>);
|
</BaseLayer>);
|
||||||
const osmlayer = (
|
const osmlayer = (
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class FireCircleMark extends Component {
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const rect = rectangleAround({ lat, lon }, track, track);
|
const rect = rectangleAround({ lat, lon }, track, track);
|
||||||
return (
|
return (
|
||||||
<GeoJSON data={rect} color="red" stroke width="1" opacity=".4" fillOpacity=".3">
|
<GeoJSON data={rect} color="red" stroke width="1" opacity=".4" fillOpacity="1">
|
||||||
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
<FirePopup t={t} history={history} id={id} nasa={nasa} lat={lat} lon={lon} when={when} />
|
||||||
</GeoJSON>
|
</GeoJSON>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ import { calcUnion as calcUnionWoBounds } from 'map-common-utils';
|
||||||
|
|
||||||
const calcUnion = (L, subs, decorated, typeCircle) => {
|
const calcUnion = (L, subs, decorated, typeCircle) => {
|
||||||
const unionJson = calcUnionWoBounds(subs, decorated, typeCircle);
|
const unionJson = calcUnionWoBounds(subs, decorated, typeCircle);
|
||||||
return [unionJson, L.geoJSON(unionJson).getBounds()];
|
// return [unionJson, L.geoJSON(unionJson).getBounds()];
|
||||||
|
return [unionJson, unionJson === null ? null : L.geoJSON(unionJson).getBounds()];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default calcUnion;
|
export default calcUnion;
|
||||||
|
|
|
||||||
|
|
@ -98,66 +98,66 @@ const App = props => (
|
||||||
/* https://react.i18next.com/components/i18nextprovider.html */
|
/* https://react.i18next.com/components/i18nextprovider.html */
|
||||||
<div>
|
<div>
|
||||||
{props.i18nReady.get() &&
|
{props.i18nReady.get() &&
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<I18nextProvider i18n={i18n}>
|
<I18nextProvider i18n={i18n}>
|
||||||
<ErrorBoundary appName={i18n.t('AppNameFull')} title={i18n.t('general-error-title')} subTitle={i18n.t('general-error-description')}>
|
<ErrorBoundary appName={i18n.t('AppNameFull')} title={i18n.t('general-error-title')} subTitle={i18n.t('general-error-description')}>
|
||||||
<Router history={history}>
|
<Router history={history}>
|
||||||
<LocationListener>
|
<LocationListener>
|
||||||
{ !props.loading &&
|
{ !props.loading &&
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
<title>{i18n.t('AppName')}</title>
|
<title>{i18n.t('AppName')}</title>
|
||||||
<meta name="description" content={`${i18n.t('AppDescrip')}: ${i18n.t('AppDescripLong')}`} />
|
<meta name="description" content={`${i18n.t('AppDescrip')}: ${i18n.t('AppDescripLong')}`} />
|
||||||
<link rel="alternate" href={`https://fires.comunes.org${history.location.pathname}`} hrefLang="en" />
|
<link rel="alternate" href={`https://fires.comunes.org${history.location.pathname}`} hrefLang="en" />
|
||||||
<link rel="alternate" href={`https://fuegos.comunes.org${history.location.pathname}`} hrefLang="es" />
|
<link rel="alternate" href={`https://fuegos.comunes.org${history.location.pathname}`} hrefLang="es" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<Navigation {...props} />
|
<Navigation {...props} />
|
||||||
<ReSendEmail {...props} />
|
<ReSendEmail {...props} />
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact name="index" path="/" component={Index} />
|
<Route exact name="index" path="/" component={Index} />
|
||||||
<Authenticated exact path="/subscriptions" component={Subscriptions} {...props} />
|
<Authenticated exact path="/subscriptions" component={Subscriptions} {...props} />
|
||||||
<Authenticated exact path="/subscriptions/new" component={NewSubscription} {...props} />
|
<Authenticated exact path="/subscriptions/new" component={NewSubscription} {...props} />
|
||||||
<Authenticated exact path="/subscriptions/:_id" component={ViewSubscription} {...props} />
|
<Authenticated exact path="/subscriptions/:_id" component={ViewSubscription} {...props} />
|
||||||
<Authenticated exact path="/subscriptions/:_id/edit" component={EditSubscription} {...props} />
|
<Authenticated exact path="/subscriptions/:_id/edit" component={EditSubscription} {...props} />
|
||||||
<Authenticated exact path="/profile" component={Profile} {...props} />
|
<Authenticated exact path="/profile" component={Profile} {...props} />
|
||||||
<Authenticated exact path="/status" component={Status} {...props} />
|
<Authenticated exact path="/status" component={Status} {...props} />
|
||||||
<Route path="/fires" component={FiresMap} industries={false} {...props} />
|
<Route path="/fires" component={FiresMap} industries={false} {...props} />
|
||||||
<Route path="/zones" component={ZonesMap} {...props} />
|
<Route path="/zones" component={ZonesMap} {...props} />
|
||||||
|
|
||||||
<Route path="/fire/:type(active|archive|alert)/:id" component={Fires} {...props} />
|
<Route path="/fire/:type(active|archive|alert)/:id" component={Fires} {...props} />
|
||||||
<Route path="/fire/:id" component={Fires} {...props} />
|
<Route path="/fire/:id" component={Fires} {...props} />
|
||||||
<Public path="/auth/:token" component={Auth} {...props} />
|
<Public path="/auth/:token" component={Auth} {...props} />
|
||||||
<Public path="/signup" component={Signup} {...props} />
|
<Public path="/signup" component={Signup} {...props} />
|
||||||
<Public path="/login" component={Login} {...props} />
|
<Public path="/login" component={Login} {...props} />
|
||||||
<Route path="/logout" component={Logout} {...props} />
|
<Route path="/logout" component={Logout} {...props} />
|
||||||
<Route path="/sandbox" component={Sandbox} {...props} />
|
<Route path="/sandbox" component={Sandbox} {...props} />
|
||||||
<Route path="/error" component={TestError} {...props} />
|
<Route path="/error" component={TestError} {...props} />
|
||||||
|
|
||||||
<Route name="verify-email" path="/verify-email/:token" component={VerifyEmail} />
|
<Route name="verify-email" path="/verify-email/:token" component={VerifyEmail} />
|
||||||
<Route name="recover-password" path="/recover-password" component={RecoverPassword} />
|
<Route name="recover-password" path="/recover-password" component={RecoverPassword} />
|
||||||
<Route name="reset-password" path="/reset-password/:token" component={ResetPassword} />
|
<Route name="reset-password" path="/reset-password/:token" component={ResetPassword} />
|
||||||
<Route name="terms" path="/terms" component={Terms} />
|
<Route name="terms" path="/terms" component={Terms} />
|
||||||
<Route name="privacy" path="/privacy" component={Privacy} />
|
<Route name="privacy" path="/privacy" component={Privacy} />
|
||||||
<Route name="license" path="/license" component={License} />
|
<Route name="license" path="/license" component={License} />
|
||||||
<Route name="credits" path="/credits" component={Credits} />
|
<Route name="credits" path="/credits" component={Credits} />
|
||||||
<Route name="about" path="/about" component={About} />
|
<Route name="about" path="/about" component={About} />
|
||||||
|
|
||||||
<Route component={NotFound} />
|
<Route component={NotFound} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Footer />
|
<Footer />
|
||||||
<Reconnect {...props} />
|
<Reconnect {...props} />
|
||||||
<Feedback {...props} />
|
<Feedback {...props} />
|
||||||
{props.i18nReady.get() && <Blaze template="cookieConsent" /> }
|
{props.i18nReady.get() && <Blaze template="cookieConsent" /> }
|
||||||
</div>}
|
</div>}
|
||||||
</LocationListener>
|
</LocationListener>
|
||||||
</Router>
|
</Router>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
</ErrorBoundary> }
|
</ErrorBoundary> }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -186,7 +186,9 @@ export default withTracker(() => {
|
||||||
const loading = !Roles.subscription.ready() || !i18nReady.get();
|
const loading = !Roles.subscription.ready() || !i18nReady.get();
|
||||||
const name = user && user.profile && user.profile.name && getUserName(user.profile.name);
|
const name = user && user.profile && user.profile.name && getUserName(user.profile.name);
|
||||||
const emailAddress = user && user.emails && user.emails[0].address;
|
const emailAddress = user && user.emails && user.emails[0].address;
|
||||||
// console.log(`i18n ready?: ${i18nReady.get()}`);
|
Meteor.autorun(() => {
|
||||||
|
console.log(`i18n ready?: ${i18nReady.get()}`);
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
loading,
|
loading,
|
||||||
loggingIn,
|
loggingIn,
|
||||||
|
|
|
||||||
|
|
@ -140,13 +140,12 @@ class Fire extends React.Component {
|
||||||
>
|
>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<GeoJSON
|
<GeoJSON
|
||||||
|
ref={(circle) => { this.circle = circle; this.handleLeafletCircleLoad(circle); }}
|
||||||
data={rect}
|
data={rect}
|
||||||
color="red"
|
color="red"
|
||||||
stroke
|
stroke
|
||||||
width="1"
|
width="1"
|
||||||
|
|
||||||
fillOpacity="0.0"
|
fillOpacity="0.0"
|
||||||
ref={(circle) => { this.circle = circle; this.handleLeafletCircleLoad(circle); }}
|
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
<FireList
|
<FireList
|
||||||
|
|
|
||||||
|
|
@ -84,19 +84,6 @@ class FiresMap extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* shouldComponentUpdate(nextProps, nextState) {
|
|
||||||
* const notMoving = !nextState.moving;
|
|
||||||
* const markersChanged = this.state.useMarkers !== nextState.useMarkers;
|
|
||||||
* const unionChanged = this.state.showSubsUnion !== nextState.showSubsUnion;
|
|
||||||
* const otherViewport = this.state.viewport !== nextState.viewport;
|
|
||||||
* // const init = nextState.viewport.center === [0, 0];
|
|
||||||
* // console.log(notMoving ? 'Not moving map' : 'Moving map');
|
|
||||||
* // console.log(otherViewport ? 'Other viewport' : 'Not other viewport');
|
|
||||||
* console.log(`${otherViewport ? 'OTHER' : 'Not other'} viewport ${nextState.viewport.center} zoom: ${nextState.viewport.zoom}`);
|
|
||||||
* return this.state.init || (notMoving && otherViewport && this.state.moved) || unionChanged || markersChanged;
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
const notMoving = !nextState.moving;
|
const notMoving = !nextState.moving;
|
||||||
return notMoving;
|
return notMoving;
|
||||||
|
|
@ -249,7 +236,7 @@ class FiresMap extends React.Component {
|
||||||
<p className="firesmap-legend">
|
<p className="firesmap-legend">
|
||||||
{ (this.props.activefires.length + this.props.firealerts.length) === 0 ?
|
{ (this.props.activefires.length + this.props.firealerts.length) === 0 ?
|
||||||
<Fragment><Trans parent="span" i18nKey="noActiveFireInMapCount">No hay fuegos activos en esta zona del mapa. <strong>{{ countTotal: this.props.activefirestotal }}</strong> fuegos activos en el mundo.</Trans> <FireStats loadingAll={loading} {... this.props} /></Fragment> :
|
<Fragment><Trans parent="span" i18nKey="noActiveFireInMapCount">No hay fuegos activos en esta zona del mapa. <strong>{{ countTotal: this.props.activefirestotal }}</strong> fuegos activos en el mundo.</Trans> <FireStats loadingAll={loading} {... this.props} /></Fragment> :
|
||||||
<Fragment><Trans parent="span" i18nKey="activeFireInMapCount">En rojo, <strong>{{ count: this.props.activefires.length + this.props.firealerts.length }}</strong> fuegos activos. <strong>{{ countTotal: this.props.activefirestotal }}</strong> fuegos activos en el mundo.</Trans> <FireStats loadingAll={loading} {... this.props} /></Fragment>
|
<Fragment><Trans parent="span" i18nKey="activeFireInMapCount">En rojo, <strong>{{ count: this.props.activefiresunion.length + this.props.firealerts.length }}</strong> fuegos activos. <strong>{{ countTotal: this.props.activefirestotal }}</strong> fuegos activos en el mundo.</Trans> <FireStats loadingAll={loading} {... this.props} /></Fragment>
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
{isNotHomeAndMobile() && this.props.firealerts.length > 0 &&
|
{isNotHomeAndMobile() && this.props.firealerts.length > 0 &&
|
||||||
|
|
|
||||||
|
|
@ -182,9 +182,9 @@ class Index extends Component {
|
||||||
</div>
|
</div>
|
||||||
<p className="moto"><Trans>Siempre alerta a los fuegos en nuestro vecindario</Trans></p>
|
<p className="moto"><Trans>Siempre alerta a los fuegos en nuestro vecindario</Trans></p>
|
||||||
{/* <Link className="participe-btn btn btn-lg btn-warning" role="button" to="/#platforms">{this.props.t('Participa')}</Link> */}
|
{/* <Link className="participe-btn btn btn-lg btn-warning" role="button" to="/#platforms">{this.props.t('Participa')}</Link> */}
|
||||||
<p>
|
<div className="android-btn">
|
||||||
<MobileStoreButton store="android" url={androidUrl} />
|
<MobileStoreButton store="android" url={androidUrl} />
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.android-btn > div {
|
||||||
|
height: 50px !important;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,8 @@ class SubscriptionsMap extends React.Component {
|
||||||
|
|
||||||
handleLeafletLoad(map) {
|
handleLeafletLoad(map) {
|
||||||
// console.log('Map loading');
|
// console.log('Map loading');
|
||||||
// console.log(map);
|
if (map && this.props.userSubs !== 'null') {
|
||||||
if (map) {
|
// console.log(`Union of ${this.props.userSubs}`);
|
||||||
this.state.union = subsUnion(this.state.union, {
|
this.state.union = subsUnion(this.state.union, {
|
||||||
map,
|
map,
|
||||||
subs: this.props.userSubs,
|
subs: this.props.userSubs,
|
||||||
|
|
|
||||||
1017
package-lock.json
generated
1017
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "tcef",
|
"name": "tcef",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "QT_QPA_PLATFORM='' MONGO_URL=mongodb://localhost:27017/fuegos meteor --settings settings-development.json",
|
"start": "QT_QPA_PLATFORM='' MONGO_URL=mongodb://fuegos:fuegos@localhost:27017/fuegos meteor --settings settings-development.json",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
"juice": "^4.2.2",
|
"juice": "^4.2.2",
|
||||||
"leaflet": "^1.3.1",
|
"leaflet": "^1.3.1",
|
||||||
"leaflet-graphicscale": "0.0.2",
|
"leaflet-graphicscale": "0.0.2",
|
||||||
"leaflet-headless": "^0.2.6",
|
|
||||||
"leaflet-sleep": "^0.5.1",
|
"leaflet-sleep": "^0.5.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"loms.perlin": "^1.0.1",
|
"loms.perlin": "^1.0.1",
|
||||||
|
|
@ -83,7 +82,6 @@
|
||||||
"react-router-hash-link": "^1.1.1",
|
"react-router-hash-link": "^1.1.1",
|
||||||
"react-share": "^2.0.0",
|
"react-share": "^2.0.0",
|
||||||
"reactstrap": "^5.0.0-alpha.3",
|
"reactstrap": "^5.0.0-alpha.3",
|
||||||
"segfault-handler": "^1.0.0",
|
|
||||||
"simpl-schema": "^1.5.0",
|
"simpl-schema": "^1.5.0",
|
||||||
"simple-line-icons": "^2.4.1",
|
"simple-line-icons": "^2.4.1",
|
||||||
"store": "^2.0.12",
|
"store": "^2.0.12",
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3346b6db70c153b1dd66e6a16a0ad28f10ebf740
|
Subproject commit 4761da921f467838a2c01b34e84a7703ee49b12c
|
||||||
Loading…
Add table
Add a link
Reference in a new issue