Skip to content

Commit

Permalink
Make server info display prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Johnston committed Oct 7, 2023
1 parent 9908ffb commit 7470405
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion blog-app/src/app/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<p>Credits to <a href="https://twitter.com/mdo">@mdo</a> for the original blog theme.</p>
<p>
<p class="font-monospace">
<small>
{{ serverInfo().node }}
{{ serverInfo().slot }}
{{ serverInfo().version }}
{{ serverInfo().lb }}
</small>
</p>
2 changes: 1 addition & 1 deletion blog-app/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
const isServer = (typeof window == 'undefined') || Number.isNaN(window.scrollY + 1);
if (!isServer) {
const originNode = ('; '+document.cookie).split(`; originnode=`).pop().split(';')[0];
const decodedOriginNode = decodeURI(originNode);
const decodedOriginNode = decodeURIComponent(originNode);
const serverParts = decodedOriginNode.split(' ');
const originLb = ('; '+document.cookie).split(`; originlb=`).pop().split(';')[0];
window.serverInfo = { node: serverParts[0], slot: serverParts[1], version: serverParts[2], lb: originLb }
Expand Down

0 comments on commit 7470405

Please sign in to comment.