add link @ version read-out to sidebar

This commit is contained in:
Tomáš Mládek 2019-11-02 12:09:23 +01:00
parent f9547511d8
commit a4f6194ea2
2 changed files with 15 additions and 0 deletions

View file

@ -1,4 +1,8 @@
"use strict";
const package_json = require("../package.json")
module.exports = {
NODE_ENV: "\"production\"",
VERSION: JSON.stringify(package_json.version),
HOMEPAGE_URL: JSON.stringify(package_json.homepage)
};

View file

@ -58,6 +58,7 @@
<div class="sidebar-section player-section">
<player class="player" :width="guideSizeX" :height="guideSizeY" :offset="offset" @frames="(n)=>{slices=n}"/>
</div>
<div class="footer"><a :href="env.HOMEPAGE_URL">Version: {{env.VERSION}}</a></div>
</div>
</template>
@ -169,6 +170,10 @@ export default {
return "~" + seconds + " seconds" + (mins > 0 ? (" (" + mins + "m " + secs + "s)") : "");
}
},
env: function () {
// eslint-disable-next-line no-undef
return process.env;
},
},
methods: {
loadImage (e) {
@ -233,4 +238,10 @@ export default {
.player-section {
border-bottom: none;
}
.footer {
position: absolute;
bottom: .5em;
left: .5em;
}
</style>