1
0
Fork 0
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:
Chocobozzz 2025-01-07 10:44:48 +01:00
parent fa7d8c0ed4
commit f4d6cecf10
No known key found for this signature in database
GPG key ID: 583A612D890159BE
81 changed files with 1819 additions and 935 deletions

View file

@ -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 () {