From f2a789175686d91703ef96d204fd116ce6fc38cf Mon Sep 17 00:00:00 2001 From: Antoine PRONNIER <44138938+FunixG@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:15:17 +0200 Subject: [PATCH] Seo upgrades (#32) * wip seo upgrade, need fixing sitemap.xml * fix loading lib http on server side * fix loading seo sub class * fix all --- package-lock.json | 17 ++++- package.json | 1 + server.ts | 10 +-- src/app/app.component.ts | 2 +- .../notification/notification.component.ts | 4 +- .../pacifista-page/pacifista-page.ts | 65 +++++++++++++++++++ src/app/pages/accueil/accueil.component.ts | 13 +++- .../news/news-accueil-section.component.ts | 26 ++++++-- src/app/pages/join/join.component.ts | 17 +++-- src/app/pages/legal/cgu/cgu.component.ts | 17 +++-- src/app/pages/legal/cgv/cgv.component.ts | 17 +++-- .../news/news-card/news-card.component.ts | 4 +- .../news-list-page.component.html | 2 +- .../news-list-page.component.ts | 45 ++++++++----- .../news/news-page/news-page.component.ts | 50 ++++++++++---- .../shop-article-modal.component.html | 0 .../shop-article-modal.component.scss | 0 .../shop-article-modal.component.spec.ts | 4 +- .../shop-article-modal.component.ts | 4 +- .../shop-article/shop-article.component.html | 0 .../shop-article/shop-article.component.scss | 0 .../shop-article.component.spec.ts | 4 +- .../shop-article/shop-article.component.ts | 4 +- .../shop-articles.component.html | 0 .../shop-articles.component.scss | 2 +- .../shop-articles.component.spec.ts | 4 +- .../shop-articles/shop-articles.component.ts | 10 +-- .../shop-basket-little.component.html | 0 .../shop-basket-little.component.scss | 5 ++ .../shop-basket-little.component.spec.ts | 4 +- .../shop-basket-little.component.ts | 2 +- .../shop-categories.component.html | 0 .../shop-categories.component.scss | 0 .../shop-categories.component.spec.ts | 4 +- .../shop-categories.component.ts | 8 +-- .../shop-basket-little.component.scss | 5 -- .../shop-checkout/shop-checkout.component.ts | 16 ++++- src/app/pages/shop/shop.component.ts | 16 ++++- src/app/pages/shop/shop.module.ts | 10 +-- .../user-forgot-password.component.ts | 16 ++++- .../user/user-login/user-login.component.ts | 42 ++++++++---- .../user/user-page/user-page.component.ts | 34 +++++++--- .../user-register/user-register.component.ts | 32 ++++++--- src/app/pages/vote/vote.component.ts | 17 +++-- src/app/pages/wiki/wiki.component.ts | 16 ++++- src/app/services/core/http/dtos/ApiDTO.ts | 5 -- .../services/core/http/dtos/PaginatedDTO.ts | 16 ----- .../core/http/services/CrudHttpClient.ts | 61 ----------------- .../core/http/services/FunixProdHttpClient.ts | 28 -------- .../services/core/http/utils/QueryBuilder.ts | 46 ------------- .../users/dtos/UserCreationDTO.ts | 10 --- .../users/dtos/UserDTO.ts | 15 ----- .../users/dtos/UserLoginDTO.ts | 7 -- .../users/dtos/UserTokenDTO.ts | 8 --- .../users/services/UserService.ts | 40 ------------ .../entities/NotificationToast.ts | 0 .../notifications/enums/NotificationType.ts | 0 .../services/NotificationService.ts | 0 .../pacifista-api/news/dtos/NewsDTO.ts | 13 ---- .../news/services/NewsService.ts | 15 ----- .../shop/categories/dtos/ShopCategoryDTO.ts | 5 -- .../shop/categories/dtos/ShopItemDTO.ts | 9 --- src/index.html | 15 ++--- src/sitemap.xml | 41 +++++++----- 64 files changed, 428 insertions(+), 455 deletions(-) create mode 100644 src/app/components/pacifista-page/pacifista-page.ts rename src/app/pages/shop/{ => components}/shop-articles/shop-article-modal/shop-article-modal.component.html (100%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article-modal/shop-article-modal.component.scss (100%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts (78%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article-modal/shop-article-modal.component.ts (75%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article/shop-article.component.html (100%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article/shop-article.component.scss (100%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article/shop-article.component.spec.ts (79%) rename src/app/pages/shop/{ => components}/shop-articles/shop-article/shop-article.component.ts (81%) rename src/app/pages/shop/{ => components}/shop-articles/shop-articles.component.html (100%) rename src/app/pages/shop/{ => components}/shop-articles/shop-articles.component.scss (82%) rename src/app/pages/shop/{ => components}/shop-articles/shop-articles.component.spec.ts (79%) rename src/app/pages/shop/{ => components}/shop-articles/shop-articles.component.ts (75%) rename src/app/pages/shop/{ => components}/shop-basket-little/shop-basket-little.component.html (100%) create mode 100644 src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.scss rename src/app/pages/shop/{ => components}/shop-basket-little/shop-basket-little.component.spec.ts (78%) rename src/app/pages/shop/{ => components}/shop-basket-little/shop-basket-little.component.ts (82%) rename src/app/pages/shop/{ => components}/shop-categories/shop-categories.component.html (100%) rename src/app/pages/shop/{ => components}/shop-categories/shop-categories.component.scss (100%) rename src/app/pages/shop/{ => components}/shop-categories/shop-categories.component.spec.ts (78%) rename src/app/pages/shop/{ => components}/shop-categories/shop-categories.component.ts (56%) delete mode 100644 src/app/pages/shop/shop-basket-little/shop-basket-little.component.scss delete mode 100644 src/app/services/core/http/dtos/ApiDTO.ts delete mode 100644 src/app/services/core/http/dtos/PaginatedDTO.ts delete mode 100644 src/app/services/core/http/services/CrudHttpClient.ts delete mode 100644 src/app/services/core/http/services/FunixProdHttpClient.ts delete mode 100644 src/app/services/core/http/utils/QueryBuilder.ts delete mode 100644 src/app/services/funixproductions-api/users/dtos/UserCreationDTO.ts delete mode 100644 src/app/services/funixproductions-api/users/dtos/UserDTO.ts delete mode 100644 src/app/services/funixproductions-api/users/dtos/UserLoginDTO.ts delete mode 100644 src/app/services/funixproductions-api/users/dtos/UserTokenDTO.ts delete mode 100644 src/app/services/funixproductions-api/users/services/UserService.ts rename src/app/services/{core => }/notifications/entities/NotificationToast.ts (100%) rename src/app/services/{core => }/notifications/enums/NotificationType.ts (100%) rename src/app/services/{core => }/notifications/services/NotificationService.ts (100%) delete mode 100644 src/app/services/pacifista-api/news/dtos/NewsDTO.ts delete mode 100644 src/app/services/pacifista-api/news/services/NewsService.ts delete mode 100644 src/app/services/pacifista-api/shop/categories/dtos/ShopCategoryDTO.ts delete mode 100644 src/app/services/pacifista-api/shop/categories/dtos/ShopItemDTO.ts diff --git a/package-lock.json b/package-lock.json index bf2765e..69a0e06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pacifista-website", - "version": "0.0.3", + "version": "0.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pacifista-website", - "version": "0.0.3", + "version": "0.0.6", "dependencies": { "@angular/animations": "^16.1.5", "@angular/common": "^16.1.5", @@ -22,6 +22,7 @@ "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-regular-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@funixproductions/funixproductions-requests": "^0.0.3", "@ng-bootstrap/ng-bootstrap": "^15.1.0", "@nguniversal/express-engine": "^16.1.2", "@popperjs/core": "^2.11.8", @@ -2805,6 +2806,18 @@ "node": ">=6" } }, + "node_modules/@funixproductions/funixproductions-requests": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@funixproductions/funixproductions-requests/-/funixproductions-requests-0.0.3.tgz", + "integrity": "sha512-fYojiUQh9eOIisjD5o60H15dUsF+LmuGWKUlKMiPqUfjU12cJOyMwQB/58npyxiebiNxyB0RchH7z8DETiEUsg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": "^16.1.0", + "@angular/core": "^16.1.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", diff --git a/package.json b/package.json index 152712d..3c1972d 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@fortawesome/free-brands-svg-icons": "^6.4.0", "@fortawesome/free-regular-svg-icons": "^6.4.0", "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@funixproductions/funixproductions-requests": "^0.0.3", "@ng-bootstrap/ng-bootstrap": "^15.1.0", "@nguniversal/express-engine": "^16.1.2", "@popperjs/core": "^2.11.8", diff --git a/server.ts b/server.ts index 496256f..e9c49b2 100644 --- a/server.ts +++ b/server.ts @@ -1,12 +1,12 @@ import 'zone.js/node'; -import { APP_BASE_HREF } from '@angular/common'; -import { ngExpressEngine } from '@nguniversal/express-engine'; +import {APP_BASE_HREF} from '@angular/common'; +import {ngExpressEngine} from '@nguniversal/express-engine'; import * as express from 'express'; -import { existsSync } from 'fs'; -import { join } from 'path'; +import {existsSync} from 'fs'; +import {join} from 'path'; -import { AppServerModule } from './src/main.server'; +import {AppServerModule} from './src/main.server'; // The Express app is exported so that it can be used by serverless Functions. export function app(): express.Express { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 81efcfa..7836a79 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ import {Component, OnDestroy} from '@angular/core'; -import NotificationService from "./services/core/notifications/services/NotificationService"; +import NotificationService from "./services/notifications/services/NotificationService"; @Component({ selector: 'app-root', diff --git a/src/app/components/notification/notification.component.ts b/src/app/components/notification/notification.component.ts index 699d8fe..2003fe6 100644 --- a/src/app/components/notification/notification.component.ts +++ b/src/app/components/notification/notification.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; -import NotificationService from "../../services/core/notifications/services/NotificationService"; -import {NotificationType} from "../../services/core/notifications/enums/NotificationType"; +import NotificationService from "../../services/notifications/services/NotificationService"; +import {NotificationType} from "../../services/notifications/enums/NotificationType"; import {IconDefinition} from "@fortawesome/free-regular-svg-icons"; import {faCheckCircle, faExclamationTriangle, faInfoCircle} from "@fortawesome/free-solid-svg-icons"; diff --git a/src/app/components/pacifista-page/pacifista-page.ts b/src/app/components/pacifista-page/pacifista-page.ts new file mode 100644 index 0000000..d80e8fe --- /dev/null +++ b/src/app/components/pacifista-page/pacifista-page.ts @@ -0,0 +1,65 @@ +import {Component, OnInit} from "@angular/core"; +import {Title} from "@angular/platform-browser"; + +@Component({ template: ''}) +export abstract class PacifistaPage implements OnInit { + + protected title: string = ''; + protected canonicalPath: string = ''; + protected pageDescription: string = "Bienvenue sur Pacifista, le serveur Minecraft français survie créatif en 1.19 ! Rejoignez une communauté bienveillante, profitez d'un staff attentif et découvrez nos plugins faits maison."; + protected pageImage: string = 'https://pacifista.fr/assets/img/pacifista-logo.webp'; + + /** + * seo + * @param titleService the titleServiceManager + * @param doc Inject(DOCUMENT) private doc: Document + */ + constructor(protected titleService: Title, + private doc: Document) { + } + + ngOnInit(): void { + this.updateTitle(); + this.updateCanonicalPath(); + this.updateMetaTags(); + this.onPageInit(); + } + + protected onPageInit() { + } + + private updateTitle(): void { + const prefix = this.title.length > 0 ? this.title + ' - ' : ''; + this.titleService.setTitle(prefix + 'Pacifista Minecraft - Serveur Minecraft Survie Creatif Français en 1.19'); + } + + private updateCanonicalPath(): void { + const canonical = this.doc.createElement('link'); + canonical.setAttribute('rel', 'canonical'); + canonical.setAttribute('href', 'https://pacifista.fr/' + this.canonicalPath); + this.doc.head.appendChild(canonical); + } + + private updateMetaTags(): void { + this.setMetaTag('description', this.pageDescription) + + this.setMetaTag('og:title', this.titleService.getTitle()); + this.setMetaTag('og:description', this.pageDescription); + this.setMetaTag('og:image', this.pageImage); + this.setMetaTag('og:url', 'https://pacifista.fr/' + this.canonicalPath); + + this.setMetaTag('twitter:title', this.titleService.getTitle()); + this.setMetaTag('twitter:description', this.pageDescription); + this.setMetaTag('twitter:image', this.pageImage); + this.setMetaTag('twitter:url', 'https://pacifista.fr/' + this.canonicalPath); + } + + private setMetaTag(name: string, content: string): void { + const meta = this.doc.createElement('meta'); + meta.setAttribute('name', name); + meta.setAttribute('property', name); + meta.setAttribute('content', content); + this.doc.head.appendChild(meta); + } + +} diff --git a/src/app/pages/accueil/accueil.component.ts b/src/app/pages/accueil/accueil.component.ts index 0d5b6e7..a66044f 100644 --- a/src/app/pages/accueil/accueil.component.ts +++ b/src/app/pages/accueil/accueil.component.ts @@ -1,9 +1,18 @@ -import {Component} from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {Title} from "@angular/platform-browser"; +import {PacifistaPage} from "../../components/pacifista-page/pacifista-page"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-accueil', templateUrl: './accueil.component.html', styleUrls: ['./accueil.component.scss'] }) -export class AccueilComponent { +export class AccueilComponent extends PacifistaPage { + + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); + } + } diff --git a/src/app/pages/accueil/components/news/news-accueil-section.component.ts b/src/app/pages/accueil/components/news/news-accueil-section.component.ts index 68e529f..ca558f9 100644 --- a/src/app/pages/accueil/components/news/news-accueil-section.component.ts +++ b/src/app/pages/accueil/components/news/news-accueil-section.component.ts @@ -1,7 +1,13 @@ -import {AfterViewInit, Component} from '@angular/core'; -import NewsDTO from "../../../../services/pacifista-api/news/dtos/NewsDTO"; -import NewsService from "../../../../services/pacifista-api/news/services/NewsService"; -import {PageOption} from "../../../../services/core/http/dtos/PaginatedDTO"; +import {AfterViewInit, Component, Inject, PLATFORM_ID} from '@angular/core'; +import { + PacifistaNewsDTO, + PacifistaNewsService, + PageOption, + QueryBuilder +} from "@funixproductions/funixproductions-requests"; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../../../environments/environment"; +import {isPlatformBrowser} from "@angular/common"; @Component({ selector: 'news-section', @@ -10,18 +16,24 @@ import {PageOption} from "../../../../services/core/http/dtos/PaginatedDTO"; }) export class NewsAccueilSectionComponent implements AfterViewInit { - newsList: NewsDTO[] = []; + private readonly newsService: PacifistaNewsService; + + newsList: PacifistaNewsDTO[] = []; totalNews: number = 0; - constructor(private newsService: NewsService) { + constructor(@Inject(PLATFORM_ID) private platfomId: Object, + httpClient: HttpClient) { + this.newsService = new PacifistaNewsService(httpClient, environment.production); } ngAfterViewInit(): void { + if (!isPlatformBrowser(this.platfomId)) return; + const pageOption = new PageOption(); pageOption.elemsPerPage = 3; pageOption.sort = 'createdAt:desc'; - this.newsService.find(pageOption, null).subscribe(newsList => { + this.newsService.find(pageOption, new QueryBuilder()).subscribe(newsList => { this.newsList = newsList.content; this.totalNews = newsList.totalElementsDatabase; }); diff --git a/src/app/pages/join/join.component.ts b/src/app/pages/join/join.component.ts index 54cca14..a4a83b8 100644 --- a/src/app/pages/join/join.component.ts +++ b/src/app/pages/join/join.component.ts @@ -1,19 +1,22 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; import {Title} from "@angular/platform-browser"; +import {PacifistaPage} from "../../components/pacifista-page/pacifista-page"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-join', templateUrl: './join.component.html', styleUrls: ['./join.component.scss'] }) -export class JoinComponent { +export class JoinComponent extends PacifistaPage { - constructor(private titleService: Title) { - const title: string = titleService.getTitle(); + protected override readonly title: string = 'Se connecter' + protected override readonly canonicalPath: string = 'join' + protected override readonly pageDescription: string = 'Découvrez comment rejoindre Pacifista en 1.19 : votre guide pour jouer sur notre serveur Minecraft survie, créatif français !'; - if (!title.startsWith("Nous rejoindre")) { - titleService.setTitle('Nous rejoindre - ' + title); - } + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); } } diff --git a/src/app/pages/legal/cgu/cgu.component.ts b/src/app/pages/legal/cgu/cgu.component.ts index a874379..ace6504 100644 --- a/src/app/pages/legal/cgu/cgu.component.ts +++ b/src/app/pages/legal/cgu/cgu.component.ts @@ -1,19 +1,22 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; import {Title} from "@angular/platform-browser"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-cgu', templateUrl: './cgu.component.html', styleUrls: ['./cgu.component.scss'] }) -export class CguComponent { +export class CguComponent extends PacifistaPage { - constructor(private titleService: Title) { - const title: string = titleService.getTitle(); + protected override readonly title: string = "CGU"; + protected override readonly canonicalPath: string = "cgu"; + protected override readonly pageDescription: string = "Conditions générales d'utilisation de Pacifista."; - if (!title.startsWith("CGU")) { - titleService.setTitle('CGU - ' + title); - } + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); } } diff --git a/src/app/pages/legal/cgv/cgv.component.ts b/src/app/pages/legal/cgv/cgv.component.ts index a029724..9e9f009 100644 --- a/src/app/pages/legal/cgv/cgv.component.ts +++ b/src/app/pages/legal/cgv/cgv.component.ts @@ -1,19 +1,22 @@ -import {Component} from '@angular/core'; +import {Component, Inject} from '@angular/core'; import {Title} from "@angular/platform-browser"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-cgv', templateUrl: './cgv.component.html', styleUrls: ['./cgv.component.scss'] }) -export class CgvComponent { +export class CgvComponent extends PacifistaPage { - constructor(private titleService: Title) { - const title: string = titleService.getTitle(); + protected override readonly title: string = 'CGV'; + protected override readonly canonicalPath: string = 'cgv'; + protected override readonly pageDescription: string = 'Conditions générales de vente de Pacifista.'; - if (!title.startsWith("CGV")) { - titleService.setTitle('CGV - ' + title); - } + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); } } diff --git a/src/app/pages/news/news-card/news-card.component.ts b/src/app/pages/news/news-card/news-card.component.ts index eb87d4a..844f58f 100644 --- a/src/app/pages/news/news-card/news-card.component.ts +++ b/src/app/pages/news/news-card/news-card.component.ts @@ -1,6 +1,6 @@ import {Component, Input} from '@angular/core'; import {faClock, faComments, faThumbsUp, faUser} from '@fortawesome/free-solid-svg-icons'; -import NewsDTO from "../../../services/pacifista-api/news/dtos/NewsDTO"; +import {PacifistaNewsDTO} from "@funixproductions/funixproductions-requests"; @Component({ selector: 'app-news-card', @@ -14,6 +14,6 @@ export class NewsCardComponent { protected readonly faThumbsUp = faThumbsUp; protected readonly faComment = faComments; - @Input() news: NewsDTO = new NewsDTO(); + @Input() news: PacifistaNewsDTO = new PacifistaNewsDTO(); } diff --git a/src/app/pages/news/news-list-page/news-list-page.component.html b/src/app/pages/news/news-list-page/news-list-page.component.html index d7759e2..cfcebc1 100644 --- a/src/app/pages/news/news-list-page/news-list-page.component.html +++ b/src/app/pages/news/news-list-page/news-list-page.component.html @@ -3,7 +3,7 @@

News

Voici les news du serveur Minecraft Pacifista.
- Vous pouvez aussi les retrouver sur notre Twitter. + Vous pouvez aussi les retrouver sur notre Twitter.

{{ totalNews }} news au total diff --git a/src/app/pages/news/news-list-page/news-list-page.component.ts b/src/app/pages/news/news-list-page/news-list-page.component.ts index bb1f47e..411f5be 100644 --- a/src/app/pages/news/news-list-page/news-list-page.component.ts +++ b/src/app/pages/news/news-list-page/news-list-page.component.ts @@ -1,35 +1,48 @@ -import {AfterViewInit, Component} from '@angular/core'; +import {AfterViewInit, Component, Inject, PLATFORM_ID} from '@angular/core'; import {Title} from "@angular/platform-browser"; import {faTwitter} from "@fortawesome/free-brands-svg-icons"; -import NewsDTO from "../../../services/pacifista-api/news/dtos/NewsDTO"; -import NewsService from "../../../services/pacifista-api/news/services/NewsService"; -import {PageOption} from "../../../services/core/http/dtos/PaginatedDTO"; -import NotificationService from "../../../services/core/notifications/services/NotificationService"; +import NotificationService from "../../../services/notifications/services/NotificationService"; import {faSpinner} from "@fortawesome/free-solid-svg-icons"; +import { + PacifistaNewsDTO, + PacifistaNewsService, + PageOption, + QueryBuilder +} from "@funixproductions/funixproductions-requests"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../../environments/environment"; +import {DOCUMENT, isPlatformBrowser} from "@angular/common"; @Component({ selector: 'app-news-list-page', templateUrl: './news-list-page.component.html', styleUrls: ['./news-list-page.component.scss'] }) -export class NewsListPageComponent implements AfterViewInit { +export class NewsListPageComponent extends PacifistaPage implements AfterViewInit { + + protected override title: string = 'News'; + protected override canonicalPath: string = 'news' + protected override pageDescription: string = 'Toutes les news de Pacifista, events, mises à jour et annonces. Le serveur Minecraft français survie créatif !'; protected readonly twitter = faTwitter; protected readonly loadingIcon = faSpinner; - protected newsList: NewsDTO[] = []; + protected newsList: PacifistaNewsDTO[] = []; protected pageOption: PageOption = new PageOption(); + protected queryBuilder: QueryBuilder = new QueryBuilder(); protected totalNews: number = 0; protected loading: boolean = true; - constructor(private titleService: Title, - private notificationService: NotificationService, - private newsService: NewsService) { - const title: string = titleService.getTitle(); + private newsService: PacifistaNewsService; - if (!title.startsWith("News")) { - titleService.setTitle('News - ' + title); - } + constructor(private notificationService: NotificationService, + @Inject(PLATFORM_ID) private platfomId: Object, + titleService: Title, + @Inject(DOCUMENT) doc: Document, + httpClient: HttpClient) { + super(titleService, doc); + this.newsService = new PacifistaNewsService(httpClient, environment.production); this.pageOption.elemsPerPage = 10; this.pageOption.page = 0; @@ -37,6 +50,8 @@ export class NewsListPageComponent implements AfterViewInit { } ngAfterViewInit(): void { + if (!isPlatformBrowser(this.platfomId)) return; + this.loadNews(); } @@ -50,7 +65,7 @@ export class NewsListPageComponent implements AfterViewInit { this.loading = true; this.pageOption.page = page; - this.newsService.find(this.pageOption, null).subscribe({ + this.newsService.find(this.pageOption, this.queryBuilder).subscribe({ next: (newsList) => { this.totalNews = newsList.totalElementsDatabase; this.newsList.push(...newsList.content); diff --git a/src/app/pages/news/news-page/news-page.component.ts b/src/app/pages/news/news-page/news-page.component.ts index 7596a30..9013589 100644 --- a/src/app/pages/news/news-page/news-page.component.ts +++ b/src/app/pages/news/news-page/news-page.component.ts @@ -1,24 +1,45 @@ -import {Component} from '@angular/core'; -import NewsService from "../../../services/pacifista-api/news/services/NewsService"; +import {Component, Inject, PLATFORM_ID} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; -import NotificationService from "../../../services/core/notifications/services/NotificationService"; -import NewsDTO from "../../../services/pacifista-api/news/dtos/NewsDTO"; -import {QueryBuilder, QueryParam} from "../../../services/core/http/utils/QueryBuilder"; -import {PageOption} from "../../../services/core/http/dtos/PaginatedDTO"; +import NotificationService from "../../../services/notifications/services/NotificationService"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import { + PacifistaNewsDTO, + PacifistaNewsService, + PageOption, + QueryBuilder, + QueryParam +} from "@funixproductions/funixproductions-requests"; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../../environments/environment"; +import {DOCUMENT, isPlatformBrowser} from "@angular/common"; @Component({ selector: 'app-news-page', templateUrl: './news-page.component.html', styleUrls: ['./news-page.component.scss'] }) -export class NewsPageComponent { +export class NewsPageComponent extends PacifistaPage { - protected news?: NewsDTO; + protected override title: string = 'News'; + protected override canonicalPath: string = 'news'; + protected override pageDescription: string = 'Découvrez la news de Pacifista !'; - constructor(private newsService: NewsService, - private notificationService: NotificationService, + protected news?: PacifistaNewsDTO; + protected readonly newsService: PacifistaNewsService; + + constructor(private notificationService: NotificationService, private router: Router, - private activatedRoute: ActivatedRoute) { + private activatedRoute: ActivatedRoute, + @Inject(PLATFORM_ID) private platfomId: Object, + httpClient: HttpClient, + titleService: Title, + @Inject(DOCUMENT) doc: Document) { + super(titleService, doc); + this.newsService = new PacifistaNewsService(httpClient, environment.production); + + if (!isPlatformBrowser(this.platfomId)) return; + this.activatedRoute.params.subscribe(params => { const newsName = params['newsName']; @@ -33,6 +54,13 @@ export class NewsPageComponent { next: (news) => { if (news.content.length > 0) { this.news = news.content[0]; + + this.title = 'News - ' + this.news.name; + this.canonicalPath = 'news/' + this.news.name; + this.pageDescription = this.news.subtitle || this.pageDescription; + this.pageImage = this.news.articleImageUrl || this.pageImage; + } else { + this.notificationService.error("La news n'existe pas."); } }, error: (error) => { diff --git a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.html b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.html similarity index 100% rename from src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.html rename to src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.html diff --git a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.scss b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.scss similarity index 100% rename from src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.scss rename to src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.scss diff --git a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts similarity index 78% rename from src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts rename to src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts index 866b05b..77a1389 100644 --- a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts +++ b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { ShopArticleModalComponent } from './shop-article-modal.component'; +import {ShopArticleModalComponent} from './shop-article-modal.component'; describe('ShopArticleModalComponent', () => { let component: ShopArticleModalComponent; diff --git a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.ts b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.ts similarity index 75% rename from src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.ts rename to src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.ts index cb93a81..fc40af6 100644 --- a/src/app/pages/shop/shop-articles/shop-article-modal/shop-article-modal.component.ts +++ b/src/app/pages/shop/components/shop-articles/shop-article-modal/shop-article-modal.component.ts @@ -1,7 +1,7 @@ import {Component, Input} from '@angular/core'; -import ShopItemDTO from "../../../../services/pacifista-api/shop/categories/dtos/ShopItemDTO"; import {NgbActiveModal} from "@ng-bootstrap/ng-bootstrap"; import {faCartArrowDown} from "@fortawesome/free-solid-svg-icons"; +import {PacifistaShopArticleDTO} from "@funixproductions/funixproductions-requests"; @Component({ selector: 'app-shop-article-modal', @@ -12,7 +12,7 @@ export class ShopArticleModalComponent { protected readonly faCartDown = faCartArrowDown; - @Input() article: ShopItemDTO = new ShopItemDTO(); + @Input() article: PacifistaShopArticleDTO = new PacifistaShopArticleDTO(); constructor(public activeModal: NgbActiveModal) { } diff --git a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.html b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.html similarity index 100% rename from src/app/pages/shop/shop-articles/shop-article/shop-article.component.html rename to src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.html diff --git a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.scss b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.scss similarity index 100% rename from src/app/pages/shop/shop-articles/shop-article/shop-article.component.scss rename to src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.scss diff --git a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.spec.ts b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.spec.ts similarity index 79% rename from src/app/pages/shop/shop-articles/shop-article/shop-article.component.spec.ts rename to src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.spec.ts index 676ba2a..47074c3 100644 --- a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.spec.ts +++ b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { ShopArticleComponent } from './shop-article.component'; +import {ShopArticleComponent} from './shop-article.component'; describe('ShopArticleComponent', () => { let component: ShopArticleComponent; diff --git a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.ts b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.ts similarity index 81% rename from src/app/pages/shop/shop-articles/shop-article/shop-article.component.ts rename to src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.ts index 0848bab..05cfe16 100644 --- a/src/app/pages/shop/shop-articles/shop-article/shop-article.component.ts +++ b/src/app/pages/shop/components/shop-articles/shop-article/shop-article.component.ts @@ -1,8 +1,8 @@ import {Component, Input} from '@angular/core'; -import ShopItemDTO from "../../../../services/pacifista-api/shop/categories/dtos/ShopItemDTO"; import {NgbModal} from "@ng-bootstrap/ng-bootstrap"; import {ShopArticleModalComponent} from "../shop-article-modal/shop-article-modal.component"; import {faCartArrowDown} from "@fortawesome/free-solid-svg-icons"; +import {PacifistaShopArticleDTO} from "@funixproductions/funixproductions-requests"; @Component({ selector: 'app-shop-article', @@ -16,7 +16,7 @@ export class ShopArticleComponent { constructor(private modalService: NgbModal) { } - @Input() article: ShopItemDTO = new ShopItemDTO(); + @Input() article: PacifistaShopArticleDTO = new PacifistaShopArticleDTO(); openModal(): void { const modalRef = this.modalService.open(ShopArticleModalComponent, { centered: true}); diff --git a/src/app/pages/shop/shop-articles/shop-articles.component.html b/src/app/pages/shop/components/shop-articles/shop-articles.component.html similarity index 100% rename from src/app/pages/shop/shop-articles/shop-articles.component.html rename to src/app/pages/shop/components/shop-articles/shop-articles.component.html diff --git a/src/app/pages/shop/shop-articles/shop-articles.component.scss b/src/app/pages/shop/components/shop-articles/shop-articles.component.scss similarity index 82% rename from src/app/pages/shop/shop-articles/shop-articles.component.scss rename to src/app/pages/shop/components/shop-articles/shop-articles.component.scss index 59c0d9f..8a54b1b 100644 --- a/src/app/pages/shop/shop-articles/shop-articles.component.scss +++ b/src/app/pages/shop/components/shop-articles/shop-articles.component.scss @@ -1,5 +1,5 @@ .pacifista-sub-ad-container { - background-image: url("../../../../assets/img/accueil/bg_build.webp"); + background-image: url("../../../../../assets/img/accueil/bg_build.webp"); background-size: cover; background-repeat: no-repeat; background-position: center center; diff --git a/src/app/pages/shop/shop-articles/shop-articles.component.spec.ts b/src/app/pages/shop/components/shop-articles/shop-articles.component.spec.ts similarity index 79% rename from src/app/pages/shop/shop-articles/shop-articles.component.spec.ts rename to src/app/pages/shop/components/shop-articles/shop-articles.component.spec.ts index 6b05d87..4895540 100644 --- a/src/app/pages/shop/shop-articles/shop-articles.component.spec.ts +++ b/src/app/pages/shop/components/shop-articles/shop-articles.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { ShopArticlesComponent } from './shop-articles.component'; +import {ShopArticlesComponent} from './shop-articles.component'; describe('ShopArticlesComponent', () => { let component: ShopArticlesComponent; diff --git a/src/app/pages/shop/shop-articles/shop-articles.component.ts b/src/app/pages/shop/components/shop-articles/shop-articles.component.ts similarity index 75% rename from src/app/pages/shop/shop-articles/shop-articles.component.ts rename to src/app/pages/shop/components/shop-articles/shop-articles.component.ts index b55a10b..4f977b0 100644 --- a/src/app/pages/shop/shop-articles/shop-articles.component.ts +++ b/src/app/pages/shop/components/shop-articles/shop-articles.component.ts @@ -1,5 +1,5 @@ -import { Component } from '@angular/core'; -import ShopItemDTO from "../../../services/pacifista-api/shop/categories/dtos/ShopItemDTO"; +import {Component} from '@angular/core'; +import {PacifistaShopArticleDTO} from "@funixproductions/funixproductions-requests"; @Component({ selector: 'app-shop-articles', @@ -8,17 +8,17 @@ import ShopItemDTO from "../../../services/pacifista-api/shop/categories/dtos/Sh }) export class ShopArticlesComponent { - articlesList: ShopItemDTO[] = []; + articlesList: PacifistaShopArticleDTO[] = []; constructor() { - const article = new ShopItemDTO(); + const article = new PacifistaShopArticleDTO(); article.price = 14.99; article.name = "Grade Elite"; article.description = "Grade elite"; article.htmlDescription = "

Un super grade (à rédiger)

"; article.logoUrl = "https://pacifista.fr/app/webroot/img/shop/grades/Badge-Elite.png" - const article2 = new ShopItemDTO(); + const article2 = new PacifistaShopArticleDTO(); article2.price = 19.99; article2.name = "Grade légendaire"; article2.description = "Le grade le plus cool du serveur !"; diff --git a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.html b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.html similarity index 100% rename from src/app/pages/shop/shop-basket-little/shop-basket-little.component.html rename to src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.html diff --git a/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.scss b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.scss new file mode 100644 index 0000000..6945947 --- /dev/null +++ b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.scss @@ -0,0 +1,5 @@ +@import "src/app/pages/shop/shop.component"; + +.basket-div { + padding: 7%; +} diff --git a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.spec.ts b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.spec.ts similarity index 78% rename from src/app/pages/shop/shop-basket-little/shop-basket-little.component.spec.ts rename to src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.spec.ts index 4912987..cdeed73 100644 --- a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.spec.ts +++ b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { ShopBasketLittleComponent } from './shop-basket-little.component'; +import {ShopBasketLittleComponent} from './shop-basket-little.component'; describe('ShopBasketLittleComponent', () => { let component: ShopBasketLittleComponent; diff --git a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.ts b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.ts similarity index 82% rename from src/app/pages/shop/shop-basket-little/shop-basket-little.component.ts rename to src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.ts index cd97360..383f2b5 100644 --- a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.ts +++ b/src/app/pages/shop/components/shop-basket-little/shop-basket-little.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'app-shop-basket-little', diff --git a/src/app/pages/shop/shop-categories/shop-categories.component.html b/src/app/pages/shop/components/shop-categories/shop-categories.component.html similarity index 100% rename from src/app/pages/shop/shop-categories/shop-categories.component.html rename to src/app/pages/shop/components/shop-categories/shop-categories.component.html diff --git a/src/app/pages/shop/shop-categories/shop-categories.component.scss b/src/app/pages/shop/components/shop-categories/shop-categories.component.scss similarity index 100% rename from src/app/pages/shop/shop-categories/shop-categories.component.scss rename to src/app/pages/shop/components/shop-categories/shop-categories.component.scss diff --git a/src/app/pages/shop/shop-categories/shop-categories.component.spec.ts b/src/app/pages/shop/components/shop-categories/shop-categories.component.spec.ts similarity index 78% rename from src/app/pages/shop/shop-categories/shop-categories.component.spec.ts rename to src/app/pages/shop/components/shop-categories/shop-categories.component.spec.ts index 120c36e..3eff087 100644 --- a/src/app/pages/shop/shop-categories/shop-categories.component.spec.ts +++ b/src/app/pages/shop/components/shop-categories/shop-categories.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { ShopCategoriesComponent } from './shop-categories.component'; +import {ShopCategoriesComponent} from './shop-categories.component'; describe('ShopCategoriesComponent', () => { let component: ShopCategoriesComponent; diff --git a/src/app/pages/shop/shop-categories/shop-categories.component.ts b/src/app/pages/shop/components/shop-categories/shop-categories.component.ts similarity index 56% rename from src/app/pages/shop/shop-categories/shop-categories.component.ts rename to src/app/pages/shop/components/shop-categories/shop-categories.component.ts index 53567be..9282eaa 100644 --- a/src/app/pages/shop/shop-categories/shop-categories.component.ts +++ b/src/app/pages/shop/components/shop-categories/shop-categories.component.ts @@ -1,5 +1,5 @@ -import { Component } from '@angular/core'; -import ShopCategoryDTO from "../../../services/pacifista-api/shop/categories/dtos/ShopCategoryDTO"; +import {Component} from '@angular/core'; +import {PacifistaShopCategoryDTO} from "@funixproductions/funixproductions-requests"; @Component({ selector: 'app-shop-categories', @@ -8,10 +8,10 @@ import ShopCategoryDTO from "../../../services/pacifista-api/shop/categories/dto }) export class ShopCategoriesComponent { - categoriesList: ShopCategoryDTO[] = []; + categoriesList: PacifistaShopCategoryDTO[] = []; constructor() { - const gradesCategory = new ShopCategoryDTO(); + const gradesCategory = new PacifistaShopCategoryDTO(); gradesCategory.name = "Grades"; this.categoriesList.push(gradesCategory); diff --git a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.scss b/src/app/pages/shop/shop-basket-little/shop-basket-little.component.scss deleted file mode 100644 index 507a491..0000000 --- a/src/app/pages/shop/shop-basket-little/shop-basket-little.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "../shop.component"; - -.basket-div { - padding: 7%; -} diff --git a/src/app/pages/shop/shop-checkout/shop-checkout.component.ts b/src/app/pages/shop/shop-checkout/shop-checkout.component.ts index 6443695..b73029d 100644 --- a/src/app/pages/shop/shop-checkout/shop-checkout.component.ts +++ b/src/app/pages/shop/shop-checkout/shop-checkout.component.ts @@ -1,10 +1,22 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-shop-checkout', templateUrl: './shop-checkout.component.html', styleUrls: ['./shop-checkout.component.scss'] }) -export class ShopCheckoutComponent { +export class ShopCheckoutComponent extends PacifistaPage { + + protected override readonly title: string = "Boutique - Panier"; + protected override readonly canonicalPath: string = "shop/checkout"; + protected override readonly pageDescription: string = "Boutique de Pacifista. Soutenez le serveur minecraft avec des avantages uniques !"; + + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); + } } diff --git a/src/app/pages/shop/shop.component.ts b/src/app/pages/shop/shop.component.ts index 8adda28..f8d365f 100644 --- a/src/app/pages/shop/shop.component.ts +++ b/src/app/pages/shop/shop.component.ts @@ -1,10 +1,22 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {PacifistaPage} from "../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-shop', templateUrl: './shop.component.html', styleUrls: ['./shop.component.scss'] }) -export class ShopComponent { +export class ShopComponent extends PacifistaPage { + + protected override readonly title: string = "Boutique"; + protected override readonly canonicalPath: string = "shop"; + protected override readonly pageDescription: string = "Boutique de Pacifista. Soutenez le serveur minecraft avec des avantages uniques !"; + + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); + } } diff --git a/src/app/pages/shop/shop.module.ts b/src/app/pages/shop/shop.module.ts index 8f8da33..c2e1992 100644 --- a/src/app/pages/shop/shop.module.ts +++ b/src/app/pages/shop/shop.module.ts @@ -3,13 +3,13 @@ import {CommonModule} from '@angular/common'; import {ShopRoutingModule} from './shop-routing.module'; import {ShopComponent} from './shop.component'; -import {ShopCategoriesComponent} from './shop-categories/shop-categories.component'; -import {ShopArticlesComponent} from './shop-articles/shop-articles.component'; +import {ShopCategoriesComponent} from './components/shop-categories/shop-categories.component'; +import {ShopArticlesComponent} from './components/shop-articles/shop-articles.component'; import {FontAwesomeModule} from "@fortawesome/angular-fontawesome"; -import {ShopArticleComponent} from './shop-articles/shop-article/shop-article.component'; -import {ShopArticleModalComponent} from './shop-articles/shop-article-modal/shop-article-modal.component'; +import {ShopArticleComponent} from './components/shop-articles/shop-article/shop-article.component'; +import {ShopArticleModalComponent} from './components/shop-articles/shop-article-modal/shop-article-modal.component'; import {ShopCheckoutComponent} from './shop-checkout/shop-checkout.component'; -import {ShopBasketLittleComponent} from './shop-basket-little/shop-basket-little.component'; +import {ShopBasketLittleComponent} from './components/shop-basket-little/shop-basket-little.component'; @NgModule({ declarations: [ diff --git a/src/app/pages/user/user-forgot-password/user-forgot-password.component.ts b/src/app/pages/user/user-forgot-password/user-forgot-password.component.ts index 95aef79..7368e28 100644 --- a/src/app/pages/user/user-forgot-password/user-forgot-password.component.ts +++ b/src/app/pages/user/user-forgot-password/user-forgot-password.component.ts @@ -1,14 +1,26 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-user-forgot-password', templateUrl: './user-forgot-password.component.html', styleUrls: ['./user-forgot-password.component.scss'] }) -export class UserForgotPasswordComponent { +export class UserForgotPasswordComponent extends PacifistaPage { + + protected override title: string = 'Mot de passe oublié'; + protected override canonicalPath: string = 'user/forgotpassword'; + protected override pageDescription: string = 'Page de récupération de mot de passe.'; email: string = ''; + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); + } + sendRequestReset() { } diff --git a/src/app/pages/user/user-login/user-login.component.ts b/src/app/pages/user/user-login/user-login.component.ts index f61e30a..436c6ce 100644 --- a/src/app/pages/user/user-login/user-login.component.ts +++ b/src/app/pages/user/user-login/user-login.component.ts @@ -1,28 +1,44 @@ -import {Component} from '@angular/core'; -import UserService from "../../../services/funixproductions-api/users/services/UserService"; +import {Component, Inject} from '@angular/core'; import {ReCaptchaV3Service} from "ng-recaptcha"; import {Router} from "@angular/router"; -import UserLoginDTO from "../../../services/funixproductions-api/users/dtos/UserLoginDTO"; -import UserTokenDTO from "../../../services/funixproductions-api/users/dtos/UserTokenDTO"; -import NotificationService from "../../../services/core/notifications/services/NotificationService"; -import FunixProdHttpClient from "../../../services/core/http/services/FunixProdHttpClient"; -import NotificationToast from "../../../services/core/notifications/entities/NotificationToast"; +import NotificationService from "../../../services/notifications/services/NotificationService"; +import { + FunixprodHttpClient, + UserAuthService, + UserLoginDTO, + UserTokenDTO +} from "@funixproductions/funixproductions-requests"; +import {Title} from "@angular/platform-browser"; +import {HttpClient} from "@angular/common/http"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {environment} from "../../../../environments/environment"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-user-login', templateUrl: './user-login.component.html', styleUrls: ['./user-login.component.scss'] }) -export class UserLoginComponent { +export class UserLoginComponent extends PacifistaPage { + + protected override title: string = 'Connexion'; + protected override canonicalPath: string = 'user/login'; + protected override pageDescription: string = 'Connexion sur le site de Pacifista. Page de connexion.'; username: string = ''; password: string = ''; stayLogin: boolean = false; - constructor(private userAuthService: UserService, - private reCaptchaService: ReCaptchaV3Service, + private userAuthService: UserAuthService; + + constructor(private reCaptchaService: ReCaptchaV3Service, private router: Router, - private notificationService: NotificationService) { + private notificationService: NotificationService, + titleService: Title, + @Inject(DOCUMENT) doc: Document, + httpClient: HttpClient) { + super(titleService, doc); + this.userAuthService = new UserAuthService(httpClient, environment.production); } login(): void { @@ -35,10 +51,10 @@ export class UserLoginComponent { this.userAuthService.login(loginRequest, token).subscribe({ next: (loginDto: UserTokenDTO) => { if (loginDto.token) { - localStorage.setItem(FunixProdHttpClient.LOCAL_STORAGE_KEY_AUTH, loginDto.token); + localStorage.setItem(FunixprodHttpClient.accessTokenLocalStorageName, loginDto.token); this.router.navigate(['user']) } else { - this.notificationService.show(new NotificationToast('Erreur', 'Une erreur est survenue lors de la connexion')); + this.notificationService.error('Une erreur est survenue lors de la connexion'); } }, error: err => { diff --git a/src/app/pages/user/user-page/user-page.component.ts b/src/app/pages/user/user-page/user-page.component.ts index 209234a..e8011a0 100644 --- a/src/app/pages/user/user-page/user-page.component.ts +++ b/src/app/pages/user/user-page/user-page.component.ts @@ -1,26 +1,42 @@ -import {Component, OnInit} from '@angular/core'; -import UserService from "../../../services/funixproductions-api/users/services/UserService"; +import {Component, Inject, PLATFORM_ID} from '@angular/core'; import {Router} from "@angular/router"; -import {UserDTO} from "../../../services/funixproductions-api/users/dtos/UserDTO"; -import { faSearch } from '@fortawesome/free-solid-svg-icons'; +import {faSearch} from '@fortawesome/free-solid-svg-icons'; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {UserAuthService, UserDTO} from "@funixproductions/funixproductions-requests"; +import {Title} from "@angular/platform-browser"; +import {environment} from "../../../../environments/environment"; +import {HttpClient} from "@angular/common/http"; +import {DOCUMENT, isPlatformBrowser} from "@angular/common"; @Component({ selector: 'app-user-page', templateUrl: './user-page.component.html', styleUrls: ['./user-page.component.scss'] }) -export class UserPageComponent implements OnInit { +export class UserPageComponent extends PacifistaPage { + + protected override title: string = 'Profil'; + protected override canonicalPath: string = 'user'; + protected override pageDescription: string = 'Page de profil utilisateur.'; protected readonly faSearch = faSearch; + private readonly authService: UserAuthService; user?: UserDTO; - constructor(private userService: UserService, - private router: Router) { + constructor(private router: Router, + @Inject(PLATFORM_ID) private platfomId: Object, + title: Title, + @Inject(DOCUMENT) doc: Document, + httpClient: HttpClient) { + super(title, doc); + this.authService = new UserAuthService(httpClient, environment.production); } - ngOnInit(): void { - this.userService.currentUser().subscribe({ + protected override onPageInit() { + if (!isPlatformBrowser(this.platfomId)) return; + + this.authService.currentUser().subscribe({ next: value => { this.user = value; }, diff --git a/src/app/pages/user/user-register/user-register.component.ts b/src/app/pages/user/user-register/user-register.component.ts index 9e8054a..4c222ef 100644 --- a/src/app/pages/user/user-register/user-register.component.ts +++ b/src/app/pages/user/user-register/user-register.component.ts @@ -1,15 +1,24 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; import {Router} from "@angular/router"; -import UserService from "../../../services/funixproductions-api/users/services/UserService"; import {ReCaptchaV3Service} from "ng-recaptcha"; -import UserCreationDTO from "../../../services/funixproductions-api/users/dtos/UserCreationDTO"; +import {UserAuthService, UserCreationDTO} from "@funixproductions/funixproductions-requests"; +import {PacifistaPage} from "../../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../../../environments/environment"; +import NotificationService from "../../../services/notifications/services/NotificationService"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-user-register', templateUrl: './user-register.component.html', styleUrls: ['./user-register.component.scss'] }) -export class UserRegisterComponent { +export class UserRegisterComponent extends PacifistaPage { + + protected override title: string = 'Inscription'; + protected override canonicalPath: string = 'user/register'; + protected override pageDescription: string = 'Inscription sur le site de Pacifista. Page de création de compte.'; username: string = ''; email: string = ''; @@ -18,9 +27,16 @@ export class UserRegisterComponent { acceptCgu: boolean = false; acceptCgv: boolean = false; - constructor(private userAuthService: UserService, - private reCaptchaService: ReCaptchaV3Service, - private router: Router) { + private readonly userAuthService: UserAuthService; + + constructor(private reCaptchaService: ReCaptchaV3Service, + private router: Router, + private notificationService: NotificationService, + titleService: Title, + @Inject(DOCUMENT) doc: Document, + httpClient: HttpClient) { + super(titleService, doc); + this.userAuthService = new UserAuthService(httpClient, environment.production); } register(): void { @@ -38,7 +54,7 @@ export class UserRegisterComponent { this.router.navigate(['user', 'login']); }, error: err => { - //todo popup error + this.notificationService.onErrorRequest(err, 'Erreur lors de la création de compte.'); } } ) diff --git a/src/app/pages/vote/vote.component.ts b/src/app/pages/vote/vote.component.ts index ae4fe31..9631341 100644 --- a/src/app/pages/vote/vote.component.ts +++ b/src/app/pages/vote/vote.component.ts @@ -1,19 +1,22 @@ -import {Component} from '@angular/core'; +import {Component, Inject} from '@angular/core'; import {Title} from "@angular/platform-browser"; +import {PacifistaPage} from "../../components/pacifista-page/pacifista-page"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-vote-page', templateUrl: './vote.component.html', styleUrls: ['./vote.component.scss'] }) -export class VoteComponent { +export class VoteComponent extends PacifistaPage { - constructor(private titleService: Title) { - const title: string = titleService.getTitle(); + protected override readonly title: string = "Voter"; + protected override readonly canonicalPath: string = "vote"; + protected override readonly pageDescription: string = "Votez pour Pacifista et recevez des récompenses en jeu. Aidez-nous à faire connaître le serveur !"; - if (!title.startsWith("Voter")) { - titleService.setTitle('Voter - ' + title); - } + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); } } diff --git a/src/app/pages/wiki/wiki.component.ts b/src/app/pages/wiki/wiki.component.ts index 2e22d3c..18020b8 100644 --- a/src/app/pages/wiki/wiki.component.ts +++ b/src/app/pages/wiki/wiki.component.ts @@ -1,10 +1,22 @@ -import { Component } from '@angular/core'; +import {Component, Inject} from '@angular/core'; +import {PacifistaPage} from "../../components/pacifista-page/pacifista-page"; +import {Title} from "@angular/platform-browser"; +import {DOCUMENT} from "@angular/common"; @Component({ selector: 'app-wiki', templateUrl: './wiki.component.html', styleUrls: ['./wiki.component.scss'] }) -export class WikiComponent { +export class WikiComponent extends PacifistaPage { + + protected override readonly title: string = "Wiki"; + protected override readonly canonicalPath: string = "wiki"; + protected override readonly pageDescription: string = "Wiki de Pacifista. Retrouvez toutes les informations sur le serveur minecraft et comment jouer ! Claims, Créatif, Métiers, Jobs et bien plus !"; + + constructor(title: Title, + @Inject(DOCUMENT) doc: Document) { + super(title, doc); + } } diff --git a/src/app/services/core/http/dtos/ApiDTO.ts b/src/app/services/core/http/dtos/ApiDTO.ts deleted file mode 100644 index 062250a..0000000 --- a/src/app/services/core/http/dtos/ApiDTO.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default abstract class ApiDTO { - id?: string; - createdAt?: Date; - updatedAt?: Date; -} diff --git a/src/app/services/core/http/dtos/PaginatedDTO.ts b/src/app/services/core/http/dtos/PaginatedDTO.ts deleted file mode 100644 index 63cf545..0000000 --- a/src/app/services/core/http/dtos/PaginatedDTO.ts +++ /dev/null @@ -1,16 +0,0 @@ -import ApiDTO from "./ApiDTO"; - -export class Paginated { - content: T[] = []; - actualPage: number = 0; - totalPages: number = 1; - totalElementsThisPage: number = 0; - totalElementsDatabase: number = 0; -} - -export class PageOption { - elemsPerPage: number = 15; - page: number = 0; - sort: string = ''; -} - diff --git a/src/app/services/core/http/services/CrudHttpClient.ts b/src/app/services/core/http/services/CrudHttpClient.ts deleted file mode 100644 index 19076d3..0000000 --- a/src/app/services/core/http/services/CrudHttpClient.ts +++ /dev/null @@ -1,61 +0,0 @@ -import {HttpClient, HttpParams} from "@angular/common/http"; -import {Observable} from "rxjs"; -import ApiDTO from "../dtos/ApiDTO"; -import FunixProdHttpClient from "./FunixProdHttpClient"; -import {environment} from "../../../../../environments/environment"; -import {PageOption, Paginated} from "../dtos/PaginatedDTO"; -import {QueryBuilder} from "../utils/QueryBuilder"; - -interface RequestParams { - elemsPerPage?: number; - page?: number; - sort?: string; - search?: string; -} - -export default abstract class CrudHttpClient extends FunixProdHttpClient { - - domain: string = environment.funixProductionsApiDomain; - path: string = ''; - - protected constructor(protected http: HttpClient) { - super(); - } - - /** - * Find and search - * @param options set the data returned amount - * @param queryBuilder can be null new QueryBuilder().addParam({key: "mdr", type: QueryBuilder.like, value: "mdr"}) - */ - find(options: PageOption, queryBuilder: QueryBuilder | null): Observable> { - const params: RequestParams = { - page: options.page, - elemsPerPage: options.elemsPerPage || 10, - sort: options.sort!, - search: (queryBuilder === null ? '' : queryBuilder.get()) - }; - - return this.http.get>(this.domain + this.path, {headers: this.getHeaders(), params: {...params}}); - } - - getById(id: string): Observable { - return this.http.get(this.domain + this.path + "/" + id, {headers: this.getHeaders()}); - } - - create(dto: DTO): Observable { - return this.http.post(this.domain + this.path, dto, {headers: this.getHeaders()}) - } - - patch(dto: DTO): Observable { - return this.http.patch(this.domain + this.path, dto, {headers: this.getHeaders()}) - } - - delete(id: string): Observable { - const httpParams: HttpParams = new HttpParams().set('id', id); - - return this.http.delete(this.domain + this.path, { - params: httpParams, - headers: this.getHeaders() - }) - } -} diff --git a/src/app/services/core/http/services/FunixProdHttpClient.ts b/src/app/services/core/http/services/FunixProdHttpClient.ts deleted file mode 100644 index a49e282..0000000 --- a/src/app/services/core/http/services/FunixProdHttpClient.ts +++ /dev/null @@ -1,28 +0,0 @@ -import {HttpHeaders} from "@angular/common/http"; - -export default abstract class FunixProdHttpClient { - - public static readonly LOCAL_STORAGE_KEY_AUTH = 'user-token-requests'; - - getHeaders(): HttpHeaders { - let headers = new HttpHeaders({ - 'Content-Type': 'application/json' - }); - - const bearerToken: string | null = this.getBearer(); - if (bearerToken !== null) { - headers = headers.append('Authorization', 'Bearer ' + bearerToken); - } - - return headers; - } - - protected getBearer(): string | null { - if (typeof localStorage !== 'undefined') { - return localStorage.getItem(FunixProdHttpClient.LOCAL_STORAGE_KEY_AUTH); - } else { - return null; - } - } - -} diff --git a/src/app/services/core/http/utils/QueryBuilder.ts b/src/app/services/core/http/utils/QueryBuilder.ts deleted file mode 100644 index df65b39..0000000 --- a/src/app/services/core/http/utils/QueryBuilder.ts +++ /dev/null @@ -1,46 +0,0 @@ -export class QueryParam { - key: string = ''; - type: string = ':eq:'; - value?: string | string[]; -} - -export class QueryBuilder { - - static like: string = ':like:' - static equal: string = ':eq:' - static notEqual: string = ':neq:' - static greater: string = ':gt:' - static lower: string = ':lt:' - - queryArray: QueryParam[] = []; - - get(): string { - if (this.queryArray.length <= 0) { - return ""; - } - const queryList: string[] = []; - this.queryArray.forEach(it => { - if (Array.isArray(it.value)) { - if (it.value.length === 1) { - queryList.push(it.key + it.type + it.value[0]) - } else { - queryList.push(it.key + it.type + '[' + it.value.join('|') + ']') - } - } else { - queryList.push(it.key + it.type + it.value) - } - }); - return queryList.join(','); - } - - addParam(param: QueryParam) : QueryBuilder { - if (param?.value && param.value.length > 0) { - this.queryArray.push(param); - } - return this; - } - - reset(): void { - this.queryArray = []; - } -} diff --git a/src/app/services/funixproductions-api/users/dtos/UserCreationDTO.ts b/src/app/services/funixproductions-api/users/dtos/UserCreationDTO.ts deleted file mode 100644 index 58e7f4b..0000000 --- a/src/app/services/funixproductions-api/users/dtos/UserCreationDTO.ts +++ /dev/null @@ -1,10 +0,0 @@ -import ApiDTO from "../../../core/http/dtos/ApiDTO"; - -export default class UserCreationDTO extends ApiDTO { - username: string = ''; - email: string = ''; - password: string = ''; - passwordConfirmation: string = ''; - acceptCGV: boolean = false; - acceptCGU: boolean = false; -} diff --git a/src/app/services/funixproductions-api/users/dtos/UserDTO.ts b/src/app/services/funixproductions-api/users/dtos/UserDTO.ts deleted file mode 100644 index 2b2d941..0000000 --- a/src/app/services/funixproductions-api/users/dtos/UserDTO.ts +++ /dev/null @@ -1,15 +0,0 @@ -import ApiDTO from "../../../core/http/dtos/ApiDTO"; - -export enum UserRole { - USER = "USER", - MODERATOR = "MODERATOR", - PACIFISTA_MODERATOR = "PACIFISTA_MODERATOR", - PACIFISTA_ADMIN = "PACIFISTA_ADMIN", - ADMIN = "ADMIN" -} - -export class UserDTO extends ApiDTO { - username?: string; - email?: string; - role?: UserRole -} diff --git a/src/app/services/funixproductions-api/users/dtos/UserLoginDTO.ts b/src/app/services/funixproductions-api/users/dtos/UserLoginDTO.ts deleted file mode 100644 index f8fc928..0000000 --- a/src/app/services/funixproductions-api/users/dtos/UserLoginDTO.ts +++ /dev/null @@ -1,7 +0,0 @@ -import ApiDTO from "../../../core/http/dtos/ApiDTO"; - -export default class UserLoginDTO extends ApiDTO { - username: string = ''; - password: string = ''; - stayConnected: boolean = false; -} diff --git a/src/app/services/funixproductions-api/users/dtos/UserTokenDTO.ts b/src/app/services/funixproductions-api/users/dtos/UserTokenDTO.ts deleted file mode 100644 index 39a84c8..0000000 --- a/src/app/services/funixproductions-api/users/dtos/UserTokenDTO.ts +++ /dev/null @@ -1,8 +0,0 @@ -import ApiDTO from "../../../core/http/dtos/ApiDTO"; -import {UserDTO} from "./UserDTO"; - -export default class UserTokenDTO extends ApiDTO { - user?: UserDTO; - token?: string; - expirationDate?: Date -} diff --git a/src/app/services/funixproductions-api/users/services/UserService.ts b/src/app/services/funixproductions-api/users/services/UserService.ts deleted file mode 100644 index b9c4e09..0000000 --- a/src/app/services/funixproductions-api/users/services/UserService.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {UserDTO} from "../dtos/UserDTO"; -import {environment} from "../../../../../environments/environment"; -import {HttpClient} from "@angular/common/http"; -import {Observable} from "rxjs"; -import FunixProdHttpClient from "../../../core/http/services/FunixProdHttpClient"; -import UserCreationDTO from "../dtos/UserCreationDTO"; -import UserLoginDTO from "../dtos/UserLoginDTO"; -import UserTokenDTO from "../dtos/UserTokenDTO"; -import {Injectable} from "@angular/core"; - -@Injectable({ - providedIn: 'root' -}) -export default class UserService extends FunixProdHttpClient { - private readonly captchaHeaderCode = 'X-Captcha-Google-Code'; - - url: string = environment.funixProductionsApiDomain + 'user/auth/'; - - constructor(protected httpClient: HttpClient) { - super(); - } - - register(request: UserCreationDTO, captchaCode: string): Observable { - let headers = this.getHeaders(); - headers = headers.set(this.captchaHeaderCode, captchaCode); - - return this.httpClient.post(this.url + 'register', request, {headers: headers}); - } - - login(request: UserLoginDTO, captchaCode: string): Observable { - let headers = this.getHeaders(); - headers = headers.set(this.captchaHeaderCode, captchaCode); - - return this.httpClient.post(this.url + 'login', request, {headers: headers}); - } - - currentUser(): Observable { - return this.httpClient.get(this.url + 'current', {headers: this.getHeaders()}); - } -} diff --git a/src/app/services/core/notifications/entities/NotificationToast.ts b/src/app/services/notifications/entities/NotificationToast.ts similarity index 100% rename from src/app/services/core/notifications/entities/NotificationToast.ts rename to src/app/services/notifications/entities/NotificationToast.ts diff --git a/src/app/services/core/notifications/enums/NotificationType.ts b/src/app/services/notifications/enums/NotificationType.ts similarity index 100% rename from src/app/services/core/notifications/enums/NotificationType.ts rename to src/app/services/notifications/enums/NotificationType.ts diff --git a/src/app/services/core/notifications/services/NotificationService.ts b/src/app/services/notifications/services/NotificationService.ts similarity index 100% rename from src/app/services/core/notifications/services/NotificationService.ts rename to src/app/services/notifications/services/NotificationService.ts diff --git a/src/app/services/pacifista-api/news/dtos/NewsDTO.ts b/src/app/services/pacifista-api/news/dtos/NewsDTO.ts deleted file mode 100644 index 1638459..0000000 --- a/src/app/services/pacifista-api/news/dtos/NewsDTO.ts +++ /dev/null @@ -1,13 +0,0 @@ -import ApiDTO from "../../../core/http/dtos/ApiDTO"; - -export default class NewsDTO extends ApiDTO { - originalWriter?: string; - updateWriter?: string; - name?: string; - title?: string; - subtitle?: string; - articleImageUrl?: string; - body?: string; - likesAmount?: number; - commentsAmount?: number; -} diff --git a/src/app/services/pacifista-api/news/services/NewsService.ts b/src/app/services/pacifista-api/news/services/NewsService.ts deleted file mode 100644 index 1f24e0e..0000000 --- a/src/app/services/pacifista-api/news/services/NewsService.ts +++ /dev/null @@ -1,15 +0,0 @@ -import CrudHttpClient from "../../../core/http/services/CrudHttpClient"; -import NewsDTO from "../dtos/NewsDTO"; -import {environment} from "../../../../../environments/environment"; -import {Injectable} from "@angular/core"; -import {HttpClient} from "@angular/common/http"; - -@Injectable({providedIn: 'root'}) -export default class NewsService extends CrudHttpClient { - override domain: string = environment.pacifistaApiDomain; - override path: string = 'web/news'; - - constructor(protected httpClient: HttpClient) { - super(httpClient); - } -} diff --git a/src/app/services/pacifista-api/shop/categories/dtos/ShopCategoryDTO.ts b/src/app/services/pacifista-api/shop/categories/dtos/ShopCategoryDTO.ts deleted file mode 100644 index 73e2fec..0000000 --- a/src/app/services/pacifista-api/shop/categories/dtos/ShopCategoryDTO.ts +++ /dev/null @@ -1,5 +0,0 @@ -import ApiDTO from "../../../../core/http/dtos/ApiDTO"; - -export default class ShopCategoryDTO extends ApiDTO { - name?: string; -} diff --git a/src/app/services/pacifista-api/shop/categories/dtos/ShopItemDTO.ts b/src/app/services/pacifista-api/shop/categories/dtos/ShopItemDTO.ts deleted file mode 100644 index 43f568f..0000000 --- a/src/app/services/pacifista-api/shop/categories/dtos/ShopItemDTO.ts +++ /dev/null @@ -1,9 +0,0 @@ -import ApiDTO from "../../../../core/http/dtos/ApiDTO"; - -export default class ShopItemDTO extends ApiDTO { - name?: string; - description?: string; - htmlDescription?: string; - logoUrl?: string; - price?: number; -} diff --git a/src/index.html b/src/index.html index cf8e622..95e29f8 100644 --- a/src/index.html +++ b/src/index.html @@ -2,24 +2,19 @@ - Pacifista - Serveur Minecraft Survie Creatif Français en 1.19 - Guildes Homes Boutiques Shop + Pacifista Minecraft - Serveur Minecraft Survie Creatif Français - - - - - + + - - - + + - diff --git a/src/sitemap.xml b/src/sitemap.xml index 61d5357..30d3215 100644 --- a/src/sitemap.xml +++ b/src/sitemap.xml @@ -1,39 +1,44 @@ - - + + - https://pacifista.fr/ - 2023-03-29 + https://pacifista.fr + 2023-09-20 weekly 1.0 + - https://pacifista.fr/news - 2023-03-29 + https://pacifista.fr/shop + 2023-09-20 weekly 0.9 + - https://pacifista.fr/join - 2023-03-29 - monthly - 0.7 + https://pacifista.fr/news + 2023-09-20 + weekly + 0.8 + https://pacifista.fr/vote - 2023-03-29 + 2023-09-20 weekly 0.7 + - https://pacifista.fr/wiki - 2023-03-29 + https://pacifista.fr/join + 2023-09-20 monthly - 0.8 + 0.6 + - https://pacifista.fr/shop - 2023-03-29 - weekly - 0.9 + https://pacifista.fr/wiki + 2023-09-20 + monthly + 0.5