mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 14:21:13 +00:00
Adding a LEMMY_UI_DEBUG flag for eruda debugging (#624)
This commit is contained in:
parent
d3775b0247
commit
35f1e06222
1 changed files with 10 additions and 4 deletions
|
@ -171,6 +171,14 @@ server.get("/*", async (req, res) => {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const eruda = (
|
||||||
|
<>
|
||||||
|
<script src="//cdn.jsdelivr.net/npm/eruda"></script>
|
||||||
|
<script>eruda.init();</script>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
const erudaStr = process.env["LEMMY_UI_DEBUG"] ? renderToString(eruda) : "";
|
||||||
|
|
||||||
const root = renderToString(wrapper);
|
const root = renderToString(wrapper);
|
||||||
const symbols = renderToString(SYMBOLS);
|
const symbols = renderToString(SYMBOLS);
|
||||||
const cspStr = process.env.LEMMY_EXTERNAL_HOST
|
const cspStr = process.env.LEMMY_EXTERNAL_HOST
|
||||||
|
@ -187,10 +195,8 @@ server.get("/*", async (req, res) => {
|
||||||
<script>window.isoData = ${serialize(isoData)}</script>
|
<script>window.isoData = ${serialize(isoData)}</script>
|
||||||
<script>window.lemmyConfig = ${serialize(config)}</script>
|
<script>window.lemmyConfig = ${serialize(config)}</script>
|
||||||
|
|
||||||
<!-- A remote debugging utility for mobile
|
<!-- A remote debugging utility for mobile -->
|
||||||
<script src="//cdn.jsdelivr.net/npm/eruda"></script>
|
${erudaStr}
|
||||||
<script>eruda.init();</script>
|
|
||||||
-->
|
|
||||||
|
|
||||||
${helmet.title.toString()}
|
${helmet.title.toString()}
|
||||||
${helmet.meta.toString()}
|
${helmet.meta.toString()}
|
||||||
|
|
Loading…
Reference in a new issue