Déconnexion
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
.logout-btn {
|
||||||
|
align-self: flex-start;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 14px;
|
||||||
|
background: white;
|
||||||
|
border: none;
|
||||||
|
box-shadow: 0 2px 10px rgba(180, 80, 80, 0.12);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: rosybrown;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
transition: box-shadow 0.2s, transform 0.15s;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.94);
|
||||||
|
box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<button class="logout-btn" (click)="logout()">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<polyline points="16 17 21 12 16 7" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<line x1="21" y1="12" x2="9" y2="12" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import {Component, inject} from '@angular/core';
|
||||||
|
import {AuthService} from "../../../core/auth/auth.service";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-disconnect',
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './disconnect.component.html',
|
||||||
|
styleUrl: './disconnect.component.css'
|
||||||
|
})
|
||||||
|
export class DisconnectComponent {
|
||||||
|
|
||||||
|
private authService = inject(AuthService);
|
||||||
|
logout() {
|
||||||
|
this.authService.logout();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,3 +12,10 @@
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 16px;
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
<div class="page-param" >
|
<div class="page-param" >
|
||||||
<app-parameters-exit/>
|
<div class="header">
|
||||||
|
<app-parameters-exit/>
|
||||||
|
<app-disconnect/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<app-parameters-coordinates/>
|
<app-parameters-coordinates/>
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ParametersExit} from "../parameters-exit/parameters-exit.component";
|
import {ParametersExit} from "../parameters-exit/parameters-exit.component";
|
||||||
|
import {DisconnectComponent} from "../disconnect/disconnect.component";
|
||||||
import {ParametersCoordinatesComponent} from "../parameters-coordinates/parameters-coordinates.component";
|
import {ParametersCoordinatesComponent} from "../parameters-coordinates/parameters-coordinates.component";
|
||||||
import {ParametersProfileComponent} from "../parameters-profile/parameters-profile.component";
|
import {ParametersProfileComponent} from "../parameters-profile/parameters-profile.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-parameters-main',
|
selector: 'app-parameters-main',
|
||||||
|
templateUrl: './parameters-main.component.html',
|
||||||
imports: [
|
imports: [
|
||||||
ParametersExit,
|
ParametersExit,
|
||||||
|
DisconnectComponent,
|
||||||
ParametersCoordinatesComponent,
|
ParametersCoordinatesComponent,
|
||||||
ParametersProfileComponent
|
ParametersProfileComponent
|
||||||
],
|
],
|
||||||
templateUrl: './parameters-main.component.html',
|
styleUrl: './parameters-main.component.css'
|
||||||
styleUrl: './parameters-main.component.css'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ParametersMain {
|
export class ParametersMain {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,16 @@
|
|||||||
<span class="field-value bio-value">{{ bio() }}</span>
|
<span class="field-value bio-value">{{ bio() }}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #editBioBlock>
|
<ng-template #editBioBlock>
|
||||||
|
<input
|
||||||
|
class="field-input"
|
||||||
|
[(ngModel)]="bio"
|
||||||
|
[ngModel]="bio()"
|
||||||
|
(ngModelChange)="bio.set($event)"
|
||||||
|
(blur)="toggleEditBio()"
|
||||||
|
(keydown.enter)="toggleEditBio()"
|
||||||
|
autofocus
|
||||||
|
/>
|
||||||
|
</ng-template>
|
||||||
<textarea class="field-input bio-textarea" [value]="bio()" (input)="bio.set($any($event.target).value)" (blur)="toggleEditBio()" autofocus></textarea>
|
<textarea class="field-input bio-textarea" [value]="bio()" (input)="bio.set($any($event.target).value)" (blur)="toggleEditBio()" autofocus></textarea>
|
||||||
<button class="edit-btn" (click)="toggleEditBio()" title="Modifier">
|
<button class="edit-btn" (click)="toggleEditBio()" title="Modifier">
|
||||||
<svg *ngIf="!editingBio()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg *ngIf="!editingBio()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
@@ -63,7 +73,6 @@
|
|||||||
<path d="M4 10L8 14L16 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
<path d="M4 10L8 14L16 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {AuthService} from "../../../core/auth/auth.service";
|
|||||||
selector: 'app-parameters-profile',
|
selector: 'app-parameters-profile',
|
||||||
imports: [FormsModule, CommonModule],
|
imports: [FormsModule, CommonModule],
|
||||||
templateUrl: './parameters-profile.component.html',
|
templateUrl: './parameters-profile.component.html',
|
||||||
|
standalone: true,
|
||||||
styleUrl: './parameters-profile.component.css'
|
styleUrl: './parameters-profile.component.css'
|
||||||
})
|
})
|
||||||
export class ParametersProfileComponent implements OnInit {
|
export class ParametersProfileComponent implements OnInit {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ model/knots-dto-key-create-key-dto.ts
|
|||||||
model/knots-dto-key-delete-key-dto.ts
|
model/knots-dto-key-delete-key-dto.ts
|
||||||
model/knots-dto-message-create-message-dto.ts
|
model/knots-dto-message-create-message-dto.ts
|
||||||
model/knots-dto-message-delete-message-dto.ts
|
model/knots-dto-message-delete-message-dto.ts
|
||||||
|
model/knots-dto-message-get-message-details-dto.ts
|
||||||
model/knots-dto-role-create-role-dto.ts
|
model/knots-dto-role-create-role-dto.ts
|
||||||
model/knots-dto-role-delete-role-dto.ts
|
model/knots-dto-role-delete-role-dto.ts
|
||||||
model/knots-dto-user-create-user-dto.ts
|
model/knots-dto-user-create-user-dto.ts
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import { FastEndpointsErrorResponse } from '../model/fast-endpoints-error-respon
|
|||||||
import { KnotsDTODiscussionCreateDiscussionDto } from '../model/knots-dto-discussion-create-discussion-dto';
|
import { KnotsDTODiscussionCreateDiscussionDto } from '../model/knots-dto-discussion-create-discussion-dto';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { KnotsDTODiscussionDeleteDiscussionDto } from '../model/knots-dto-discussion-delete-discussion-dto';
|
import { KnotsDTODiscussionDeleteDiscussionDto } from '../model/knots-dto-discussion-delete-discussion-dto';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsDTOMessageGetMessageDetailsDto } from '../model/knots-dto-message-get-message-details-dto';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
@@ -271,6 +273,61 @@ export class DiscussionsService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint get /API/discussions/{discussionId}/messages
|
||||||
|
* @param discussionId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<KnotsDTOMessageGetMessageDetailsDto>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<KnotsDTOMessageGetMessageDetailsDto>>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<KnotsDTOMessageGetMessageDetailsDto>>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (discussionId === null || discussionId === undefined) {
|
||||||
|
throw new Error('Required parameter discussionId was null or undefined when calling getMessageEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/${this.configuration.encodeParam({name: "discussionId", value: discussionId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/messages`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<KnotsDTOMessageGetMessageDetailsDto>>('get', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint get /API/discussions/my
|
* @endpoint get /API/discussions/my
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
|||||||
@@ -168,110 +168,4 @@ export class MessagesService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @endpoint get /API/messages/{@Id}
|
|
||||||
* @param id
|
|
||||||
* @param id2
|
|
||||||
* @param date
|
|
||||||
* @param type
|
|
||||||
* @param contenu
|
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
||||||
* @param reportProgress flag to report request and response progress.
|
|
||||||
* @param options additional options
|
|
||||||
*/
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
||||||
if (id === null || id === undefined) {
|
|
||||||
throw new Error('Required parameter id was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (id2 === null || id2 === undefined) {
|
|
||||||
throw new Error('Required parameter id2 was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (date === null || date === undefined) {
|
|
||||||
throw new Error('Required parameter date was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (type === null || type === undefined) {
|
|
||||||
throw new Error('Required parameter type was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
|
|
||||||
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'id',
|
|
||||||
<any>id2,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'contenu',
|
|
||||||
<any>contenu,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'date',
|
|
||||||
<any>date,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'type',
|
|
||||||
<any>type,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
let localVarHeaders = this.defaultHeaders;
|
|
||||||
|
|
||||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
||||||
]);
|
|
||||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
||||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
||||||
|
|
||||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
||||||
|
|
||||||
|
|
||||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
||||||
if (localVarHttpHeaderAcceptSelected) {
|
|
||||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
||||||
responseType_ = 'text';
|
|
||||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
||||||
responseType_ = 'json';
|
|
||||||
} else {
|
|
||||||
responseType_ = 'blob';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let localVarPath = `/API/messages/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
|
||||||
const { basePath, withCredentials } = this.configuration;
|
|
||||||
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
|
||||||
{
|
|
||||||
context: localVarHttpContext,
|
|
||||||
params: localVarQueryParameters.toHttpParams(),
|
|
||||||
responseType: <any>responseType_,
|
|
||||||
...(withCredentials ? { withCredentials } : {}),
|
|
||||||
headers: localVarHeaders,
|
|
||||||
observe: observe,
|
|
||||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
||||||
reportProgress: reportProgress
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsDTOMessageGetMessageDetailsDto {
|
||||||
|
id?: number;
|
||||||
|
contenu?: string | null;
|
||||||
|
date?: string;
|
||||||
|
type?: boolean;
|
||||||
|
authorId?: number;
|
||||||
|
authorName?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -10,6 +10,7 @@ export * from './knots-dto-key-create-key-dto';
|
|||||||
export * from './knots-dto-key-delete-key-dto';
|
export * from './knots-dto-key-delete-key-dto';
|
||||||
export * from './knots-dto-message-create-message-dto';
|
export * from './knots-dto-message-create-message-dto';
|
||||||
export * from './knots-dto-message-delete-message-dto';
|
export * from './knots-dto-message-delete-message-dto';
|
||||||
|
export * from './knots-dto-message-get-message-details-dto';
|
||||||
export * from './knots-dto-role-create-role-dto';
|
export * from './knots-dto-role-create-role-dto';
|
||||||
export * from './knots-dto-role-delete-role-dto';
|
export * from './knots-dto-role-delete-role-dto';
|
||||||
export * from './knots-dto-user-create-user-dto';
|
export * from './knots-dto-user-create-user-dto';
|
||||||
|
|||||||
Reference in New Issue
Block a user