Skip to content

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

Feature/extract license to dedicated tab (#2061)

Thomas Kaulb0a4b09ef5c9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 267d37df5b..b8d8d7004f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Extended the clone functionality of a transaction by the quantity
- Changed the direction of the ellipsis icon in various tables
+- Extracted the license to a dedicated tab on the about page
- Displayed the link to the markets overview in the footer based on a permission
- Improved the spacing in the benchmark comparator
- Refreshed the cryptocurrencies list
diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html
index d2c66e24d7..761a18a4e3 100644
--- a/apps/client/src/app/app.component.html
+++ b/apps/client/src/app/app.component.html
@@ -80,14 +80,15 @@
<a i18n [routerLink]="['/blog']">Blog</a>
</li>
<li>
- <a i18n [routerLink]="['/about', 'changelog']"
- >Changelog & License</a
- >
+ <a i18n [routerLink]="['/about', 'changelog']">Changelog</a>
</li>
<li><a i18n [routerLink]="['/features']">Features</a></li>
<li *ngIf="hasPermissionForSubscription">
<a i18n [routerLink]="['/faq']">Frequently Asked Questions (FAQ)</a>
</li>
+ <li>
+ <a i18n [routerLink]="['/about', 'license']">License</a>
+ </li>
<li *ngIf="hasPermissionForSubscription">
<a [routerLink]="['/open']">Open Startup</a>
</li>
diff --git a/apps/client/src/app/pages/about/about-page-routing.module.ts b/apps/client/src/app/pages/about/about-page-routing.module.ts
index 0b7a83db69..edc9393401 100644
--- a/apps/client/src/app/pages/about/about-page-routing.module.ts
+++ b/apps/client/src/app/pages/about/about-page-routing.module.ts
@@ -22,6 +22,21 @@ const routes: Routes = [
(m) => m.ChangelogPageModule
)
},
+ ...[
+ 'license',
+ /////
+ 'licence',
+ 'licencia',
+ 'licentie',
+ 'lizenz',
+ 'licenza'
+ ].map((path) => ({
+ path,
+ loadChildren: () =>
+ import('./license/license-page.module').then(
+ (m) => m.LicensePageModule
+ )
+ })),
{
path: 'privacy-policy',
loadChildren: () =>
diff --git a/apps/client/src/app/pages/about/about-page.component.ts b/apps/client/src/app/pages/about/about-page.component.ts
index 3953aa00ec..084623a7ce 100644
--- a/apps/client/src/app/pages/about/about-page.component.ts
+++ b/apps/client/src/app/pages/about/about-page.component.ts
@@ -53,9 +53,14 @@ export class AboutPageComponent implements OnDestroy, OnInit {
},
{
iconName: 'sparkles-outline',
- label: $localize`Changelog & License`,
+ label: $localize`Changelog`,
path: ['/about', 'changelog']
},
+ {
+ iconName: 'ribbon-outline',
+ label: $localize`License`,
+ path: ['/about', 'license']
+ },
{
iconName: 'shield-checkmark-outline',
label: $localize`Privacy Policy`,
diff --git a/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts b/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
index 45e921f10e..873765f0ed 100644
--- a/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
+++ b/apps/client/src/app/pages/about/changelog/changelog-page-routing.module.ts
@@ -9,7 +9,7 @@ const routes: Routes = [
canActivate: [AuthGuard],
component: ChangelogPageComponent,
path: '',
- title: $localize`Changelog & License`
+ title: $localize`Changelog`
}
];
diff --git a/apps/client/src/app/pages/about/changelog/changelog-page.html b/apps/client/src/app/pages/about/changelog/changelog-page.html
index b3bc1e6ec7..ca7519ba5f 100644
--- a/apps/client/src/app/pages/about/changelog/changelog-page.html
+++ b/apps/client/src/app/pages/about/changelog/changelog-page.html
@@ -1,23 +1,10 @@
<div class="container">
<div class="mb-5 row">
<div class="col">
- <h3 class="mb-3 text-center" i18n>Changelog</h3>
- <mat-card appearance="outlined" class="changelog">
- <mat-card-content>
- <markdown [src]="'../assets/CHANGELOG.md'"></markdown>
- </mat-card-content>
- </mat-card>
- </div>
- </div>
-
- <div class="row">
- <div class="col">
- <h3 class="mb-3 text-center" i18n>License</h3>
- <mat-card appearance="outlined">
- <mat-card-content>
- <markdown [src]="'../assets/LICENSE'"></markdown>
- </mat-card-content>
- </mat-card>
+ <h1 class="d-none d-sm-block h3 mb-3 text-center" i18n>Changelog</h1>
+ <div class="changelog">
+ <markdown [src]="'../assets/CHANGELOG.md'"></markdown>
+ </div>
</div>
</div>
</div>
diff --git a/apps/client/src/app/pages/about/changelog/changelog-page.module.ts b/apps/client/src/app/pages/about/changelog/changelog-page.module.ts
index ba4788c2b1..6c187824fc 100644
--- a/apps/client/src/app/pages/about/changelog/changelog-page.module.ts
+++ b/apps/client/src/app/pages/about/changelog/changelog-page.module.ts
@@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
-import { MatCardModule } from '@angular/material/card';
import { MarkdownModule } from 'ngx-markdown';
import { ChangelogPageRoutingModule } from './changelog-page-routing.module';
@@ -11,8 +10,7 @@ import { ChangelogPageComponent } from './changelog-page.component';
imports: [
ChangelogPageRoutingModule,
CommonModule,
- MarkdownModule.forChild(),
- MatCardModule
+ MarkdownModule.forChild()
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
diff --git a/apps/client/src/app/pages/about/changelog/changelog-page.scss b/apps/client/src/app/pages/about/changelog/changelog-page.scss
index 3a20b8758a..aff47b3452 100644
--- a/apps/client/src/app/pages/about/changelog/changelog-page.scss
+++ b/apps/client/src/app/pages/about/changelog/changelog-page.scss
@@ -2,35 +2,33 @@
color: rgb(var(--dark-primary-text));
display: block;
- .mat-mdc-card {
- &.changelog {
- ::ng-deep {
- a {
- color: rgba(var(--palette-primary-500), 1);
- font-weight: 500;
+ .changelog {
+ ::ng-deep {
+ a {
+ color: rgba(var(--palette-primary-500), 1);
+ font-weight: 500;
- &:hover {
- color: rgba(var(--palette-primary-300), 1);
- }
+ &:hover {
+ color: rgba(var(--palette-primary-300), 1);
}
+ }
- markdown {
- h1,
- p {
- display: none;
- }
+ markdown {
+ h1,
+ p {
+ display: none;
+ }
- h2 {
- font-size: 18px;
+ h2 {
+ font-size: 18px;
- &:not(:first-of-type) {
- margin-top: 2rem;
- }
+ &:not(:first-of-type) {
+ margin-top: 2rem;
}
+ }
- h3 {
- font-size: 15px;
- }
+ h3 {
+ font-size: 15px;
}
}
}
diff --git a/apps/client/src/app/pages/about/license/license-page-routing.module.ts b/apps/client/src/app/pages/about/license/license-page-routing.module.ts
new file mode 100644
index 0000000000..751d065400
--- /dev/null
+++ b/apps/client/src/app/pages/about/license/license-page-routing.module.ts
@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
+
+import { LicensePageComponent } from './license-page.component';
+
+const routes: Routes = [
+ {
+ canActivate: [AuthGuard],
+ component: LicensePageComponent,
+ path: '',
+ title: $localize`License`
+ }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class LicensePageRoutingModule {}
diff --git a/apps/client/src/app/pages/about/license/license-page.component.ts b/apps/client/src/app/pages/about/license/license-page.component.ts
new file mode 100644
index 0000000000..185fde0257
--- /dev/null
+++ b/apps/client/src/app/pages/about/license/license-page.component.ts
@@ -0,0 +1,19 @@
+import { Component, OnDestroy } from '@angular/core';
+import { Subject } from 'rxjs';
+
+@Component({
+ host: { class: 'page' },
+ selector: 'gf-license-page',
+ styleUrls: ['./license-page.scss'],
+ templateUrl: './license-page.html'
+})
+export class LicensePageComponent implements OnDestroy {
+ private unsubscribeSubject = new Subject<void>();
+
+ public constructor() {}
+
+ public ngOnDestroy() {
+ this.unsubscribeSubject.next();
+ this.unsubscribeSubject.complete();
+ }
+}
diff --git a/apps/client/src/app/pages/about/license/license-page.html b/apps/client/src/app/pages/about/license/license-page.html
new file mode 100644
index 0000000000..fe2831da5c
--- /dev/null
+++ b/apps/client/src/app/pages/about/license/license-page.html
@@ -0,0 +1,10 @@
+<div class="container">
+ <div class="mb-5 row">
+ <div class="col">
+ <h1 class="d-none d-sm-block h3 mb-3 text-center" i18n>License</h1>
+ <div>
+ <markdown [src]="'../assets/LICENSE'"></markdown>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/apps/client/src/app/pages/about/license/license-page.module.ts b/apps/client/src/app/pages/about/license/license-page.module.ts
new file mode 100644
index 0000000000..d18b483093
--- /dev/null
+++ b/apps/client/src/app/pages/about/license/license-page.module.ts
@@ -0,0 +1,13 @@
+import { CommonModule } from '@angular/common';
+import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
+import { MarkdownModule } from 'ngx-markdown';
+
+import { LicensePageRoutingModule } from './license-page-routing.module';
+import { LicensePageComponent } from './license-page.component';
+
+@NgModule({
+ declarations: [LicensePageComponent],
+ imports: [LicensePageRoutingModule, CommonModule, MarkdownModule.forChild()],
+ schemas: [CUSTOM_ELEMENTS_SCHEMA]
+})
+export class LicensePageModule {}
diff --git a/apps/client/src/app/pages/about/license/license-page.scss b/apps/client/src/app/pages/about/license/license-page.scss
new file mode 100644
index 0000000000..39eb6792e8
--- /dev/null
+++ b/apps/client/src/app/pages/about/license/license-page.scss
@@ -0,0 +1,8 @@
+:host {
+ color: rgb(var(--dark-primary-text));
+ display: block;
+}
+
+:host-context(.is-dark-theme) {
+ color: rgb(var(--light-primary-text));
+}
diff --git a/apps/client/src/assets/sitemap.xml b/apps/client/src/assets/sitemap.xml
index 8c2954b023..56c671783a 100644
--- a/apps/client/src/assets/sitemap.xml
+++ b/apps/client/src/assets/sitemap.xml
@@ -58,6 +58,10 @@
<loc>https://ghostfol.io/de/ueber-uns/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/de/ueber-uns/lizenz</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/en</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
@@ -70,6 +74,10 @@
<loc>https://ghostfol.io/en/about/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/en/about/license</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/en/blog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
@@ -190,6 +198,10 @@
<loc>https://ghostfol.io/es/sobre/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/es/sobre/licencia</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/es/sobre/politica-de-privacidad</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
@@ -206,6 +218,10 @@
<loc>https://ghostfol.io/fr/a-propos/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/fr/a-propos/licence</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/fr/a-propos/politique-de-confidentialite</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
@@ -260,6 +276,10 @@
<loc>https://ghostfol.io/it/informazioni-su/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/it/informazioni-su/licenza</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/it/informazioni-su/informativa-sulla-privacy</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
@@ -316,6 +336,10 @@
<loc>https://ghostfol.io/nl/over/changelog</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>
</url>
+ <url>
+ <loc>https://ghostfol.io/nl/over/licentie</loc>
+ <lastmod>2023-06-01T00:00:00+00:00</lastmod>
+ </url>
<url>
<loc>https://ghostfol.io/nl/over/privacybeleid</loc>
<lastmod>2023-06-01T00:00:00+00:00</lastmod>