mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Minimal PeertubeModalService to open settings from "can be redefined..." (#3923)
* Minimal PeertubeModalService to open settings from "can be redefined..." * Linter changes * Removed unused parameter, made Subject type reflect this, and formatting
This commit is contained in:
parent
1bbc0270f6
commit
43a3d281fe
5 changed files with 23 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core'
|
||||
import { ServerService } from '@app/core'
|
||||
import { ServerConfig } from '@shared/models'
|
||||
import { PeertubeModalService } from '../shared-main/peertube-modal/peertube-modal.service'
|
||||
|
||||
@Component({
|
||||
selector: 'my-instance-features-table',
|
||||
|
@ -11,7 +12,10 @@ export class InstanceFeaturesTableComponent implements OnInit {
|
|||
quotaHelpIndication = ''
|
||||
serverConfig: ServerConfig
|
||||
|
||||
constructor (private serverService: ServerService) { }
|
||||
constructor (
|
||||
private serverService: ServerService,
|
||||
private modalService: PeertubeModalService
|
||||
) { }
|
||||
|
||||
get initialUserVideoQuota () {
|
||||
return this.serverConfig.user.videoQuota
|
||||
|
@ -56,6 +60,10 @@ export class InstanceFeaturesTableComponent implements OnInit {
|
|||
return this.serverService.getServerVersionAndCommit()
|
||||
}
|
||||
|
||||
openQuickSettingsHighlight () {
|
||||
this.modalService.openQuickSettingsSubject.next()
|
||||
}
|
||||
|
||||
private getApproximateTime (seconds: number) {
|
||||
const hours = Math.floor(seconds / 3600)
|
||||
let pluralSuffix = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue