Add use_bundled_gui option

This commit is contained in:
KernelDeimos 2024-04-15 17:50:44 -04:00
parent 397819d45e
commit 826ea36502
2 changed files with 7 additions and 0 deletions

View File

@ -300,6 +300,7 @@ router.all('*', async function(req, res, next) {
app_origin: APP_ORIGIN, app_origin: APP_ORIGIN,
api_origin: API_ORIGIN, api_origin: API_ORIGIN,
use_bundled_gui: config.use_bundled_gui,
manifest, manifest,
gui_path: config.assets.gui, gui_path: config.assets.gui,

View File

@ -25,6 +25,7 @@ const generate_puter_page_html = ({
manifest, manifest,
gui_path, gui_path,
use_bundled_gui,
app_origin, app_origin,
api_origin, api_origin,
@ -113,6 +114,11 @@ const generate_puter_page_html = ({
<body> <body>
<script>window.puter_gui_enabled = true;</script> <script>window.puter_gui_enabled = true;</script>
${
use_bundled_gui
? `<script>window.gui_env = 'prod';</script>`
: ''
}
${ ${
((env == 'dev' && manifest?.lib_paths) ((env == 'dev' && manifest?.lib_paths)
? manifest.lib_paths.map(path => `<script type="text/javascript" src="${path}"></script>\n`) ? manifest.lib_paths.map(path => `<script type="text/javascript" src="${path}"></script>\n`)