Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🀍

Feature/shorten page titles (#2273)

Thomas Kaul754b49e50f33
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1a3710eaa9..a10d178c2f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Shortened the page titles
- Upgraded `prisma` from version `4.16.2` to `5.2.0`
## 1.304.0 - 2023-08-27
diff --git a/apps/client/src/app/services/page-title.strategy.ts b/apps/client/src/app/services/page-title.strategy.ts
index e8be5516e9..ce04a0af8d 100644
--- a/apps/client/src/app/services/page-title.strategy.ts
+++ b/apps/client/src/app/services/page-title.strategy.ts
@@ -6,6 +6,7 @@ import { RouterStateSnapshot, TitleStrategy } from '@angular/router';
export class PageTitleStrategy extends TitleStrategy {
private static readonly DEFAULT_TITLE =
'Ghostfolio – Open Source Wealth Management Software';
+ private static readonly DEFAULT_TITLE_SHORT = 'Ghostfolio';
public constructor(private readonly title: Title) {
super();
@@ -15,7 +16,9 @@ export class PageTitleStrategy extends TitleStrategy {
const title = this.buildTitle(routerState);
if (title) {
- this.title.setTitle(`${title} – ${PageTitleStrategy.DEFAULT_TITLE}`);
+ this.title.setTitle(
+ `${title} – ${PageTitleStrategy.DEFAULT_TITLE_SHORT}`
+ );
} else {
this.title.setTitle(`${PageTitleStrategy.DEFAULT_TITLE}`);
}