qumra-engine 2.0.139 → 2.0.140
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.
|
@@ -15,25 +15,14 @@ exports.default = new (class SeoExtension {
|
|
|
15
15
|
const injectionCode = (0, globals_1.getGlobal)('injectionCode');
|
|
16
16
|
const isIframe = !!env.getGlobal('isIframe');
|
|
17
17
|
const themeVersion = env.getGlobal('themeVersion');
|
|
18
|
+
const themeDevMode = env.getGlobal('themeDevMode');
|
|
18
19
|
let scripts = `
|
|
19
20
|
${injectionCode.body}
|
|
20
21
|
`;
|
|
21
|
-
if (themeVersion) {
|
|
22
|
+
if (themeVersion && themeDevMode) {
|
|
22
23
|
scripts += `
|
|
23
24
|
<script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script>
|
|
24
|
-
<script>
|
|
25
|
-
const socket = io("wss://realtime.qumra.cloud");
|
|
26
|
-
const appThemeId = '${themeVersion}'
|
|
27
|
-
|
|
28
|
-
// Join room
|
|
29
|
-
socket.emit("join", appThemeId);
|
|
30
|
-
|
|
31
|
-
// Listen for refresh event
|
|
32
|
-
socket.on(appThemeId, () => {
|
|
33
|
-
window.location.reload();
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
`;
|
|
25
|
+
<script>const socket = io("wss://realtime.qumra.cloud");const appThemeId = '${themeVersion}';socket.emit("join", appThemeId);socket.on(appThemeId, (data) => {window.location.reload();});</script>`;
|
|
37
26
|
}
|
|
38
27
|
// if (isIframe) {
|
|
39
28
|
// scripts += `<qumra-selector></qumra-selector>`;
|
|
@@ -35,6 +35,7 @@ const mergeDataMiddleware = async (req, res, next) => {
|
|
|
35
35
|
const settingsData = res.locals.render.engine?.settings;
|
|
36
36
|
res.locals.env.addGlobal("settings", settingsData);
|
|
37
37
|
res.locals.env.addGlobal("themeVersion", res.locals.render.globals?.themeVersion);
|
|
38
|
+
res.locals.env.addGlobal("themeDevMode", res.locals.render.globals?.themeDevMode);
|
|
38
39
|
next();
|
|
39
40
|
}
|
|
40
41
|
catch (err) {
|