diff options
Diffstat (limited to 'client/src/app/shared/shared-instance')
4 files changed, 17 insertions, 31 deletions
diff --git a/client/src/app/shared/shared-instance/instance-about-accordion.component.scss b/client/src/app/shared/shared-instance/instance-about-accordion.component.scss index be6099a97..8e5dfb064 100644 --- a/client/src/app/shared/shared-instance/instance-about-accordion.component.scss +++ b/client/src/app/shared/shared-instance/instance-about-accordion.component.scss | |||
@@ -16,26 +16,3 @@ | |||
16 | font-size: 15px; | 16 | font-size: 15px; |
17 | margin-bottom: 15px; | 17 | margin-bottom: 15px; |
18 | } | 18 | } |
19 | |||
20 | ngb-accordion ::ng-deep { | ||
21 | .card { | ||
22 | border-color: var(--mainBackgroundColor); | ||
23 | |||
24 | .card-header { | ||
25 | background-color: unset; | ||
26 | padding: 0; | ||
27 | |||
28 | + .collapse.show { | ||
29 | background-color: var(--submenuBackgroundColor); | ||
30 | } | ||
31 | } | ||
32 | } | ||
33 | |||
34 | .btn { | ||
35 | @include peertube-button; | ||
36 | @include grey-button; | ||
37 | |||
38 | border-radius: unset; | ||
39 | width: 100%; | ||
40 | } | ||
41 | } | ||
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.html b/client/src/app/shared/shared-instance/instance-features-table.component.html index 1fdef95ff..761243bfe 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.html +++ b/client/src/app/shared/shared-instance/instance-features-table.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <div *ngIf="serverConfig" class="feature-table"> | 1 | <div *ngIf="serverConfig" class="feature-table"> |
2 | 2 | ||
3 | <table class="table" *ngIf="serverConfig"> | 3 | <table *ngIf="serverConfig"> |
4 | <caption i18n>Features found on this instance</caption> | 4 | <caption i18n>Features found on this instance</caption> |
5 | <tr> | 5 | <tr> |
6 | <th i18n class="label" scope="row">PeerTube version</th> | 6 | <th i18n class="label" scope="row">PeerTube version</th> |
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.scss b/client/src/app/shared/shared-instance/instance-features-table.component.scss index 56ca105f4..105a7681f 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.scss +++ b/client/src/app/shared/shared-instance/instance-features-table.component.scss | |||
@@ -4,6 +4,7 @@ | |||
4 | table { | 4 | table { |
5 | font-size: 14px; | 5 | font-size: 14px; |
6 | color: pvar(--mainForegroundColor); | 6 | color: pvar(--mainForegroundColor); |
7 | width: 100%; | ||
7 | 8 | ||
8 | .label, | 9 | .label, |
9 | .sub-label { | 10 | .sub-label { |
@@ -24,8 +25,10 @@ table { | |||
24 | } | 25 | } |
25 | } | 26 | } |
26 | 27 | ||
28 | th, | ||
27 | td { | 29 | td { |
28 | vertical-align: middle; | 30 | padding: 0.75rem; |
31 | border-top: 1px solid #dee2e6; | ||
29 | } | 32 | } |
30 | 33 | ||
31 | caption { | 34 | caption { |
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts index 6335de450..e405c5790 100644 --- a/client/src/app/shared/shared-instance/instance-features-table.component.ts +++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { ServerService } from '@app/core' | 2 | import { ServerService } from '@app/core' |
3 | import { prepareIcu } from '@app/helpers' | ||
3 | import { ServerConfig } from '@shared/models' | 4 | import { ServerConfig } from '@shared/models' |
4 | import { PeertubeModalService } from '../shared-main/peertube-modal/peertube-modal.service' | 5 | import { PeertubeModalService } from '../shared-main/peertube-modal/peertube-modal.service' |
5 | 6 | ||
@@ -65,15 +66,20 @@ export class InstanceFeaturesTableComponent implements OnInit { | |||
65 | 66 | ||
66 | private getApproximateTime (seconds: number) { | 67 | private getApproximateTime (seconds: number) { |
67 | const hours = Math.floor(seconds / 3600) | 68 | const hours = Math.floor(seconds / 3600) |
68 | let pluralSuffix = '' | ||
69 | if (hours > 1) pluralSuffix = 's' | ||
70 | if (hours > 0) return `~ ${hours} hour${pluralSuffix}` | ||
71 | 69 | ||
72 | const minutes = Math.floor(seconds % 3600 / 60) | 70 | if (hours !== 0) { |
71 | return prepareIcu($localize`~ {hours, plural, =1 {1 hour} other {{hours} hours}}`)( | ||
72 | { hours }, | ||
73 | $localize`~ ${hours} hours` | ||
74 | ) | ||
75 | } | ||
73 | 76 | ||
74 | if (minutes === 1) return $localize`~ 1 minute` | 77 | const minutes = Math.floor(seconds % 3600 / 60) |
75 | 78 | ||
76 | return $localize`~ ${minutes} minutes` | 79 | return prepareIcu($localize`~ {minutes, plural, =1 {1 minute} other {{minutes} minutes}}`)( |
80 | { minutes }, | ||
81 | $localize`~ ${minutes} minutes` | ||
82 | ) | ||
77 | } | 83 | } |
78 | 84 | ||
79 | private buildQuotaHelpIndication () { | 85 | private buildQuotaHelpIndication () { |