From 43a3d281fe562d5fe24feb53451b58630be3a288 Mon Sep 17 00:00:00 2001 From: aschaap <8865084+aschaap@users.noreply.github.com> Date: Tue, 6 Apr 2021 02:57:30 -0400 Subject: 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 --- .../shared-instance/instance-features-table.component.html | 2 +- .../shared-instance/instance-features-table.component.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-instance') 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 ce2557147..d505b6739 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 @@ -11,7 +11,7 @@
Default NSFW/sensitive videos policy
-
can be redefined by the users
+
can be redefined by the users
{{ buildNSFWLabel() }} 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 0166157f9..c3b3dfdfd 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,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 = '' -- cgit v1.2.3