Add version in footer
This commit is contained in:
parent
c8cf5952f3
commit
915c5bbe53
|
@ -22,18 +22,18 @@
|
|||
"license": "GPLv3",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@angular/animations": "~5.1.0",
|
||||
"@angular/animations": "~5.2.2",
|
||||
"@angular/cli": "^1.6.0",
|
||||
"@angular/common": "~5.1.0",
|
||||
"@angular/compiler": "~5.1.0",
|
||||
"@angular/compiler-cli": "~5.1.0",
|
||||
"@angular/core": "~5.1.0",
|
||||
"@angular/forms": "~5.1.0",
|
||||
"@angular/http": "~5.1.0",
|
||||
"@angular/common": "~5.2.2",
|
||||
"@angular/compiler": "~5.2.2",
|
||||
"@angular/compiler-cli": "~5.2.2",
|
||||
"@angular/core": "~5.2.2",
|
||||
"@angular/forms": "~5.2.2",
|
||||
"@angular/http": "~5.2.2",
|
||||
"@angular/language-service": "^5.1.0",
|
||||
"@angular/platform-browser": "~5.1.0",
|
||||
"@angular/platform-browser-dynamic": "~5.1.0",
|
||||
"@angular/router": "~5.1.0",
|
||||
"@angular/platform-browser": "~5.2.2",
|
||||
"@angular/platform-browser-dynamic": "~5.2.2",
|
||||
"@angular/router": "~5.2.2",
|
||||
"@angularclass/hmr": "^2.1.3",
|
||||
"@ngx-loading-bar/http-client": "^1.0.0-rc.1",
|
||||
"@ngx-meta/core": "^5.0.0",
|
||||
|
@ -55,8 +55,8 @@
|
|||
"html-webpack-plugin": "^2.19.0",
|
||||
"lodash-es": "^4.17.4",
|
||||
"markdown-it": "^8.4.0",
|
||||
"ngx-bootstrap": "2.0.0-rc.0",
|
||||
"ngx-chips": "1.6.2",
|
||||
"ngx-bootstrap": "2.0.2",
|
||||
"ngx-chips": "1.6.3",
|
||||
"ngx-clipboard": "9.0.1",
|
||||
"ngx-infinite-scroll": "0.7.2",
|
||||
"ngx-pipes": "^2.0.5",
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<footer class="row">
|
||||
<a href="https://github.com/Chocobozzz/PeerTube" title="PeerTube on Github">PeerTube</a> -
|
||||
<a href="https://github.com/Chocobozzz/PeerTube" title="PeerTube on Github">PeerTube v{{ serverVersion }}</a> -
|
||||
<a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" title="PeerTube licence">CopyLeft 2015-2017</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
@ -29,6 +29,10 @@ export class AppComponent implements OnInit {
|
|||
private serverService: ServerService
|
||||
) {}
|
||||
|
||||
get serverVersion () {
|
||||
return this.serverService.getConfig().serverVersion
|
||||
}
|
||||
|
||||
ngOnInit () {
|
||||
this.authService.loadClientCredentials()
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ export class ServerService {
|
|||
videoLanguagesLoaded = new ReplaySubject<boolean>(1)
|
||||
|
||||
private config: ServerConfig = {
|
||||
serverVersion: 'Unknown',
|
||||
signup: {
|
||||
allowed: false
|
||||
},
|
||||
|
|
665
client/yarn.lock
665
client/yarn.lock
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,7 @@ import { asyncMiddleware, authenticate, ensureUserHasRight } from '../../middlew
|
|||
import { customConfigUpdateValidator } from '../../middlewares/validators/config'
|
||||
import { omit } from 'lodash'
|
||||
|
||||
const packageJSON = require('../../../../package.json')
|
||||
const configRouter = express.Router()
|
||||
|
||||
configRouter.get('/',
|
||||
|
@ -38,6 +39,7 @@ async function getConfig (req: express.Request, res: express.Response, next: exp
|
|||
.map(r => parseInt(r, 10))
|
||||
|
||||
const json: ServerConfig = {
|
||||
serverVersion: packageJSON.version,
|
||||
signup: {
|
||||
allowed
|
||||
},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
export interface ServerConfig {
|
||||
serverVersion: string,
|
||||
signup: {
|
||||
allowed: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue