show version in grey box for every screen

This commit is contained in:
rafapaezbas
2024-02-02 12:51:13 +01:00
parent 6526255dee
commit c8cf6d82d1
2 changed files with 26 additions and 19 deletions

View File

@@ -193,6 +193,22 @@
top: 156px
}
#version {
position: fixed;
top: 95vh;
font-size: 75%;
background: #5c5c5c;
color: black;
opacity: 1;
padding: 10px;
padding-top: 5px;
padding-bottom: 0px;
border-radius: 8px;
}
#version:hover {
top: 90vh;
}
a:visited,
a:active,
@@ -272,8 +288,17 @@
<section>
<div class="col"><developer-tooling></devtools></div>
</section>
<section id="version">
<p id="platform-version"></p>
<p id="app-version"></p>
</section>
<script>
process.env.WS_NO_BUFFER_UTIL = false // Squashing an error from the 'ws' module
const { versions } = Pear
versions().then(({ app, platform }) => {
document.querySelector('#platform-version').innerText = `Pear version: ${platform.fork}.${platform.length}.${platform.key}`
document.querySelector('#app-version').innerText = `App version: ${app.fork}.${app.length}.${app.key}`
})
</script>
<script type='module' src='./lib/devtools.js'></script>
</app-router>