@livx.cc/appwrap 0.50.0 → 0.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -40,6 +40,10 @@ window.__APPWRAP_DEBUG__=${SHELL_CONFIG.debug ? 'true' : 'false'};
|
|
|
40
40
|
// Debug builds only: a loud, non-interactive DEV strip pinned to the top edge showing the server
|
|
41
41
|
// this shell points at. A dev-pointing ipa (debug:true) must never be mistaken for a store/prod
|
|
42
42
|
// build — the host in the strip makes "which backend am I on?" answerable at a glance.
|
|
43
|
+
// SUPPRESSED when the env-switcher is enabled: its bottom env-banner (shown only on a NON-default
|
|
44
|
+
// env) is the better, less-intrusive "which env am I on" indicator and supersedes this strip. Apps
|
|
45
|
+
// without envSwitcher keep the strip. (Store builds never reach here — debug is false.)
|
|
46
|
+
var __appwrapDevStrip = ${SHELL_CONFIG.envSwitcher?.enabled ? 'false' : 'true'};
|
|
43
47
|
var srv = ${JSON.stringify(SHELL_CONFIG.serverUrl || '')};
|
|
44
48
|
var host = ''; try { host = srv ? new URL(srv).host : (location && location.host) || ''; } catch (e) { host = srv || ''; }
|
|
45
49
|
function mountDevStrip(){
|
|
@@ -53,8 +57,10 @@ window.__APPWRAP_DEBUG__=${SHELL_CONFIG.debug ? 'true' : 'false'};
|
|
|
53
57
|
+ 'padding:calc(env(safe-area-inset-top,0px) + 2px) 6px 2px;';
|
|
54
58
|
document.body.appendChild(el);
|
|
55
59
|
}
|
|
56
|
-
if (
|
|
57
|
-
|
|
60
|
+
if (__appwrapDevStrip) {
|
|
61
|
+
if (document.body) mountDevStrip();
|
|
62
|
+
else document.addEventListener('DOMContentLoaded', mountDevStrip);
|
|
63
|
+
}
|
|
58
64
|
})();`;
|
|
59
65
|
|
|
60
66
|
/**
|