mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Redesign about pages
This commit is contained in:
parent
fa7d8c0ed4
commit
f4d6cecf10
81 changed files with 1819 additions and 935 deletions
|
@ -1,13 +1,14 @@
|
|||
import { Component, OnInit } from '@angular/core'
|
||||
import { NgFor, NgIf } from '@angular/common'
|
||||
import { Component, Input, OnInit } from '@angular/core'
|
||||
import { ServerService } from '@app/core'
|
||||
import { formatICU } from '@app/helpers'
|
||||
import { ServerConfig, ServerStats } from '@peertube/peertube-models'
|
||||
import { of } from 'rxjs'
|
||||
import { HelpComponent } from '../shared-main/buttons/help.component'
|
||||
import { BytesPipe } from '../shared-main/common/bytes.pipe'
|
||||
import { PeerTubeTemplateDirective } from '../shared-main/common/peertube-template.directive'
|
||||
import { HelpComponent } from '../shared-main/buttons/help.component'
|
||||
import { FeatureBooleanComponent } from './feature-boolean.component'
|
||||
import { NgIf, NgFor } from '@angular/common'
|
||||
import { DaysDurationFormatterPipe } from '../shared-main/date/days-duration-formatter.pipe'
|
||||
import { FeatureBooleanComponent } from './feature-boolean.component'
|
||||
|
||||
@Component({
|
||||
selector: 'my-instance-features-table',
|
||||
|
@ -17,9 +18,10 @@ import { DaysDurationFormatterPipe } from '../shared-main/date/days-duration-for
|
|||
imports: [ NgIf, FeatureBooleanComponent, HelpComponent, PeerTubeTemplateDirective, NgFor, BytesPipe ]
|
||||
})
|
||||
export class InstanceFeaturesTableComponent implements OnInit {
|
||||
@Input() serverConfig: ServerConfig
|
||||
@Input() serverStats: ServerStats
|
||||
|
||||
quotaHelpIndication = ''
|
||||
serverConfig: ServerConfig
|
||||
serverStats: ServerStats
|
||||
|
||||
constructor (
|
||||
private serverService: ServerService
|
||||
|
@ -48,15 +50,19 @@ export class InstanceFeaturesTableComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit () {
|
||||
this.serverService.getConfig()
|
||||
.subscribe(config => {
|
||||
this.serverConfig = config
|
||||
const serverConfigObs = this.serverConfig
|
||||
? of(this.serverConfig)
|
||||
: this.serverService.getConfig()
|
||||
|
||||
this.buildQuotaHelpIndication()
|
||||
})
|
||||
serverConfigObs.subscribe(config => {
|
||||
this.serverConfig = config
|
||||
|
||||
this.serverService.getServerStats()
|
||||
.subscribe(stats => this.serverStats = stats)
|
||||
this.buildQuotaHelpIndication()
|
||||
})
|
||||
|
||||
if (!this.serverStats) {
|
||||
this.serverService.getServerStats().subscribe(stats => this.serverStats = stats)
|
||||
}
|
||||
}
|
||||
|
||||
buildNSFWLabel () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue