From 7a7292ab32586129af6380298d09739b04139032 Mon Sep 17 00:00:00 2001 From: Chneemann Date: Sat, 11 May 2024 18:28:02 +0200 Subject: [PATCH] clean code --- src/app/app.routes.ts | 6 +++--- src/app/services/firebase.service.ts | 2 +- src/app/services/login.service.ts | 2 +- src/app/services/shared.service.ts | 2 +- src/app/shared/components/header/header.component.ts | 2 +- .../components/{ => header}/navbar/navbar.component.html | 0 .../components/{ => header}/navbar/navbar.component.scss | 0 .../components/{ => header}/navbar/navbar.component.spec.ts | 0 .../components/{ => header}/navbar/navbar.component.ts | 6 +++--- .../{ => legal-informations}/help/help.component.html | 0 .../{ => legal-informations}/help/help.component.scss | 0 .../{ => legal-informations}/help/help.component.spec.ts | 0 .../{ => legal-informations}/help/help.component.ts | 2 +- .../{ => legal-informations}/imprint/imprint.component.html | 0 .../{ => legal-informations}/imprint/imprint.component.scss | 0 .../imprint/imprint.component.spec.ts | 0 .../{ => legal-informations}/imprint/imprint.component.ts | 2 +- .../privacy-policy/privacy-policy.component.html | 0 .../privacy-policy/privacy-policy.component.scss | 0 .../privacy-policy/privacy-policy.component.spec.ts | 0 .../privacy-policy/privacy-policy.component.ts | 2 +- 21 files changed, 13 insertions(+), 13 deletions(-) rename src/app/shared/components/{ => header}/navbar/navbar.component.html (100%) rename src/app/shared/components/{ => header}/navbar/navbar.component.scss (100%) rename src/app/shared/components/{ => header}/navbar/navbar.component.spec.ts (100%) rename src/app/shared/components/{ => header}/navbar/navbar.component.ts (80%) rename src/app/shared/components/{ => legal-informations}/help/help.component.html (100%) rename src/app/shared/components/{ => legal-informations}/help/help.component.scss (100%) rename src/app/shared/components/{ => legal-informations}/help/help.component.spec.ts (100%) rename src/app/shared/components/{ => legal-informations}/help/help.component.ts (86%) rename src/app/shared/components/{ => legal-informations}/imprint/imprint.component.html (100%) rename src/app/shared/components/{ => legal-informations}/imprint/imprint.component.scss (100%) rename src/app/shared/components/{ => legal-informations}/imprint/imprint.component.spec.ts (100%) rename src/app/shared/components/{ => legal-informations}/imprint/imprint.component.ts (91%) rename src/app/shared/components/{ => legal-informations}/privacy-policy/privacy-policy.component.html (100%) rename src/app/shared/components/{ => legal-informations}/privacy-policy/privacy-policy.component.scss (100%) rename src/app/shared/components/{ => legal-informations}/privacy-policy/privacy-policy.component.spec.ts (100%) rename src/app/shared/components/{ => legal-informations}/privacy-policy/privacy-policy.component.ts (91%) diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 3be8915..8956a9d 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,8 +1,8 @@ import { Routes } from '@angular/router'; import { SummaryComponent } from './components/summary/summary.component'; -import { HelpComponent } from './shared/components/help/help.component'; -import { ImprintComponent } from './shared/components/imprint/imprint.component'; -import { PrivacyPolicyComponent } from './shared/components/privacy-policy/privacy-policy.component'; +import { HelpComponent } from './shared/components/legal-informations/help/help.component'; +import { ImprintComponent } from './shared/components/legal-informations/imprint/imprint.component'; +import { PrivacyPolicyComponent } from './shared/components/legal-informations/privacy-policy/privacy-policy.component'; import { AddTaskComponent } from './components/add-task/add-task.component'; import { BoardComponent } from './components/board/board.component'; import { ContactsComponent } from './components/contacts/contacts.component'; diff --git a/src/app/services/firebase.service.ts b/src/app/services/firebase.service.ts index 7293f90..7ed8514 100644 --- a/src/app/services/firebase.service.ts +++ b/src/app/services/firebase.service.ts @@ -115,7 +115,7 @@ export class FirebaseService implements OnDestroy { } getCurrentUserId() { - let currentUser = localStorage.getItem('currentUser'); + let currentUser = localStorage.getItem('currentUserJOIN'); if (currentUser !== null) { return JSON.parse(currentUser); } diff --git a/src/app/services/login.service.ts b/src/app/services/login.service.ts index 14db14c..87ac3ff 100644 --- a/src/app/services/login.service.ts +++ b/src/app/services/login.service.ts @@ -126,6 +126,6 @@ export class LoginService { } getUserIdInLocalStorage(userId: string) { - localStorage.setItem('currentUser', JSON.stringify(userId)); + localStorage.setItem('currentUserJOIN', JSON.stringify(userId)); } } diff --git a/src/app/services/shared.service.ts b/src/app/services/shared.service.ts index 57b227a..00956b8 100644 --- a/src/app/services/shared.service.ts +++ b/src/app/services/shared.service.ts @@ -46,7 +46,7 @@ export class SharedService { } deleteUserIdInLocalStorage() { - localStorage.removeItem('currentUser'); + localStorage.removeItem('currentUserJOIN'); } // RANDOM COLOR diff --git a/src/app/shared/components/header/header.component.ts b/src/app/shared/components/header/header.component.ts index acc5161..82b7fbb 100644 --- a/src/app/shared/components/header/header.component.ts +++ b/src/app/shared/components/header/header.component.ts @@ -1,6 +1,6 @@ import { Component, HostListener } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { NavbarComponent } from '../navbar/navbar.component'; +import { NavbarComponent } from './navbar/navbar.component'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { FirebaseService } from '../../../services/firebase.service'; diff --git a/src/app/shared/components/navbar/navbar.component.html b/src/app/shared/components/header/navbar/navbar.component.html similarity index 100% rename from src/app/shared/components/navbar/navbar.component.html rename to src/app/shared/components/header/navbar/navbar.component.html diff --git a/src/app/shared/components/navbar/navbar.component.scss b/src/app/shared/components/header/navbar/navbar.component.scss similarity index 100% rename from src/app/shared/components/navbar/navbar.component.scss rename to src/app/shared/components/header/navbar/navbar.component.scss diff --git a/src/app/shared/components/navbar/navbar.component.spec.ts b/src/app/shared/components/header/navbar/navbar.component.spec.ts similarity index 100% rename from src/app/shared/components/navbar/navbar.component.spec.ts rename to src/app/shared/components/header/navbar/navbar.component.spec.ts diff --git a/src/app/shared/components/navbar/navbar.component.ts b/src/app/shared/components/header/navbar/navbar.component.ts similarity index 80% rename from src/app/shared/components/navbar/navbar.component.ts rename to src/app/shared/components/header/navbar/navbar.component.ts index 9ba5aa2..f68dc4d 100644 --- a/src/app/shared/components/navbar/navbar.component.ts +++ b/src/app/shared/components/header/navbar/navbar.component.ts @@ -1,10 +1,10 @@ import { Component, Input } from '@angular/core'; import { Router, RouterModule } from '@angular/router'; -import { HeaderComponent } from '../header/header.component'; -import { LanguageService } from '../../../services/language.service'; +import { HeaderComponent } from '../header.component'; +import { LanguageService } from '../../../../services/language.service'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { SharedService } from '../../../services/shared.service'; +import { SharedService } from '../../../../services/shared.service'; @Component({ selector: 'app-navbar', diff --git a/src/app/shared/components/help/help.component.html b/src/app/shared/components/legal-informations/help/help.component.html similarity index 100% rename from src/app/shared/components/help/help.component.html rename to src/app/shared/components/legal-informations/help/help.component.html diff --git a/src/app/shared/components/help/help.component.scss b/src/app/shared/components/legal-informations/help/help.component.scss similarity index 100% rename from src/app/shared/components/help/help.component.scss rename to src/app/shared/components/legal-informations/help/help.component.scss diff --git a/src/app/shared/components/help/help.component.spec.ts b/src/app/shared/components/legal-informations/help/help.component.spec.ts similarity index 100% rename from src/app/shared/components/help/help.component.spec.ts rename to src/app/shared/components/legal-informations/help/help.component.spec.ts diff --git a/src/app/shared/components/help/help.component.ts b/src/app/shared/components/legal-informations/help/help.component.ts similarity index 86% rename from src/app/shared/components/help/help.component.ts rename to src/app/shared/components/legal-informations/help/help.component.ts index 30791bf..437f902 100644 --- a/src/app/shared/components/help/help.component.ts +++ b/src/app/shared/components/legal-informations/help/help.component.ts @@ -2,7 +2,7 @@ import { Component } from '@angular/core'; import { RouterModule } from '@angular/router'; import { Location } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { BtnBackComponent } from '../buttons/btn-back/btn-back.component'; +import { BtnBackComponent } from '../../buttons/btn-back/btn-back.component'; @Component({ selector: 'app-help', diff --git a/src/app/shared/components/imprint/imprint.component.html b/src/app/shared/components/legal-informations/imprint/imprint.component.html similarity index 100% rename from src/app/shared/components/imprint/imprint.component.html rename to src/app/shared/components/legal-informations/imprint/imprint.component.html diff --git a/src/app/shared/components/imprint/imprint.component.scss b/src/app/shared/components/legal-informations/imprint/imprint.component.scss similarity index 100% rename from src/app/shared/components/imprint/imprint.component.scss rename to src/app/shared/components/legal-informations/imprint/imprint.component.scss diff --git a/src/app/shared/components/imprint/imprint.component.spec.ts b/src/app/shared/components/legal-informations/imprint/imprint.component.spec.ts similarity index 100% rename from src/app/shared/components/imprint/imprint.component.spec.ts rename to src/app/shared/components/legal-informations/imprint/imprint.component.spec.ts diff --git a/src/app/shared/components/imprint/imprint.component.ts b/src/app/shared/components/legal-informations/imprint/imprint.component.ts similarity index 91% rename from src/app/shared/components/imprint/imprint.component.ts rename to src/app/shared/components/legal-informations/imprint/imprint.component.ts index b2323e3..e5ec453 100644 --- a/src/app/shared/components/imprint/imprint.component.ts +++ b/src/app/shared/components/legal-informations/imprint/imprint.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { CommonModule, Location } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { BtnBackComponent } from '../buttons/btn-back/btn-back.component'; +import { BtnBackComponent } from '../../buttons/btn-back/btn-back.component'; import { Router } from '@angular/router'; @Component({ diff --git a/src/app/shared/components/privacy-policy/privacy-policy.component.html b/src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.html similarity index 100% rename from src/app/shared/components/privacy-policy/privacy-policy.component.html rename to src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.html diff --git a/src/app/shared/components/privacy-policy/privacy-policy.component.scss b/src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.scss similarity index 100% rename from src/app/shared/components/privacy-policy/privacy-policy.component.scss rename to src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.scss diff --git a/src/app/shared/components/privacy-policy/privacy-policy.component.spec.ts b/src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.spec.ts similarity index 100% rename from src/app/shared/components/privacy-policy/privacy-policy.component.spec.ts rename to src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.spec.ts diff --git a/src/app/shared/components/privacy-policy/privacy-policy.component.ts b/src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.ts similarity index 91% rename from src/app/shared/components/privacy-policy/privacy-policy.component.ts rename to src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.ts index d01d8b4..fc2c492 100644 --- a/src/app/shared/components/privacy-policy/privacy-policy.component.ts +++ b/src/app/shared/components/legal-informations/privacy-policy/privacy-policy.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { CommonModule, Location } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { BtnBackComponent } from '../buttons/btn-back/btn-back.component'; +import { BtnBackComponent } from '../../buttons/btn-back/btn-back.component'; import { Router } from '@angular/router'; @Component({