Add peertube version in features table
This commit is contained in:
parent
ee83ad12ca
commit
dbdf2d51c6
|
@ -2,7 +2,7 @@
|
|||
<div class="col-md-12 col-xl-6">
|
||||
|
||||
<div class="about-instance-title">
|
||||
<div i18n class="title">About {{ instanceName }} instance</div>
|
||||
<div i18n class="title">About {{ instanceName }}</div>
|
||||
|
||||
<div i18n *ngIf="isContactFormEnabled" (click)="openContactModal()" role="button" class="contact-admin">Contact administrator</div>
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
|
||||
<footer class="row">
|
||||
<a href="https://joinpeertube.org" title="PeerTube website" target="_blank" rel="noopener noreferrer">PeerTube v{{ serverVersion }}{{ serverCommit }}</a> -
|
||||
<a href="https://joinpeertube.org" title="PeerTube website" target="_blank" rel="noopener noreferrer">PeerTube v{{ getServerVersionAndCommit() }}</a> -
|
||||
<a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" title="PeerTube license" target="_blank" rel="noopener noreferrer">CopyLeft 2015-2019</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
|
|
@ -51,15 +51,6 @@ export class AppComponent implements OnInit {
|
|||
private modalService: NgbModal
|
||||
) { }
|
||||
|
||||
get serverVersion () {
|
||||
return this.serverService.getConfig().serverVersion
|
||||
}
|
||||
|
||||
get serverCommit () {
|
||||
const commit = this.serverService.getConfig().serverCommit || ''
|
||||
return (commit !== '') ? '...' + commit : commit
|
||||
}
|
||||
|
||||
get instanceName () {
|
||||
return this.serverService.getConfig().instance.name
|
||||
}
|
||||
|
@ -122,6 +113,10 @@ export class AppComponent implements OnInit {
|
|||
this.isMenuDisplayed = window.innerWidth >= 800 && !this.isMenuChangedByUser
|
||||
}
|
||||
|
||||
getServerVersionAndCommit () {
|
||||
return this.serverService.getServerVersionAndCommit()
|
||||
}
|
||||
|
||||
private initRouteEvents () {
|
||||
let resetScroll = true
|
||||
const eventsObs = this.router.events
|
||||
|
|
|
@ -174,6 +174,16 @@ export class ServerService {
|
|||
return cloneDeep(this.config)
|
||||
}
|
||||
|
||||
getServerVersionAndCommit () {
|
||||
const serverVersion = this.config.serverVersion
|
||||
const commit = this.config.serverCommit || ''
|
||||
|
||||
let result = `v${serverVersion}`
|
||||
if (commit) result += '...' + commit
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
getVideoCategories () {
|
||||
return cloneDeep(this.videoCategories)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<div class="feature-table">
|
||||
|
||||
<table class="table" *ngIf="config">
|
||||
<tr>
|
||||
<td i18n class="label">PeerTube version</td>
|
||||
|
||||
<td class="value">{{ getServerVersionAndCommit() }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td i18n class="label">
|
||||
<div>Default NSFW/sensitive videos policy</div>
|
||||
|
|
|
@ -53,6 +53,10 @@ export class InstanceFeaturesTableComponent implements OnInit {
|
|||
return this.i18n('~ {{minutes}} {minutes, plural, =1 {minute} other {minutes}}', { minutes })
|
||||
}
|
||||
|
||||
getServerVersionAndCommit () {
|
||||
return this.serverService.getServerVersionAndCommit()
|
||||
}
|
||||
|
||||
private buildQuotaHelpIndication () {
|
||||
if (this.initialUserVideoQuota === -1) return
|
||||
|
||||
|
|
Loading…
Reference in New Issue