diff options
Diffstat (limited to 'client/src/app')
6 files changed, 26 insertions, 11 deletions
diff --git a/client/src/app/+about/about-instance/about-instance.component.html b/client/src/app/+about/about-instance/about-instance.component.html index 8ed248b60..f5b481158 100644 --- a/client/src/app/+about/about-instance/about-instance.component.html +++ b/client/src/app/+about/about-instance/about-instance.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <div class="col-md-12 col-xl-6"> | 2 | <div class="col-md-12 col-xl-6"> |
3 | 3 | ||
4 | <div class="about-instance-title"> | 4 | <div class="about-instance-title"> |
5 | <div i18n class="title">About {{ instanceName }} instance</div> | 5 | <div i18n class="title">About {{ instanceName }}</div> |
6 | 6 | ||
7 | <div i18n *ngIf="isContactFormEnabled" (click)="openContactModal()" role="button" class="contact-admin">Contact administrator</div> | 7 | <div i18n *ngIf="isContactFormEnabled" (click)="openContactModal()" role="button" class="contact-admin">Contact administrator</div> |
8 | </div> | 8 | </div> |
diff --git a/client/src/app/app.component.html b/client/src/app/app.component.html index 81b4351c5..057a4e19e 100644 --- a/client/src/app/app.component.html +++ b/client/src/app/app.component.html | |||
@@ -29,7 +29,7 @@ | |||
29 | </div> | 29 | </div> |
30 | 30 | ||
31 | <footer class="row"> | 31 | <footer class="row"> |
32 | <a href="https://joinpeertube.org" title="PeerTube website" target="_blank" rel="noopener noreferrer">PeerTube v{{ serverVersion }}{{ serverCommit }}</a> - | 32 | <a href="https://joinpeertube.org" title="PeerTube website" target="_blank" rel="noopener noreferrer">PeerTube v{{ getServerVersionAndCommit() }}</a> - |
33 | <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" title="PeerTube license" target="_blank" rel="noopener noreferrer">CopyLeft 2015-2019</a> | 33 | <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" title="PeerTube license" target="_blank" rel="noopener noreferrer">CopyLeft 2015-2019</a> |
34 | </footer> | 34 | </footer> |
35 | </div> | 35 | </div> |
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f1658ca1b..351620c59 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -51,15 +51,6 @@ export class AppComponent implements OnInit { | |||
51 | private modalService: NgbModal | 51 | private modalService: NgbModal |
52 | ) { } | 52 | ) { } |
53 | 53 | ||
54 | get serverVersion () { | ||
55 | return this.serverService.getConfig().serverVersion | ||
56 | } | ||
57 | |||
58 | get serverCommit () { | ||
59 | const commit = this.serverService.getConfig().serverCommit || '' | ||
60 | return (commit !== '') ? '...' + commit : commit | ||
61 | } | ||
62 | |||
63 | get instanceName () { | 54 | get instanceName () { |
64 | return this.serverService.getConfig().instance.name | 55 | return this.serverService.getConfig().instance.name |
65 | } | 56 | } |
@@ -122,6 +113,10 @@ export class AppComponent implements OnInit { | |||
122 | this.isMenuDisplayed = window.innerWidth >= 800 && !this.isMenuChangedByUser | 113 | this.isMenuDisplayed = window.innerWidth >= 800 && !this.isMenuChangedByUser |
123 | } | 114 | } |
124 | 115 | ||
116 | getServerVersionAndCommit () { | ||
117 | return this.serverService.getServerVersionAndCommit() | ||
118 | } | ||
119 | |||
125 | private initRouteEvents () { | 120 | private initRouteEvents () { |
126 | let resetScroll = true | 121 | let resetScroll = true |
127 | const eventsObs = this.router.events | 122 | const eventsObs = this.router.events |
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index cf9c411a4..fdcc51cc5 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -174,6 +174,16 @@ export class ServerService { | |||
174 | return cloneDeep(this.config) | 174 | return cloneDeep(this.config) |
175 | } | 175 | } |
176 | 176 | ||
177 | getServerVersionAndCommit () { | ||
178 | const serverVersion = this.config.serverVersion | ||
179 | const commit = this.config.serverCommit || '' | ||
180 | |||
181 | let result = `v${serverVersion}` | ||
182 | if (commit) result += '...' + commit | ||
183 | |||
184 | return result | ||
185 | } | ||
186 | |||
177 | getVideoCategories () { | 187 | getVideoCategories () { |
178 | return cloneDeep(this.videoCategories) | 188 | return cloneDeep(this.videoCategories) |
179 | } | 189 | } |
diff --git a/client/src/app/shared/instance/instance-features-table.component.html b/client/src/app/shared/instance/instance-features-table.component.html index d1cb8fcbe..f880a886f 100644 --- a/client/src/app/shared/instance/instance-features-table.component.html +++ b/client/src/app/shared/instance/instance-features-table.component.html | |||
@@ -2,6 +2,12 @@ | |||
2 | 2 | ||
3 | <table class="table" *ngIf="config"> | 3 | <table class="table" *ngIf="config"> |
4 | <tr> | 4 | <tr> |
5 | <td i18n class="label">PeerTube version</td> | ||
6 | |||
7 | <td class="value">{{ getServerVersionAndCommit() }}</td> | ||
8 | </tr> | ||
9 | |||
10 | <tr> | ||
5 | <td i18n class="label"> | 11 | <td i18n class="label"> |
6 | <div>Default NSFW/sensitive videos policy</div> | 12 | <div>Default NSFW/sensitive videos policy</div> |
7 | <div class="more-info">can be redefined by the users</div> | 13 | <div class="more-info">can be redefined by the users</div> |
diff --git a/client/src/app/shared/instance/instance-features-table.component.ts b/client/src/app/shared/instance/instance-features-table.component.ts index 46df4d0b2..1661f1efe 100644 --- a/client/src/app/shared/instance/instance-features-table.component.ts +++ b/client/src/app/shared/instance/instance-features-table.component.ts | |||
@@ -53,6 +53,10 @@ export class InstanceFeaturesTableComponent implements OnInit { | |||
53 | return this.i18n('~ {{minutes}} {minutes, plural, =1 {minute} other {minutes}}', { minutes }) | 53 | return this.i18n('~ {{minutes}} {minutes, plural, =1 {minute} other {minutes}}', { minutes }) |
54 | } | 54 | } |
55 | 55 | ||
56 | getServerVersionAndCommit () { | ||
57 | return this.serverService.getServerVersionAndCommit() | ||
58 | } | ||
59 | |||
56 | private buildQuotaHelpIndication () { | 60 | private buildQuotaHelpIndication () { |
57 | if (this.initialUserVideoQuota === -1) return | 61 | if (this.initialUserVideoQuota === -1) return |
58 | 62 | ||