1
0
Fork 0

Add version in footer

This commit is contained in:
Chocobozzz 2018-01-31 10:19:34 +01:00
parent c8cf5952f3
commit 915c5bbe53
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
7 changed files with 392 additions and 307 deletions

View File

@ -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",

View File

@ -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>

View File

@ -29,6 +29,10 @@ export class AppComponent implements OnInit {
private serverService: ServerService
) {}
get serverVersion () {
return this.serverService.getConfig().serverVersion
}
ngOnInit () {
this.authService.loadClientCredentials()

View File

@ -16,6 +16,7 @@ export class ServerService {
videoLanguagesLoaded = new ReplaySubject<boolean>(1)
private config: ServerConfig = {
serverVersion: 'Unknown',
signup: {
allowed: false
},

File diff suppressed because it is too large Load Diff

View File

@ -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
},

View File

@ -1,4 +1,5 @@
export interface ServerConfig {
serverVersion: string,
signup: {
allowed: boolean
}