From 7aa9f6bc9302990c5573f418a55db7e1d4485929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Jovan=C3=AD=20Gonz=C3=A1lez?= <12443324+drackp2m@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:47:30 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20refactor(app):=20remove?= =?UTF-8?q?=20not=20used=20imports,=20add=20version=20to=20"footer"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release-notes/template.hbs | 2 +- apps/app/src/app/app.component.ts | 30 ++++++++++++++++++- .../card-shape/card-shape.component.ts | 2 -- .../app/component/card/card.component.scss | 2 +- .../src/app/component/card/card.component.ts | 3 +- apps/app/src/app/layout/main/main.layout.ts | 11 ++++--- .../component/menu/example-menu.component.ts | 2 +- .../src/app/page/example/example.page.html | 10 +++---- .../src/app/page/example/example.page.scss | 8 ----- apps/app/src/app/page/example/example.page.ts | 12 ++------ .../border-radius/border-radius.page.ts | 3 +- .../page/example/section/card/card.page.scss | 3 -- .../page/example/section/card/card.page.ts | 3 +- .../example/section/color/color.page.scss | 4 --- .../page/example/section/color/color.page.ts | 4 +-- .../example/section/shadow/shadow.page.scss | 3 -- .../example/section/spacing/spacing.page.scss | 3 -- .../section/typography/typography.page.scss | 4 --- .../section/typography/typography.page.ts | 4 +-- apps/app/src/app/page/game/game.page.html | 4 +-- apps/app/src/app/page/game/game.page.scss | 3 -- apps/app/src/app/page/game/game.page.ts | 3 +- apps/app/src/app/page/home/home.page.html | 4 +-- apps/app/src/app/page/home/home.page.scss | 4 --- apps/app/src/app/page/login/login.page.html | 4 +-- apps/app/src/app/page/login/login.page.scss | 4 --- apps/app/src/app/page/login/login.page.ts | 5 ++-- apps/app/src/app/page/online/online.page.html | 4 +-- apps/app/src/app/page/online/online.page.scss | 3 -- .../src/app/page/register/register.page.html | 4 +-- .../src/app/page/register/register.page.scss | 4 --- .../src/app/page/register/register.page.ts | 5 ++-- apps/app/src/styles.scss | 6 ++++ apps/app/tsconfig.json | 1 + package.json | 2 +- release.config.js | 2 +- tsconfig.base.json | 1 + 37 files changed, 74 insertions(+), 102 deletions(-) delete mode 100644 apps/app/src/app/page/example/section/color/color.page.scss delete mode 100644 apps/app/src/app/page/example/section/typography/typography.page.scss delete mode 100644 apps/app/src/app/page/login/login.page.scss delete mode 100644 apps/app/src/app/page/register/register.page.scss diff --git a/.github/release-notes/template.hbs b/.github/release-notes/template.hbs index 484bee03..ff6409f8 100644 --- a/.github/release-notes/template.hbs +++ b/.github/release-notes/template.hbs @@ -1,4 +1,4 @@ -# v{{version}} {{date}} +# v{{version}} ({{date}}) ## What's Changed {{#each commitGroups}} diff --git a/apps/app/src/app/app.component.ts b/apps/app/src/app/app.component.ts index 06dd4b78..9e8480a3 100644 --- a/apps/app/src/app/app.component.ts +++ b/apps/app/src/app/app.component.ts @@ -5,10 +5,36 @@ import { SendPingGQL } from '@playsetonline/apollo-definitions'; import { pingValue } from './app.config'; +import { version } from '@package'; + @Component({ standalone: true, selector: 'app-root', - template: ``, + template: ` + + v{{ version }} + `, + styles: ` + :host { + display: flex; + flex-direction: column; + + #app-version { + position: fixed; + bottom: 0; + + position: fixed; + color: rgb(255 255 255 / 90%); + + &::before { + content: attr(data-text); + position: absolute; + -webkit-text-stroke: 2px rgb(0 0 0 / 30%); + z-index: -1; + } + } + } + `, imports: [RouterOutlet], providers: [SendPingGQL], }) @@ -17,6 +43,8 @@ export class AppComponent { private readonly pingValue = pingValue; + version = version; + title = 'app'; constructor() { diff --git a/apps/app/src/app/component/card-shape/card-shape.component.ts b/apps/app/src/app/component/card-shape/card-shape.component.ts index 1a1b623b..58da43b9 100644 --- a/apps/app/src/app/component/card-shape/card-shape.component.ts +++ b/apps/app/src/app/component/card-shape/card-shape.component.ts @@ -1,4 +1,3 @@ -import { NgIf } from '@angular/common'; import { Component, computed, input } from '@angular/core'; import { CardColor, CardShading, CardShape } from '@playsetonline/api-definitions'; @@ -8,7 +7,6 @@ import { CardColor, CardShading, CardShape } from '@playsetonline/api-definition selector: 'app-card-shape', templateUrl: './card-shape.component.html', styleUrl: './card-shape.component.scss', - imports: [NgIf], }) export class CardShapeComponent { shape = input.required({ diff --git a/apps/app/src/app/component/card/card.component.scss b/apps/app/src/app/component/card/card.component.scss index 3a81aa22..463da1c4 100644 --- a/apps/app/src/app/component/card/card.component.scss +++ b/apps/app/src/app/component/card/card.component.scss @@ -2,7 +2,7 @@ aspect-ratio: 1 / 0.6666; height: 100%; - background: white; + background-color: white; border: solid 0.1rem #e5e5e5; border-radius: 3.3% / 5%; diff --git a/apps/app/src/app/component/card/card.component.ts b/apps/app/src/app/component/card/card.component.ts index 1609e9d7..e44fe2bb 100644 --- a/apps/app/src/app/component/card/card.component.ts +++ b/apps/app/src/app/component/card/card.component.ts @@ -1,4 +1,3 @@ -import { NgFor, NgIf } from '@angular/common'; import { Component, computed, input } from '@angular/core'; import { CardColor, CardShading, CardShape } from '@playsetonline/api-definitions'; @@ -10,7 +9,7 @@ import { CardShapeComponent } from '../card-shape/card-shape.component'; selector: 'app-card', templateUrl: './card.component.html', styleUrl: './card.component.scss', - imports: [NgIf, NgFor, CardShapeComponent], + imports: [CardShapeComponent], }) export class CardComponent { private readonly hello = 22; diff --git a/apps/app/src/app/layout/main/main.layout.ts b/apps/app/src/app/layout/main/main.layout.ts index 5c18fdcc..f386d93b 100644 --- a/apps/app/src/app/layout/main/main.layout.ts +++ b/apps/app/src/app/layout/main/main.layout.ts @@ -1,6 +1,6 @@ -import { AsyncPipe, JsonPipe, NgIf, NgTemplateOutlet } from '@angular/common'; +import { NgTemplateOutlet } from '@angular/common'; import { Component, OnInit, inject, signal } from '@angular/core'; -import { Router, RouterModule } from '@angular/router'; +import { Router, RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router'; import { SwUpdate } from '@angular/service-worker'; import { CardColor, CardShading, CardShape } from '@playsetonline/api-definitions'; @@ -21,12 +21,11 @@ import { UserStore } from '../../store/user.store'; templateUrl: './main.layout.html', styleUrl: './main.layout.scss', imports: [ - RouterModule, + RouterOutlet, + RouterLink, + RouterLinkActive, NgTemplateOutlet, MediaDebugComponent, - NgIf, - JsonPipe, - AsyncPipe, CardShapeComponent, ], providers: [GetPingsGQL, GetUserInfoGQL], diff --git a/apps/app/src/app/page/example/component/menu/example-menu.component.ts b/apps/app/src/app/page/example/component/menu/example-menu.component.ts index 97f9a411..b8a22e7e 100644 --- a/apps/app/src/app/page/example/component/menu/example-menu.component.ts +++ b/apps/app/src/app/page/example/component/menu/example-menu.component.ts @@ -7,7 +7,7 @@ import { RouterModule } from '@angular/router'; selector: 'app-example-menu', imports: [NgTemplateOutlet, RouterModule], template: ` -