Update Angular
+ Add a config file to use Docker
This commit is contained in:
4579
Front/skydivelogs-app/package-lock.json
generated
4579
Front/skydivelogs-app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -12,16 +12,16 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^11.0.7",
|
||||
"@angular/cdk": "^11.0.3",
|
||||
"@angular/common": "^11.0.7",
|
||||
"@angular/compiler": "^11.0.7",
|
||||
"@angular/core": "^11.0.7",
|
||||
"@angular/forms": "^11.0.7",
|
||||
"@angular/material": "^11.0.3",
|
||||
"@angular/platform-browser": "^11.0.7",
|
||||
"@angular/platform-browser-dynamic": "^11.0.7",
|
||||
"@angular/router": "^11.0.7",
|
||||
"@angular/animations": "^11.2.0",
|
||||
"@angular/cdk": "^11.2.0",
|
||||
"@angular/common": "^11.2.0",
|
||||
"@angular/compiler": "^11.2.0",
|
||||
"@angular/core": "^11.2.0",
|
||||
"@angular/forms": "^11.2.0",
|
||||
"@angular/material": "^11.2.0",
|
||||
"@angular/platform-browser": "^11.2.0",
|
||||
"@angular/platform-browser-dynamic": "^11.2.0",
|
||||
"@angular/router": "^11.2.0",
|
||||
"bufferutil": "^4.0.3",
|
||||
"core-js": "^2.6.12",
|
||||
"fibers": "^5.0.0",
|
||||
@@ -34,10 +34,10 @@
|
||||
"zone.js": "^0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.1100.6",
|
||||
"@angular/cli": "^11.0.6",
|
||||
"@angular/compiler-cli": "^11.0.7",
|
||||
"@angular/language-service": "^11.0.7",
|
||||
"@angular-devkit/build-angular": "^0.1102.0",
|
||||
"@angular/cli": "^11.2.0",
|
||||
"@angular/compiler-cli": "^11.2.0",
|
||||
"@angular/language-service": "^11.2.0",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "^2.0.8",
|
||||
"@types/node": "^12.19.12",
|
||||
|
||||
@@ -26,7 +26,13 @@ export class AppComponent implements OnInit {
|
||||
this.authenticationService.currentUser.subscribe(
|
||||
x => (this.currentUser = x)
|
||||
);
|
||||
//this.version = ConfigurationHelper.settings.version;
|
||||
|
||||
ConfigurationHelper.settings.subscribe(settings =>
|
||||
{
|
||||
if (settings != null) {
|
||||
this.version = settings.version;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -108,7 +108,7 @@ const appRoutes: Routes = [
|
||||
|
||||
{ path: "login", component: LoginComponent },
|
||||
|
||||
//{ path: "**", redirectTo: "" },
|
||||
// { path: "**", redirectTo: "" },
|
||||
];
|
||||
|
||||
// Déclaration de la fonction d'initialisation de la configuration
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
height: 100px;
|
||||
|
||||
// this way asset gets processed by webpack
|
||||
background: url(../img/logo.png) center center no-repeat;
|
||||
background: url(/assets/img/logo.png) center center no-repeat;
|
||||
background-size: 100px 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ body {
|
||||
/* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url(../font/MaterialIcons.woff2) format('woff2'),
|
||||
url(../font/MaterialIcons-Regular.woff) format('woff'),
|
||||
url(../font/MaterialIcons-Regular.ttf) format('truetype')
|
||||
url(/assets/font/MaterialIcons.woff2) format('woff2'),
|
||||
url(/assets//font/MaterialIcons-Regular.woff) format('woff'),
|
||||
url(/assets//font/MaterialIcons-Regular.ttf) format('truetype')
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Injector } from '@angular/core';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { ConfigurationHelper } from './configuration-helper';
|
||||
@@ -10,12 +9,14 @@ export class BaseService {
|
||||
constructor() {
|
||||
ConfigurationHelper.settings.subscribe(settings =>
|
||||
{
|
||||
let tmpApiUrl : string = settings.apiUrl;
|
||||
|
||||
this.headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': tmpApiUrl
|
||||
});
|
||||
this.apiUrl = tmpApiUrl + '/api';
|
||||
if (settings != null) {
|
||||
let tmpApiUrl : string = settings.apiUrl;
|
||||
|
||||
this.headers = new HttpHeaders({
|
||||
'Access-Control-Allow-Origin': tmpApiUrl
|
||||
});
|
||||
this.apiUrl = tmpApiUrl + '/api';
|
||||
}
|
||||
});
|
||||
|
||||
// const config: ConfigurationHelper = injector.get(ConfigurationHelper);
|
||||
|
||||
@@ -8,7 +8,7 @@ import { IAppSettings } from '../models/app-settings';
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class ConfigurationHelper {
|
||||
private static settingsSource = new BehaviorSubject<IAppSettings>();
|
||||
private static settingsSource = new BehaviorSubject<IAppSettings>(null);
|
||||
public static settings = ConfigurationHelper.settingsSource.asObservable();
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
@@ -20,7 +20,6 @@ export class ConfigurationHelper {
|
||||
this.http.get(jsonFile)
|
||||
.toPromise()
|
||||
.then((response : IAppSettings) => {
|
||||
//ConfigurationHelper.settings = <IAppSettings>response;
|
||||
ConfigurationHelper.settingsSource.next(<IAppSettings>response);
|
||||
resolve();
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user