Fix theme colors on stats page

pull/6135/head
Chocobozzz 2023-12-22 09:40:37 +01:00
parent b5ae080f32
commit b25a6d0560
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 7 additions and 1 deletions

View File

@ -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' ],

View File

@ -33,6 +33,8 @@
body {
--bs-border-color-translucent: #{pvar(--inputBorderColor)};
--bs-body-color: #{pvar(--mainForegroundColor)};
}
.accordion {