From b0a4b09ef5c9b9913c636e291a88c4b9e9e004aa Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 9 Jun 2023 21:13:05 +0200 Subject: [PATCH] Feature/extract license to dedicated tab (#2061) * Extract license to tab on about page * Update changelog --- CHANGELOG.md | 1 + apps/client/src/app/app.component.html | 7 +-- .../pages/about/about-page-routing.module.ts | 15 ++++++ .../app/pages/about/about-page.component.ts | 7 ++- .../changelog-page-routing.module.ts | 2 +- .../pages/about/changelog/changelog-page.html | 21 ++------ .../about/changelog/changelog-page.module.ts | 4 +- .../pages/about/changelog/changelog-page.scss | 48 +++++++++---------- .../license/license-page-routing.module.ts | 20 ++++++++ .../about/license/license-page.component.ts | 19 ++++++++ .../app/pages/about/license/license-page.html | 10 ++++ .../about/license/license-page.module.ts | 13 +++++ .../app/pages/about/license/license-page.scss | 8 ++++ apps/client/src/assets/sitemap.xml | 24 ++++++++++ 14 files changed, 149 insertions(+), 50 deletions(-) create mode 100644 apps/client/src/app/pages/about/license/license-page-routing.module.ts create mode 100644 apps/client/src/app/pages/about/license/license-page.component.ts create mode 100644 apps/client/src/app/pages/about/license/license-page.html create mode 100644 apps/client/src/app/pages/about/license/license-page.module.ts create mode 100644 apps/client/src/app/pages/about/license/license-page.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index 267d37df..b8d8d700 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 d2c66e24..761a18a4 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -80,14 +80,15 @@ Blog
  • - Changelog & License + Changelog
  • Features
  • Frequently Asked Questions (FAQ)
  • +
  • + License +
  • Open Startup
  • 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 0b7a83db..edc93934 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 3953aa00..084623a7 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 45e921f1..873765f0 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 b3bc1e6e..ca7519ba 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 @@
    -

    Changelog

    - - - - - -
    -
    - -
    -
    -

    License

    - - - - - +

    Changelog

    +
    + +
    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 ba4788c2..6c187824 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 3a20b875..aff47b34 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; + } + + h2 { + font-size: 18px; + + &:not(:first-of-type) { + margin-top: 2rem; } } - markdown { - h1, - p { - display: none; - } - - h2 { - font-size: 18px; - - &: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 00000000..751d0654 --- /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 00000000..185fde02 --- /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(); + + 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 00000000..fe2831da --- /dev/null +++ b/apps/client/src/app/pages/about/license/license-page.html @@ -0,0 +1,10 @@ +
    +
    +
    +

    License

    +
    + +
    +
    +
    +
    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 00000000..d18b4830 --- /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 00000000..39eb6792 --- /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 8c2954b0..56c67178 100644 --- a/apps/client/src/assets/sitemap.xml +++ b/apps/client/src/assets/sitemap.xml @@ -58,6 +58,10 @@ https://ghostfol.io/de/ueber-uns/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/de/ueber-uns/lizenz + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/en 2023-06-01T00:00:00+00:00 @@ -70,6 +74,10 @@ https://ghostfol.io/en/about/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/en/about/license + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/en/blog 2023-06-01T00:00:00+00:00 @@ -190,6 +198,10 @@ https://ghostfol.io/es/sobre/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/es/sobre/licencia + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/es/sobre/politica-de-privacidad 2023-06-01T00:00:00+00:00 @@ -206,6 +218,10 @@ https://ghostfol.io/fr/a-propos/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/fr/a-propos/licence + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/fr/a-propos/politique-de-confidentialite 2023-06-01T00:00:00+00:00 @@ -260,6 +276,10 @@ https://ghostfol.io/it/informazioni-su/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/it/informazioni-su/licenza + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/it/informazioni-su/informativa-sulla-privacy 2023-06-01T00:00:00+00:00 @@ -316,6 +336,10 @@ https://ghostfol.io/nl/over/changelog 2023-06-01T00:00:00+00:00 + + https://ghostfol.io/nl/over/licentie + 2023-06-01T00:00:00+00:00 + https://ghostfol.io/nl/over/privacybeleid 2023-06-01T00:00:00+00:00