Support multiple sysops and bulletin comments; complete UI translations
Allow native SYSOP accounts to sign in independently, with an optional sysopUsers allow-list and isolated browser sessions. Keep station services on the configured service account. Add public bulletin comments that preserve category and distribution, alongside private replies to the author. Complete APRS and dynamic status translations and handle decorated button labels correctly. Document configuration and reply behavior. Add authentication, installer, bulletin reply and translation regression coverage.
This commit is contained in:
1 parent
33f1294405
commit
2ef3c25eb3
16 files changed
+298
-23
No files matched your search
+3
-2
@@ -3,7 +3,7 @@ import http from 'node:http';
|
||||
import path from 'node:path';
|
||||
import os from 'node:os';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {parseConfig,validPort} from './config.mjs';
|
||||
import {parseConfig,validPort,validateSysopUsers} from './config.mjs';
|
||||
import {parseForwarding} from './forwarding.mjs';
|
||||
import {modemFamily} from './winlink-gateways.mjs';
|
||||
|
||||
@@ -29,6 +29,7 @@ export async function prepareInstall(options={},dependencies={}){
|
||||
if(chosen!=null&&!radio)throw new Error('Porta radio selezionata non rilevata: specificare -RadioPort');
|
||||
const sysopUser=options.sysopUser??saved.sysopUser??detected.users[0].user;
|
||||
if(!detected.users.some(u=>u.user===sysopUser))throw new Error('Utente sysop non rilevato: specificare -SysopUser');
|
||||
const sysopUsers=validateSysopUsers(saved.sysopUsers,detected.users);
|
||||
let profiles=[];try{profiles=parseForwarding(await readFile(path.join(root,'BPQMailChat','BPQMail.cfg'),'utf8'),detected.ports);}catch(e){if(e.code!=='ENOENT')throw e;}
|
||||
const peers=profiles.map(p=>p.call),forwardPeer=String(options.forwardPeer??saved.forwardPeer??'').toUpperCase(),cmsPeer=String(options.cmsPeer??saved.cmsPeer??'RMS').toUpperCase();
|
||||
if(forwardPeer&&!peers.includes(forwardPeer))throw new Error('Profilo forwarding selezionato non rilevato');
|
||||
@@ -39,7 +40,7 @@ export async function prepareInstall(options={},dependencies={}){
|
||||
if(catControl&&(!radio||!modemFamily(radio.driver)))throw new Error('Winlink radio richiede un modem HF VARA, Pactor o ARDOP');
|
||||
const vara=Boolean(radio&&/^VARA/i.test(radio.driver));
|
||||
const language=options.language??previous.language??null;if(language!=null&&!['it','en'].includes(language))throw new Error('language deve essere it oppure en');
|
||||
const config={...saved,...(language?{language}:{}),nodeExe:process.execPath,bpqRoot:root,httpPort,port,radioPort:radio?.id??null,radioDriver:radio?.driver??null,sysopUser,forwardPeer,cmsPeer,varaSyslogPort:saved.varaSyslogPort??18514,varaLogPath:vara?(options.varaLogPath??(sameRadio?saved.varaLogPath:null)??null):null,winlinkRadio:{...(sameRadio?saved.winlinkRadio:{}),catControl:Boolean(catControl)}};
|
||||
const config={...saved,...(sysopUsers===undefined?{}:{sysopUsers}),...(language?{language}:{}),nodeExe:process.execPath,bpqRoot:root,httpPort,port,radioPort:radio?.id??null,radioDriver:radio?.driver??null,sysopUser,forwardPeer,cmsPeer,varaSyslogPort:saved.varaSyslogPort??18514,varaLogPath:vara?(options.varaLogPath??(sameRadio?saved.varaLogPath:null)??null):null,winlinkRadio:{...(sameRadio?saved.winlinkRadio:{}),catControl:Boolean(catControl)}};
|
||||
if(!validPort(Number(config.varaSyslogPort)))throw new Error('Porta syslog VARA non valida');
|
||||
const warnings=[];if(detected.radioPorts.length>1&&options.radioPort==null&&saved.radioPort==null)warnings.push('Più modem rilevati: selezionata la prima porta; usare -RadioPort per cambiarla.');
|
||||
if(detected.winlink&&!peers.includes(cmsPeer))warnings.push('Profilo CMS non presente: configurarlo in BPQ prima di usare il sync Winlink.');
|
||||
|
||||
Reference in new issue
Block a user