backend: backend.js a 0.9.5, con lo que faltaba para los modulos nuevos
backend.js pasa a la version de 0.9.5 y baja de 1549 a 16 lineas de divergencia. Sin esto los modulos que el dev ha anadido estaban portados pero inaccesibles: no tenian rutas. Ahora /polls, /blogs y /mentions responden. Reinyectado de la rama: el enganche de fork_routes, los tres gates de movil (no abrir navegador al arrancar, no matar el sbot al borrar la cadena), el selector de chats de la barra lateral movil, y los globals de la interfaz — el filtro Personal/Community, la visibilidad de los hexagonos y el avatar de la topbar. Esos globals no aparecian al clasificar el diff y su perdida dejaba la home sin hexagonos; detectado al comparar el HTML servido. bottomBarPickerView (la pantalla de personalizar la barra) vivia en main_views y se perdia al adoptar 0.9.5. Pasa a fork/hive_nav.js, junto al resto de la interfaz de la rama, y main_views la reexporta en una linea. housing se porta pero apagado (housingMod off). Mantenerlo fuera obligaba a editar 83 referencias de backend.js en cada release; asi el fichero queda igual que upstream y el modulo no aparece en la interfaz. Se portan tambien contentPdf, housing_model y housing_view para cerrar los requires. Verificado con la app en marcha: 29 rutas OK, hexagonos 10/47 con los filtros Personal y Community dando 5 y 5, topbar con avatar, 7 accesos rapidos, orden de hojas correcto, y Karvan creando sala y sirviendo el panel de videollamada.
This commit is contained in:
parent
7eeac8b004
commit
7b90fa8211
8 changed files with 2579 additions and 347 deletions
|
|
@ -7,7 +7,7 @@
|
|||
// cada integracion. Aqui solo depende de i18n, que se inyecta porque main_views
|
||||
// lo muta en cada peticion sin reasignarlo.
|
||||
|
||||
const { a, div, img, input, label, nav, span } = require("../../server/node_modules/hyperaxe");
|
||||
const { a, button, div, form, h2, h3, img, input, label, nav, p, section, span } = require("../../server/node_modules/hyperaxe");
|
||||
const { getConfig } = require("../../configs/config-manager.js");
|
||||
const sharedState = require("../../configs/shared-state");
|
||||
|
||||
|
|
@ -180,5 +180,59 @@ module.exports = ({ i18n }) => {
|
|||
return div({ class: 'hive-nav' }, ...radios, grid, ...panels);
|
||||
};
|
||||
|
||||
return { renderMobileTopbar, renderBottomBar, renderHiveNav, PINNABLE_MODULES };
|
||||
|
||||
// pantalla para personalizar la barra inferior (/settings/bottombar)
|
||||
const bottomBarPickerView = (template) => {
|
||||
const cfg = getConfig();
|
||||
const modOn = (m) => !m || cfg.modules[m] === 'on' || cfg.modules[m] === undefined;
|
||||
const MAX = 4;
|
||||
const pinnedKeys = cfg.bottomBarPins || [];
|
||||
const pinned = pinnedKeys
|
||||
.map(key => PINNABLE_MODULES.find(m => m.key === key))
|
||||
.filter(Boolean);
|
||||
const full = pinned.length >= MAX;
|
||||
const actionForm = (action, key, cls, node) => form({ method: 'POST', action: '/settings/bottombar', class: cls },
|
||||
input({ type: 'hidden', name: 'action', value: action }),
|
||||
input({ type: 'hidden', name: 'key', value: key }),
|
||||
node
|
||||
);
|
||||
const pinnedRow = (m) => actionForm('remove', m.key, 'bb-manage-form',
|
||||
button({ type: 'submit', class: 'bb-manage-btn', 'aria-label': i18n.bbRemove || 'Remove' },
|
||||
span({ class: 'bb-manage-ico' }, m.glyph),
|
||||
span({ class: 'bb-manage-lbl' }, i18n[m.labelKey] || m.key),
|
||||
span({ class: 'bb-manage-x' }, '✕')
|
||||
)
|
||||
);
|
||||
const addBtn = (m) => actionForm('add', m.key, 'bb-pick-form',
|
||||
button({ type: 'submit', class: 'bb-pick-btn' },
|
||||
span({ class: 'bb-pick-ico' }, m.glyph),
|
||||
span({ class: 'bb-pick-lbl' }, i18n[m.labelKey] || m.key)
|
||||
)
|
||||
);
|
||||
const addable = PINNABLE_MODULES.filter(m => modOn(m.mod) && !pinnedKeys.includes(m.key));
|
||||
return template(
|
||||
i18n.bbManage || 'Edit bar',
|
||||
section(
|
||||
div({ class: 'tags-header' },
|
||||
h2(i18n.bbPickTitle || 'Customize the bar'),
|
||||
p(i18n.bbPickDesc || 'Choose up to 4 shortcuts for the bottom bar.')
|
||||
),
|
||||
div({ class: 'bb-manage' },
|
||||
h3(`${i18n.bbYourBar || 'Your bar'} (${pinned.length}/${MAX})`),
|
||||
pinned.length
|
||||
? div({ class: 'bb-manage-list' }, ...pinned.map(pinnedRow))
|
||||
: p({ class: 'bb-manage-empty' }, i18n.bbPickNone || 'None')
|
||||
),
|
||||
div({ class: 'bb-manage-add' },
|
||||
h3(i18n.bbAdd || 'Add'),
|
||||
full
|
||||
? p({ class: 'bb-manage-full' }, i18n.bbFull || 'Maximum reached')
|
||||
: div({ class: 'bb-pick-grid' }, ...addable.map(addBtn))
|
||||
),
|
||||
a({ class: 'filter-btn bb-manage-done', href: '/activity' }, i18n.bbDone || 'Done')
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
return { renderMobileTopbar, renderBottomBar, renderHiveNav, PINNABLE_MODULES, bottomBarPickerView };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue