integrar la 1.3.5 del dev y perfiles Minimo, Acampada y Activista

Lo del dev, tal cual desde el nodejs-project de su APK oficial 1.3.5, mezclado
a tres bandas con la 1.3.3 como base. Lo que no habiamos tocado se coge entero.

Conflictos:
- backend.js: su middleware nuevo de media va delante de nuestro router.
- main_views.js y bookmark_view.js: lo suyo. Su menu de tarjeta (⋯) ya aparta
  borrar del pulgar, que era lo que hacia nuestro cambio.
- settings_view.js y tribes_view.js: lo suyo mas nuestra linea de enganche.

La 1.3.5 trae una cabecera de modulo para el movil (apkModbar) que se lleva la
primera caja de fichas, el buscador y los contadores. Con el skin Activista su
CSS (OasisMobile.css) no se carga: se le da estilo en mobile_ux.css, los avisos
suben encima con order y se ajusta la cabecera nueva de las tarjetas. Filtrar
va ahora dentro de la caja de fichas (casilla + etiqueta) para viajar con ella.

Perfiles: Minimo (6 modulos, de serie), Acampada (16), Activista (24, con
tribus, votaciones, campañas, encuestas y tareas) y despues los del dev por
numero de modulos.
This commit is contained in:
hacklab 2026-10-22 12:12:20 +02:00
parent ff91ef938c
commit 83f26ba19e
157 changed files with 6633 additions and 4710 deletions

View file

@ -27,7 +27,7 @@ const snapshotOf = (item, replies = []) => {
return out;
};
module.exports = ({ cooler, tribeCrypto, tribesModel }) => {
module.exports = ({ cooler, cryptoModel, tribesModel }) => {
let ssb;
const openSsb = async () => { if (!ssb) ssb = await cooler.open(); return ssb; };
@ -38,15 +38,15 @@ module.exports = ({ cooler, tribeCrypto, tribesModel }) => {
const fingerprintsForRoot = (rootId) => {
const fps = new Set();
for (const k of tribeCrypto.getKeys(rootId)) fps.add(tribeCrypto.fingerprint(k));
for (const k of cryptoModel.getKeys(rootId)) fps.add(cryptoModel.fingerprint(k));
return fps;
};
const wrapAndPublishContent = async (rootId, body) => {
const client = await openSsb();
const key = tribeCrypto.getKey(rootId);
const key = cryptoModel.getKey(rootId);
if (!key) throw new Error('Missing tribe key for ' + rootId);
const envelope = tribeCrypto.wrapMsg(body, key);
const envelope = cryptoModel.wrapMsg(body, key);
return new Promise((resolve, reject) =>
client.publish(envelope, (err, r) => err ? reject(err) : resolve(r))
);
@ -59,7 +59,7 @@ module.exports = ({ cooler, tribeCrypto, tribesModel }) => {
};
const decodeContentMsgs = async (msgs, opts) => {
const fpIdx = tribeCrypto.buildFingerprintIndex();
const fpIdx = cryptoModel.buildFingerprintIndex();
const targetRootId = opts && opts.rootId ? opts.rootId : null;
const wantType = opts && opts.contentType ? opts.contentType : null;
const allowedFps = targetRootId ? fingerprintsForRoot(targetRootId) : null;
@ -72,10 +72,10 @@ module.exports = ({ cooler, tribeCrypto, tribesModel }) => {
for (const m of msgs) {
const c = m.value && m.value.content;
if (!c) continue;
if (!tribeCrypto.isTribeMsg(c)) continue;
if (!cryptoModel.isSealedMsg(c)) continue;
if (allowedFps && !allowedFps.has(c.fp)) continue;
const r = tribeCrypto.unwrapMsg(c, fpIdx);
const r = cryptoModel.unwrapMsg(c, fpIdx);
if (!r || !r.body) continue;
const b = r.body;