forked from unimatrix/web
Complete V2 sign-in, permission-aware navigation and retire the V1 shell
This commit is contained in:
parent
8881216e30
commit
81836613b4
1 changed files with 153 additions and 316 deletions
|
|
@ -4,7 +4,7 @@ import {existsSync, readFileSync,writeFileSync,copyFileSync} from 'node:fs';
|
|||
import {SHARED_HEADER,SHARED_HEAD,PORTAL_SCRIPT,PORTAL_CSS,CONTEXT_SCRIPT,CONTEXT_CSS} from './portal-navigation.mjs';
|
||||
const release=process.argv[2],integrations=process.argv[3];
|
||||
if(!release||!integrations)throw Error('Provide release and integration directories');
|
||||
const cp=release+'/control-panel/public/index.html';let html=readFileSync(cp,'utf8');
|
||||
const cp=release+'/control-panel/public/cp-v2/index.html';let html=readFileSync(cp,'utf8');
|
||||
html=html.replace(/<header\b[^>]*>[\s\S]*?<\/header>/,SHARED_HEADER);
|
||||
if(!html.includes('https://www.dunerealms.com/portal-navigation.js'))html=html.replace('</head>',SHARED_HEAD+'</head>');
|
||||
writeFileSync(cp,html);
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff