feat: Set the browser title based on what section of the app you are on (#947)

* when reading a book, set the page title

* set page title on various sections of the app

* update page title service
This commit is contained in:
Ionuț Staicu
2025-10-31 10:31:30 -06:00
committed by GitHub
parent d542c87afb
commit db9bc40960
10 changed files with 77 additions and 5 deletions
@@ -10,6 +10,7 @@ import {Select} from 'primeng/select';
import ChartDataLabels from 'chartjs-plugin-datalabels';
import {Button} from 'primeng/button';
import {MatrixController, MatrixElement} from 'chartjs-chart-matrix';
import {PageTitleService} from "../../../shared/service/page-title.service";
import {LibraryFilterService, LibraryOption} from '../service/library-filter.service';
import {LibrariesSummaryService} from '../service/libraries-summary.service';
import {ReadStatusChartService} from '../service/read-status-chart.service';
@@ -71,6 +72,8 @@ export class StatsComponent implements OnInit, OnDestroy {
protected readonly readingHabitsChartService = inject(ReadingHabitsChartService);
protected readonly chartConfigService = inject(ChartConfigService);
protected readonly readingHeatmapChartService = inject(ReadingHeatmapChartService);
private readonly pageTitle = inject(PageTitleService);
private readonly destroy$ = new Subject<void>();
public isLoading = true;
@@ -102,6 +105,7 @@ export class StatsComponent implements OnInit, OnDestroy {
family: "'Inter', sans-serif",
size: 11.5,
};
this.pageTitle.setPageTitle('Statistics');
this.loadLibraryOptions();
this.loadChartConfig();
}