Migrating Controller from port 8087 to 80 so that it is more discoverable. Reformatting Controller dashboard to make header at the top. Reformatting navigation bar to handle the new links which prevented Admin from being visible in some screens.

This commit is contained in:
Roland 2026-04-07 20:01:49 -06:00 • committed by lrnselfreliance
parent c316a178f9
commit e0324ce0fc
33 changed files with 302 additions and 407 deletions

View file

@ -39,11 +39,11 @@ const links = [
{text: 'Archive', to: '/archives', key: 'archive'},
{text: 'Docs', to: '/docs', key: 'docs'},
{text: 'Map', to: '/map', key: 'map'},
{text: 'Zim', to: '/zim', key: 'zim'},
{text: 'Files', to: '/files', key: 'files'},
{
text: 'More', key: 'more',
links: [
{text: 'Zim', to: '/zim', key: 'zim'},
{text: 'Inventory', to: '/inventory', key: 'inventory'},
{to: '/more/otp', text: 'One Time Pad', end: true},
{to: '/more/vin', text: 'VIN Decoder', end: true},
@ -265,7 +265,7 @@ export function NavBar() {
</React.Fragment>;
return <>
<Media at='mobile'>
<Media between={['mobile', 'wideTablet']}>
<Menu {...i} attached='top' color={navColor} id='global_navbar'>
{homeLink}
<Menu.Menu position='right'>
@ -279,7 +279,7 @@ export function NavBar() {
</Menu.Menu>
</Menu>
</Media>
<Media greaterThanOrEqual='tablet'>
<Media greaterThanOrEqual='wideTablet'>
<Menu {...i} attached='top' color={navColor} id='global_navbar'>
{homeLink}
{links.map(i => <MenuLink link={i} key={i.key}/>)}

View file

@ -9,11 +9,13 @@ export const NAME = process.env && process.env.REACT_APP_NAME ? process.env.REAC
// Other services on a WROLPi.
const port = window.location.port ? `${window.location.port.replace(/^/, '')}` : '';
export const FILES_MEDIA_URI = `https://${window.location.hostname}:${port}/media/`;
export const FILES_MEDIA_URI = `https://${window.location.hostname}${port ? ':' + port : ''}/media/`;
export const MAP_VIEWER_URI = `https://${window.location.hostname}:8084`;
export const ZIM_VIEWER_URI = `https://${window.location.hostname}:8085`;
export const HELP_VIEWER_URI = `https://${window.location.hostname}:8086`;
export const CONTROLLER_URI = `http://${window.location.hostname}:8087`; // no https
// Docker: 8080; native: 80 (default, no port needed).
const controllerPort = window.location.port === '8443' ? ':8080' : '';
export const CONTROLLER_URI = `http://${window.location.hostname}${controllerPort}`;
export const API_ARCHIVE_UPLOAD_URI = `http://${window.location.hostname}:8081/api/archive/upload`;
export let defaultFileOrder = '-published_datetime'; // Most recently published files first.