Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix theme colors on stats page

Chocobozzzb25a6d05604e
diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts
index 9217182472..e350738da1 100644
--- a/client/src/app/+stats/video/video-stats.component.ts
+++ b/client/src/app/+stats/video/video-stats.component.ts
@@ -1,4 +1,4 @@
-import { ChartConfiguration, ChartData, ChartOptions, PluginOptionsByType, Scale, TooltipItem } from 'chart.js'
+import { ChartConfiguration, ChartData, ChartOptions, PluginOptionsByType, Scale, TooltipItem, defaults as ChartJSDefaults } from 'chart.js'
import zoomPlugin from 'chartjs-plugin-zoom'
import { Observable, of } from 'rxjs'
import { SelectOptionsItem } from 'src/types'
@@ -35,6 +35,10 @@ type ChartBuilderResult = {
type Card = { label: string, value: string | number, moreInfo?: string, help?: string }
+ChartJSDefaults.backgroundColor = getComputedStyle(document.body).getPropertyValue('--mainBackgroundColor')
+ChartJSDefaults.borderColor = getComputedStyle(document.body).getPropertyValue('--greySecondaryBackgroundColor')
+ChartJSDefaults.color = getComputedStyle(document.body).getPropertyValue('--mainForegroundColor')
+
@Component({
templateUrl: './video-stats.component.html',
styleUrls: [ './video-stats.component.scss' ],
diff --git a/client/src/sass/bootstrap.scss b/client/src/sass/bootstrap.scss
index 435c780c13..e2b22ee0fc 100644
--- a/client/src/sass/bootstrap.scss
+++ b/client/src/sass/bootstrap.scss
@@ -33,6 +33,8 @@
body {
--bs-border-color-translucent: #{pvar(--inputBorderColor)};
+
+ --bs-body-color: #{pvar(--mainForegroundColor)};
}
.accordion {