Git details in the build
This commit is contained in:
parent
545ebe504b
commit
e2d9504d1d
|
@ -1,6 +1,9 @@
|
|||
var merge = require('webpack-merge')
|
||||
var prodEnv = require('./prod.env')
|
||||
var git = require('git-rev-sync')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"'
|
||||
NODE_ENV: '"development"',
|
||||
gitHash: '"' + git.short() + '"',
|
||||
gitDate: '"' + git.date() + '"'
|
||||
})
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
var git = require('git-rev-sync')
|
||||
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"'
|
||||
NODE_ENV: '"production"',
|
||||
gitHash: '"' + git.short() + '"',
|
||||
gitDate: '"' + git.date() + '"'
|
||||
}
|
||||
|
|
|
@ -5015,6 +5015,28 @@
|
|||
"resolved": "https://registry.npmjs.org/git-rev/-/git-rev-0.2.1.tgz",
|
||||
"integrity": "sha1-jMvSCSs0W8LJFJVIOW31SWRspj8="
|
||||
},
|
||||
"git-rev-sync": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/git-rev-sync/-/git-rev-sync-1.12.0.tgz",
|
||||
"integrity": "sha1-RGhAbH5sO6TPRYeZnhrbKNnRr1U=",
|
||||
"requires": {
|
||||
"escape-string-regexp": "1.0.5",
|
||||
"graceful-fs": "4.1.11",
|
||||
"shelljs": "0.7.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"shelljs": {
|
||||
"version": "0.7.7",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.7.tgz",
|
||||
"integrity": "sha1-svXHfvlxSPS09uImguELuoZnz/E=",
|
||||
"requires": {
|
||||
"glob": "7.1.2",
|
||||
"interpret": "1.1.0",
|
||||
"rechoir": "0.6.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
|
@ -5703,8 +5725,7 @@
|
|||
"interpret": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
|
||||
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ="
|
||||
},
|
||||
"into-stream": {
|
||||
"version": "3.1.0",
|
||||
|
@ -7551,8 +7572,7 @@
|
|||
"path-parse": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
|
||||
"dev": true
|
||||
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
|
@ -8595,7 +8615,6 @@
|
|||
"version": "0.6.2",
|
||||
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
|
||||
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"resolve": "1.7.1"
|
||||
}
|
||||
|
@ -8856,7 +8875,6 @@
|
|||
"version": "1.7.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
|
||||
"integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "1.0.5"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"body-parser": "^1.18.2",
|
||||
"cors": "^2.8.3",
|
||||
"express": "^4.16.3",
|
||||
"git-rev": "^0.2.1",
|
||||
"git-rev-sync": "^1.12.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"sails-disk": "^1.0.1",
|
||||
"socket.io": "^2.0.3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<v-app dark style="height:100%">
|
||||
<v-navigation-drawer app temporary v-model="drawer" disable-route-watcher>
|
||||
<v-navigation-drawer app temporary style="padding: 0" v-model="drawer" disable-route-watcher>
|
||||
<leftsidebar></leftsidebar>
|
||||
</v-navigation-drawer>
|
||||
<v-navigation-drawer
|
||||
|
|
|
@ -1,53 +1,71 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-list class="pa-1" dense style="background: none">
|
||||
<template>
|
||||
<v-list-tile v-if="plex && plex.user">
|
||||
<v-list-tile-avatar>
|
||||
<img class="pa-1" :src="plex.user.thumb" />
|
||||
</v-list-tile-avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title style="font-weight: bold">{{ plex.user.username }}</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-divider></v-divider>
|
||||
<v-subheader>Preferences</v-subheader>
|
||||
<v-list-tile @click.stop="ptsettingstoggle = !ptsettingstoggle">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">settings</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>SyncLounge Settings</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile v-if="plex && plex.gotDevices" @click.stop="plexsettingstoggle = !plexsettingstoggle">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">settings</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Plex Settings</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-subheader v-if="plex && plex.gotDevices" >Account</v-subheader>
|
||||
<v-list-tile :router="true" to="/signout">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">cancel</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Sign out</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-subheader >About</v-subheader>
|
||||
<v-list-tile>
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">info</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>SyncLounge v{{appVersion}}</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</template>
|
||||
</v-list>
|
||||
<v-container fill-height class="pa-0" style="height: 100%">
|
||||
<v-layout row wrap justify-space-between>
|
||||
<v-flex xs12>
|
||||
<v-list class="pa-1" dense style="background: none;">
|
||||
<template>
|
||||
<v-list-tile v-if="plex && plex.user">
|
||||
<v-list-tile-avatar>
|
||||
<img class="pa-1" :src="plex.user.thumb" />
|
||||
</v-list-tile-avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title style="font-weight: bold">{{ plex.user.username }}</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-divider></v-divider>
|
||||
<v-subheader>Preferences</v-subheader>
|
||||
<v-list-tile @click.stop="ptsettingstoggle = !ptsettingstoggle">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">settings</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>SyncLounge Settings</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile v-if="plex && plex.gotDevices" @click.stop="plexsettingstoggle = !plexsettingstoggle">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">settings</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Plex Settings</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-subheader v-if="plex && plex.gotDevices" >Account</v-subheader>
|
||||
<v-list-tile :router="true" to="/signout">
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">cancel</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>Sign out</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-subheader >About</v-subheader>
|
||||
<v-list-tile>
|
||||
<v-list-tile-action>
|
||||
<v-icon color="white">info</v-icon>
|
||||
</v-list-tile-action>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>SyncLounge v{{appVersion}}</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
||||
</template>
|
||||
</v-list>
|
||||
</v-flex>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<v-flex xs12>
|
||||
<v-layout row wrap justify-end align-end style="height: 100%">
|
||||
<v-flex xs12>
|
||||
<v-divider></v-divider>
|
||||
<div class="text-xs-center pa-2" style="opacity: 0.7; font-size: 12px">
|
||||
<div>Build #{{ hash }}</div>
|
||||
<div>Last updated {{ updatedAt }}</div>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-dialog v-model="ptsettingstoggle" width="350">
|
||||
<v-card style="background-color: #151924" class="pa-3">
|
||||
|
@ -63,12 +81,16 @@
|
|||
<plexsettings class="darken-4 pa-1" v-if="validPlex && plex.gotDevices"></plexsettings>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import ptsettings from './components/application/settings'
|
||||
import plexsettings from './components/application/plexsettings'
|
||||
|
||||
var moment = require('moment')
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ptsettings,
|
||||
|
@ -84,6 +106,15 @@ export default {
|
|||
plex: function () {
|
||||
return this.$store.getters.getPlex
|
||||
},
|
||||
hash: function () {
|
||||
return process.env.gitHash
|
||||
},
|
||||
date: function () {
|
||||
return process.env.gitDate
|
||||
},
|
||||
updatedAt: function () {
|
||||
return moment(this.date).fromNow()
|
||||
},
|
||||
chosenClient: function () {
|
||||
return this.$store.getters.getChosenClient
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue