From 34dd7cb4ca4807e61a8c1d584b047c2cb383fe5a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 29 Jul 2019 16:30:01 +0200 Subject: Fix quota in instance features table --- client/src/app/shared/instance/instance-features-table.component.html | 2 +- client/src/app/shared/instance/instance-features-table.component.ts | 2 +- server/controllers/client.ts | 2 +- server/controllers/static.ts | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/app/shared/instance/instance-features-table.component.html b/client/src/app/shared/instance/instance-features-table.component.html index 2885f97e3..2987bd00e 100644 --- a/client/src/app/shared/instance/instance-features-table.component.html +++ b/client/src/app/shared/instance/instance-features-table.component.html @@ -22,7 +22,7 @@ {{ initialUserVideoQuota | bytes: 0 }} ({{ dailyUserVideoQuota | bytes: 0 }} per day) - + diff --git a/client/src/app/shared/instance/instance-features-table.component.ts b/client/src/app/shared/instance/instance-features-table.component.ts index 72e7c2730..a53082a93 100644 --- a/client/src/app/shared/instance/instance-features-table.component.ts +++ b/client/src/app/shared/instance/instance-features-table.component.ts @@ -22,7 +22,7 @@ export class InstanceFeaturesTableComponent implements OnInit { } get dailyUserVideoQuota () { - return this.serverService.getConfig().user.videoQuotaDaily + return Math.min(this.initialUserVideoQuota, this.serverService.getConfig().user.videoQuotaDaily) } ngOnInit () { diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 51f610afa..2af00e475 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -1,7 +1,7 @@ import * as express from 'express' import { join } from 'path' import { root } from '../helpers/core-utils' -import { ACCEPT_HEADERS, STATIC_MAX_AGE, STATIC_PATHS } from '../initializers/constants' +import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants' import { asyncMiddleware, embedCSP } from '../middlewares' import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n' import { ClientHtml } from '../lib/client-html' diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 4296183a0..110d25031 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -1,7 +1,8 @@ import * as cors from 'cors' import * as express from 'express' import { - HLS_STREAMING_PLAYLIST_DIRECTORY, PEERTUBE_VERSION, + HLS_STREAMING_PLAYLIST_DIRECTORY, + PEERTUBE_VERSION, ROUTE_CACHE_LIFETIME, STATIC_DOWNLOAD_PATHS, STATIC_MAX_AGE, -- cgit v1.2.3