Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • web-et-numerique/web-et-numerique-internet/data.grandlyon.com/web-portal/components/custom-apps/admin-gui
1 result
Show changes
Showing
with 91 additions and 51 deletions
<section>
<div class="user-info-container">
<p class="welcome-back-message">Content de vous revoir {{ loggedInUserFullname }}</p>
<button class="button button-gl" (click)="loggout()">Deconnexion</button>
</div>
</section>
\ No newline at end of file
.user-info-container {
text-align: center;
margin-top: 2rem;
}
.welcome-back-message {
font-size: 1.5rem;
margin-bottom: 1rem;
}
import { Component, OnInit } from '@angular/core';
import { UserService } from '../../user/services';
import { Router } from '@angular/router';
import { NotificationService } from '../../services';
@Component({
selector: 'app-welcome',
templateUrl: './welcome.component.html',
styleUrls: ['./welcome.component.scss'],
})
export class WelcomeComponent implements OnInit {
constructor(
private _userService: UserService,
private _router: Router,
) { }
ngOnInit(): void { }
get loggedInUserFullname() {
return `${this._userService.user.firstName} ${this._userService.user.lastName}`;
}
loggout() {
this._userService.resetAuth();
this._router.navigate(['/login']);
}
}
import { Directive, ElementRef, Output, EventEmitter, HostListener } from '@angular/core';
@Directive({
selector: '[clickOutside]',
})
export class ClickOutsideDirective {
constructor(private _elementRef: ElementRef) {
}
@Output()
public clickOutside = new EventEmitter();
@HostListener('document:click', ['$event.target'])
public onClick(targetElement) {
const clickedInside = this._elementRef.nativeElement.contains(targetElement);
if (!clickedInside) {
this.clickOutside.emit(null);
}
}
}
import { ClickOutsideDirective } from './click-outside.directive';
import { PreventDefaultDirective } from './prevent-default.directive';
export { ClickOutsideDirective, PreventDefaultDirective };
// tslint:disable-next-line:variable-name
export const AppDirectives = [
ClickOutsideDirective,
PreventDefaultDirective,
];
import { Directive } from '@angular/core';
@Directive({
selector: '[preventDefault]',
host: {
'(click)': 'onClick($event)',
},
})
export class PreventDefaultDirective {
constructor() { }
onClick(e) {
e.preventDefault();
e.stopPropagation();
}
}
......@@ -2,4 +2,5 @@ export interface IImageUploadFieldParams {
label: string;
inputName: string;
existingImageUrl?: string;
isRequired?: boolean;
}
export interface IPageHeaderInfo {
title: string;
metadataSubtitle?: string;
surtitle?: string;
subtitle?: string;
hasBetaStyle?: boolean;
}
......@@ -3,6 +3,7 @@ import { OrganizationService } from './organization.service';
import { ResourceService } from './resource.service';
import { FormatService } from './format.service';
import { NotificationService } from './notification.service';
import { NavigationHistoryService } from './navigation-history.service';
export {
AppConfigService,
......@@ -10,6 +11,7 @@ export {
ResourceService,
FormatService,
NotificationService,
NavigationHistoryService,
};
// tslint:disable-next-line:variable-name
......@@ -19,4 +21,5 @@ export const AppServices = [
ResourceService,
FormatService,
NotificationService,
NavigationHistoryService,
];
import { Injectable } from '@angular/core';
@Injectable()
export class NavigationHistoryService {
history: string[] = [];
maxHistoryLength = 20; // Avoid to store too many url limite back history to 20
constructor(
) { }
add(url: string) {
// If max size reach remove the oldest url
if (this.history.length >= this.maxHistoryLength) {
this.history.shift();
}
this.history.push(url);
}
getFromLast(index: number): string {
const position = this.history.length - 1 - index;
let res = null;
if (position >= 0) {
res = this.history[position];
}
return res;
}
}
......@@ -36,6 +36,7 @@ export class ResourceService {
map((response) => {
const totalCount = response.headers.get('Content-Range');
const resources = [];
console.log(response);
response.body.forEach((resource) => {
resources.push(new Resource(resource));
});
......
{
"organizations": {
"url": "http://localhost:3000/organizations/"
"url": "https://kong-dev.alpha.grandlyon.com/organizations/organizations/"
},
"resources": {
"url": "http://localhost:3003/"
"url": "https://kong-dev.alpha.grandlyon.com/resources/"
},
"mediaLibrary": {
"url": "http://localhost:3006/"
"url": "https://kong-dev.alpha.grandlyon.com/media-library/"
},
"authentication": {
"url": "http://localhost:3002/"
"url": "https://kong-dev.alpha.grandlyon.com/authentication/"
},
"middlewareLegacyAuth": {
"url": "http://localhost:3004/"
"url": "https://kong-dev.alpha.grandlyon.com/middleware-legacy/"
}
}
src/assets/favicons/android-chrome-144x144.png

2.2 KiB

src/assets/favicons/android-chrome-192x192.png

2.82 KiB

src/assets/favicons/android-chrome-256x256.png

3.59 KiB

src/assets/favicons/android-chrome-36x36.png

1009 B

src/assets/favicons/android-chrome-48x48.png

1.15 KiB

src/assets/favicons/android-chrome-72x72.png

1.37 KiB

src/assets/favicons/android-chrome-96x96.png

1.67 KiB

src/assets/favicons/apple-touch-icon-114x114.png

1.92 KiB