mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-03-02 03:40:21 +00:00
report version and usage messages
add -h|--help usage messages to laminarc and laminard add a mechanism to compile in a version number, and display the version in the help messages and in the frontend. resolves #119
This commit is contained in:
@@ -177,7 +177,7 @@
|
||||
</div></template>
|
||||
|
||||
<main id="app" style="display: grid; grid-template-rows: auto 1fr auto; height: 100%;">
|
||||
<nav id="nav-top" style="display: grid; grid-template-columns: auto auto 1fr auto; grid-gap: 15px;">
|
||||
<nav id="nav-top" style="display: grid; grid-template-columns: auto auto 1fr auto auto; grid-gap: 15px;">
|
||||
<router-link to="/" style="display: grid; grid-auto-flow: column; align-items: center; margin: 5px; font-size: 20px;">
|
||||
<img src="icon.png"> {{title}}
|
||||
</router-link>
|
||||
@@ -186,6 +186,7 @@
|
||||
<router-link v-for="(crumb,i) in _route.path.slice(1).split('/').slice(1,-1)" :to="_route.path.split('/').slice(0,i+3).join('/')">{{crumb}}</router-link>
|
||||
</div>
|
||||
<div></div>
|
||||
<span class="version">{{version}}</span>
|
||||
<div style="display: grid; align-items: center; padding: 0 15px">
|
||||
<a v-on:click="toggleNotifications(!notify)" class="nav-icon" :class="{active:notify}" v-show="supportsNotifications" :title="(notify?'Disable':'Enable')+' notifications'">
|
||||
<svg width="18" viewBox="0 0 12 12">
|
||||
|
||||
@@ -50,6 +50,7 @@ const ServerEventHandler = function() {
|
||||
comp.esReconnectInterval = 500;
|
||||
// Update html and nav titles
|
||||
document.title = comp.$root.title = msg.title;
|
||||
comp.$root.version = msg.version;
|
||||
// Calculate clock offset (used by ProgressUpdater)
|
||||
comp.$root.clockSkew = msg.time - Math.floor((new Date()).getTime()/1000);
|
||||
comp.$root.connected = true;
|
||||
@@ -726,6 +727,7 @@ new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
title: '', // populated by status ws message
|
||||
version: '',
|
||||
clockSkew: 0,
|
||||
connected: false,
|
||||
notify: 'localStorage' in window && localStorage.getItem('showNotifications') == 1
|
||||
|
||||
@@ -40,6 +40,12 @@ body {
|
||||
#nav-top a { color: var(--nav-fg); }
|
||||
#nav-top a:hover { color: white; text-decoration: none; }
|
||||
|
||||
.version {
|
||||
align-self: center;
|
||||
font-size: x-small;
|
||||
color: rgba(255,255,255,0.3);
|
||||
}
|
||||
|
||||
/* navbar svg icons (enable notifications) */
|
||||
.nav-icon { display: inherit; }
|
||||
.nav-icon svg { fill: var(--nav-fg); stroke: #000; }
|
||||
|
||||
Reference in New Issue
Block a user