Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@funixproductions/angular-core",
"version": "0.2.12",
"version": "0.3.0",
"description": "Package used in all FunixProductions Angular projects",
"scripts": {
"ng": "ng",
Expand Down
2 changes: 1 addition & 1 deletion projects/funixproductions-requests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@funixproductions/funixproductions-requests",
"version": "0.2.12",
"version": "0.3.0",
"description": "Package used in all FunixProductions Angular projects",
"peerDependencies": {
"@angular/common": "^18.2.4",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {ApiDTO} from "../../../../core/dtos/api-dto";
import {PacifistaNewsDTO} from "./news/PacifistaNewsDTO";

export abstract class PacifistaNewsUserDataDTO extends ApiDTO {

/**
* La news à laquelle ce commentaire répond
*/
news: PacifistaNewsDTO

/**
* Nom d'utilisateur Minecraft du joueur
*/
minecraftUsername: string

/**
* UUID du compte ID sur la funixproductions api
*/
funixProdUserId: string

protected constructor(news: PacifistaNewsDTO) {
super();
this.news = news;
this.minecraftUsername = "";
this.funixProdUserId = "";
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import {ApiDTO} from "../../../../../core/dtos/api-dto";

export class PacifistaNewsBanDTO extends ApiDTO {

/**
* La raison du ban
*/
reason?: string

/**
* Nom d'utilisateur Minecraft du joueur banni
*/
minecraftUserNameBanned: string

/**
* Le UUID du compte
*/
funixProdUserIdBanned: string

/**
* Pseudo Minecraft de la personne qui sanctionne le joueur
*/
staffMinecraftUserName: string

/**
* UUID funix prod account
*/
staffFunixProdUserId: string

constructor(funixProdUserIdBanned: string, minecraftUserNameBanned: string, reason?: string) {
super();
this.minecraftUserNameBanned = minecraftUserNameBanned;
this.funixProdUserIdBanned = funixProdUserIdBanned;
this.reason = reason;

this.staffFunixProdUserId = '';
this.staffMinecraftUserName = '';
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {PacifistaNewsUserDataDTO} from "../PacifistaNewsUserDataDTO";
import {PacifistaNewsDTO} from "../news/PacifistaNewsDTO";

export class PacifistaNewsCommentDTO extends PacifistaNewsUserDataDTO {

/**
* Commentaire parent
*/
parent?: PacifistaNewsCommentDTO

/**
* Contenu du commentaire en texte plein, pas de HTML
*/
content: string

/**
* Nombre de likes sur ce commentaire
*/
likes: number

constructor(news: PacifistaNewsDTO, content: string, parent?: PacifistaNewsCommentDTO) {
super(news);
this.content = content;
this.parent = parent;

this.likes = 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {PacifistaNewsUserDataDTO} from "../PacifistaNewsUserDataDTO";
import {PacifistaNewsDTO} from "../news/PacifistaNewsDTO";
import {PacifistaNewsCommentDTO} from "./PacifistaNewsCommentDTO";

export class PacifistaNewsCommentLikeDTO extends PacifistaNewsUserDataDTO {

/**
* Le commentaire de la news qui a été liké
*/
comment: PacifistaNewsCommentDTO

constructor(news: PacifistaNewsDTO, comment: PacifistaNewsCommentDTO) {
super(news);
this.comment = comment;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import {ApiDTO} from "../../../../../core/dtos/api-dto";

export class PacifistaNewsDTO extends ApiDTO {

/**
* Nom d'utilisateur Minecraft du rédacteur d'origine
*/
originalWriter: string

/**
* Nom d'utilisateur Minecraft de la personne qui l'a modifié
*/
updateWriter: string

/**
* Nom de l'article présent dans l'url
*/
name: string

/**
* Nom de l'article sur la page
*/
title: string

/**
* Sous titre de l'article
*/
subtitle: string

/**
* Image id pour l'image en taille réelle
*/
articleImageId: string

/**
* Image id pour l'image en taille résuite pour l'affichage par liste
*/
articleImageIdLowRes: string

/**
* Le contenu HTML de l'article
*/
bodyHtml: string

/**
* Le contenu MarkDown de l'article pour la modification
*/
bodyMarkdown: string

/**
* Si la news est publiée ou pas
*/
draft: boolean

/**
* Nombre de likes
*/
likes: number

/**
* Nombre de commentaires
*/
comments: number

/**
* Nombre de vues
*/
views: number

constructor(name: string, title: string, subtitle: string, bodyHtml: string, bodyMarkdown: string, draft: boolean) {
super();
this.name = name;
this.title = title;
this.subtitle = subtitle;
this.bodyHtml = bodyHtml;
this.bodyMarkdown = bodyMarkdown;
this.draft = draft;

this.originalWriter = '';
this.updateWriter = '';
this.articleImageId = '';
this.articleImageIdLowRes = '';
this.likes = 0;
this.comments = 0;
this.views = 0;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {ApiDTO} from "../../../../../core/dtos/api-dto";

export class PacifistaNewsImageDTO extends ApiDTO {

/**
* Image rattachée à la news
*/
newsUuid: string

/**
* Image en basse résolution pour l'affichage par liste
*/
isLowResolution: boolean

constructor(newsUuid: string, isLowResolution: boolean) {
super();
this.newsUuid = newsUuid;
this.isLowResolution = isLowResolution;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {PacifistaNewsUserDataDTO} from "../PacifistaNewsUserDataDTO";
import {PacifistaNewsDTO} from "./PacifistaNewsDTO";

export class PacifistaNewsLikeDTO extends PacifistaNewsUserDataDTO {
constructor(news: PacifistaNewsDTO) {
super(news);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {CrudHttpClient} from "../../../../core/components/requests/crud-http-client";
import {PacifistaNewsBanDTO} from "../dtos/ban/PacifistaNewsBanDTO";
import {HttpClient} from "@angular/common/http";
import {environment} from "../../../../../../environments/environment";
import {environmentDev} from "../../../../../../environments/environment-dev";

export class PacifistaNewsBanClient extends CrudHttpClient<PacifistaNewsBanDTO> {

constructor(http: HttpClient, production: boolean) {
super(
http,
production ? environment.pacifistaApiUrl : environmentDev.pacifistaApiUrl,
'web/news/bans'
);
}

}
Loading