Skip to content

Commit

Permalink
web app: Fix location of guidecoclors.css in Colors dialog
Browse files Browse the repository at this point in the history
The dialog was displaying the default location. Updated to display the
actual location.

Fixes #1004
  • Loading branch information
bennettpeter committed Dec 27, 2024
1 parent 9fe31ef commit dd4e6fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mythtv/html/apps/backend/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@

<p>{{ 'dashboard.guide.color_includes' | translate }}<br>
{{ 'dashboard.guide.color_expl' | translate }}<br>
{{ 'dashboard.guide.color_customize' | translate }}<code>/usr/share/mythtv/html/assets/guidecolors.css</code>&nbsp;.</p>
{{ 'dashboard.guide.color_customize' | translate }}<code>{{ cssFile }}</code>&nbsp;.</p>
</div>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Input, OnInit } from '@angular/core';
import { ScheduleOrProgram } from 'src/app/services/interfaces/program.interface';
import { ProgramGuide } from 'src/app/services/interfaces/programguide.interface';
import { MythService } from 'src/app/services/myth.service';

@Component({
selector: 'app-legend',
Expand All @@ -14,10 +15,12 @@ export class LegendComponent implements OnInit {
catTypes: string[] = [];
categories: string[] = [];
regex = /[^a-z0-9]/g;
cssFile = '';

constructor() { }
constructor(private mythService: MythService) { }

ngOnInit(): void {
this.loadfInfo();
let setTypes = new Set();
let setCats = new Set();
if (this.programGuide != null) {
Expand Down Expand Up @@ -67,4 +70,10 @@ export class LegendComponent implements OnInit {
this.categories.sort();
}

loadfInfo() {
this.mythService.GetBackendInfo().subscribe(data => {
this.cssFile = data.BackendInfo.Env.HttpRootDir + '/assets/guidecolors.css';
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface EnvInfo {
HOME: string;
USER: string;
MYTHCONFDIR: string;
HttpRootDir: string;
SchedulingEnabled: boolean;
IsDatabaseIgnored: boolean;
DBTimezoneSupport: boolean;
Expand Down

0 comments on commit dd4e6fb

Please sign in to comment.