@yz-social/civildefense.io 4.5.21 → 4.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -2
- package/public/about/es.html +1 -1
- package/public/javascripts/agent.js +2 -1
- package/public/javascripts/alert.js +348 -145
- package/public/javascripts/conversation.js +5 -3
- package/public/javascripts/hashtags.js +2 -1
- package/public/javascripts/map.js +1 -1
- package/public/javascripts/p2pWebNetwork.js +12 -11
- package/public/javascripts/protocol.js +15 -8
- package/public/javascripts/pubsub.js +31 -10
- package/public/javascripts/s2.js +34 -18
- package/public/javascripts/versions.js +5 -2
- package/public/service-worker.js +3 -1
- package/public/stylesheets/style.css +46 -4
- package/server/app.js +30 -10
- package/server/websocket.js +2 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yz-social/civildefense.io",
|
|
3
3
|
"description": "Browser app to safely share live sightings on a map.",
|
|
4
|
-
"version": "4.5.
|
|
4
|
+
"version": "4.5.23",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"map",
|
|
7
7
|
"browser",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "npm stop; node ./server/app.js",
|
|
12
12
|
"stop": "pkill yz.social",
|
|
13
|
+
"background": "npm stop; node ./server/app.js >server.log &",
|
|
13
14
|
"postinstall": "touch server/location.json; chmod a+w server/location.json",
|
|
14
15
|
"prepack": "mv server/location.json server/location.save.json",
|
|
15
16
|
"postpack": "mv server/location.save.json server/location.json"
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
".": "./index.js"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@axona/protocol": "github:axona-net/axona-protocol#semver:^4.
|
|
23
|
+
"@axona/protocol": "github:axona-net/axona-protocol#semver:^4.62.2",
|
|
23
24
|
"cors": "^2.8.6",
|
|
24
25
|
"express": "^4.22.1",
|
|
25
26
|
"leaflet": "^1.9.4",
|
package/public/about/es.html
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<li>Añadir comentarios, fotos, videos u otros archivos adjuntos.</li>
|
|
80
80
|
<li>Recibir notificaciones de nuevas alertas cerca de ti o en tu mapa actual.</li>
|
|
81
81
|
<li>Compartir en redes sociales, por mensaje de texto o correo electrónico.</li>
|
|
82
|
-
<li>Discutir una alerta mediante videoconferencia segura. (Disponible este
|
|
82
|
+
<li>Discutir una alerta mediante videoconferencia segura. (Disponible este invierno.)</li>
|
|
83
83
|
</ul>
|
|
84
84
|
|
|
85
85
|
<a href="/?lang=es" class="launch-btn" target="civildefense">
|
|
@@ -5,6 +5,7 @@ import { agentTopic, agentPersistKey } from './versions.js';
|
|
|
5
5
|
import { Int } from './translations.js';
|
|
6
6
|
import { consume, openDisplay } from './display.js';
|
|
7
7
|
import { networkPromise, resetInactivityTimer, clickTip, tooltip } from './main.js';
|
|
8
|
+
import { dht } from './protocol.js';
|
|
8
9
|
import { P2PWebNetwork } from './p2pWebNetwork.js';
|
|
9
10
|
|
|
10
11
|
export class Agent {
|
|
@@ -292,7 +293,7 @@ export class Agent {
|
|
|
292
293
|
static tag = null;
|
|
293
294
|
static identity = null;
|
|
294
295
|
// Keep user separate between dht=1 or empty (Axona) vs dht=0 or -1 (no Axona, for testing).
|
|
295
|
-
static usertagKey = `usertag${
|
|
296
|
+
static usertagKey = `usertag${(dht <= 0) ? '0' : ''}`;
|
|
296
297
|
static switchUser(tag, identity) { // Set/persist/ensure the current user, return Agent
|
|
297
298
|
this.tag = tag; // Before the ensure().
|
|
298
299
|
this.identity = P2PWebNetwork.currentPublishIdentity = identity;
|