mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
⚡ update dependencies with yarn, add primefaces to make toasts
This commit is contained in:
parent
cf4e9f4563
commit
ded5e71e73
256
angular.json
256
angular.json
@ -1,133 +1,137 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
"projects": {
|
"projects": {
|
||||||
"framadate": {
|
"framadate": {
|
||||||
"projectType": "application",
|
"projectType": "application",
|
||||||
"schematics": {
|
"schematics": {
|
||||||
"@schematics/angular:component": {
|
"@schematics/angular:component": {
|
||||||
"style": "scss"
|
"style": "scss"
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "",
|
|
||||||
"sourceRoot": "src",
|
|
||||||
"prefix": "framadate",
|
|
||||||
"architect": {
|
|
||||||
"build": {
|
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
|
||||||
"options": {
|
|
||||||
"outputPath": "dist/framadate",
|
|
||||||
"index": "src/index.html",
|
|
||||||
"main": "src/main.ts",
|
|
||||||
"polyfills": "src/polyfills.ts",
|
|
||||||
"tsConfig": "tsconfig.app.json",
|
|
||||||
"aot": false,
|
|
||||||
"assets": [
|
|
||||||
"src/favicon.ico",
|
|
||||||
"src/assets"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [
|
|
||||||
"node_modules/marked/lib/marked.js",
|
|
||||||
"node_modules/prismjs/prism.js",
|
|
||||||
"node_modules/prismjs/components/prism-css.min.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"fileReplacements": [
|
|
||||||
{
|
|
||||||
"replace": "src/environments/environment.ts",
|
|
||||||
"with": "src/environments/environment.prod.ts"
|
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
"optimization": true,
|
"root": "",
|
||||||
"outputHashing": "all",
|
"sourceRoot": "src",
|
||||||
"sourceMap": false,
|
"prefix": "framadate",
|
||||||
"extractCss": true,
|
"architect": {
|
||||||
"namedChunks": false,
|
"build": {
|
||||||
"aot": true,
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"extractLicenses": true,
|
"options": {
|
||||||
"vendorChunk": false,
|
"outputPath": "dist/framadate",
|
||||||
"buildOptimizer": true,
|
"index": "src/index.html",
|
||||||
"budgets": [
|
"main": "src/main.ts",
|
||||||
{
|
"polyfills": "src/polyfills.ts",
|
||||||
"type": "initial",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"maximumWarning": "2mb",
|
"aot": false,
|
||||||
"maximumError": "5mb"
|
"assets": [
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"node_modules/primeicons/primeicons.css",
|
||||||
|
"node_modules/primeng/resources/themes/nova-light/theme.css",
|
||||||
|
"node_modules/primeng/resources/primeng.min.css",
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
|
"scripts": [
|
||||||
|
"node_modules/marked/lib/marked.js",
|
||||||
|
"node_modules/prismjs/prism.js",
|
||||||
|
"node_modules/prismjs/components/prism-css.min.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "initial",
|
||||||
|
"maximumWarning": "2mb",
|
||||||
|
"maximumError": "5mb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "6kb",
|
||||||
|
"maximumError": "10kb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
"serve": {
|
||||||
"type": "anyComponentStyle",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
"maximumWarning": "6kb",
|
"options": {
|
||||||
"maximumError": "10kb"
|
"browserTarget": "framadate:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "framadate:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "framadate:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "src/test.ts",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"tsConfig": "tsconfig.spec.json",
|
||||||
|
"karmaConfig": "karma.conf.js",
|
||||||
|
"assets": [
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/styles.scss"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"tsconfig.app.json",
|
||||||
|
"tsconfig.spec.json",
|
||||||
|
"e2e/tsconfig.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "framadate:serve"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"devServerTarget": "framadate:serve:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
"serve": {
|
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
|
||||||
"options": {
|
|
||||||
"browserTarget": "framadate:build"
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"browserTarget": "framadate:build:production"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"extract-i18n": {
|
|
||||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
||||||
"options": {
|
|
||||||
"browserTarget": "framadate:build"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
|
||||||
"options": {
|
|
||||||
"main": "src/test.ts",
|
|
||||||
"polyfills": "src/polyfills.ts",
|
|
||||||
"tsConfig": "tsconfig.spec.json",
|
|
||||||
"karmaConfig": "karma.conf.js",
|
|
||||||
"assets": [
|
|
||||||
"src/favicon.ico",
|
|
||||||
"src/assets"
|
|
||||||
],
|
|
||||||
"styles": [
|
|
||||||
"src/styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": [
|
|
||||||
"tsconfig.app.json",
|
|
||||||
"tsconfig.spec.json",
|
|
||||||
"e2e/tsconfig.json"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"e2e": {
|
|
||||||
"builder": "@angular-devkit/build-angular:protractor",
|
|
||||||
"options": {
|
|
||||||
"protractorConfig": "e2e/protractor.conf.js",
|
|
||||||
"devServerTarget": "framadate:serve"
|
|
||||||
},
|
|
||||||
"configurations": {
|
|
||||||
"production": {
|
|
||||||
"devServerTarget": "framadate:serve:production"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}},
|
"defaultProject": "framadate"
|
||||||
"defaultProject": "framadate"
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~8.2.0",
|
"@angular/animations": "^8.2.14",
|
||||||
|
"@angular/cdk": "^8.2.3",
|
||||||
"@angular/common": "~8.2.0",
|
"@angular/common": "~8.2.0",
|
||||||
"@angular/compiler": "~8.2.0",
|
"@angular/compiler": "~8.2.0",
|
||||||
"@angular/core": "~8.2.0",
|
"@angular/core": "~8.2.0",
|
||||||
@ -21,11 +22,15 @@
|
|||||||
"@angular/platform-browser": "~8.2.0",
|
"@angular/platform-browser": "~8.2.0",
|
||||||
"@angular/platform-browser-dynamic": "~8.2.0",
|
"@angular/platform-browser-dynamic": "~8.2.0",
|
||||||
"@angular/router": "~8.2.0",
|
"@angular/router": "~8.2.0",
|
||||||
|
"@fullcalendar/core": "^4.3.1",
|
||||||
"@ngx-translate/core": "^11.0.1",
|
"@ngx-translate/core": "^11.0.1",
|
||||||
"@ngx-translate/http-loader": "^4.0.0",
|
"@ngx-translate/http-loader": "^4.0.0",
|
||||||
"chart.js": "^2.8.0",
|
"chart.js": "^2.8.0",
|
||||||
"ngx-markdown": "^8.2.1",
|
"ngx-markdown": "^8.2.1",
|
||||||
"ngx-toaster": "^1.0.1",
|
"ngx-toaster": "^1.0.1",
|
||||||
|
"primeicons": "^2.0.0",
|
||||||
|
"primeng": "^9.0.0-rc.2",
|
||||||
|
"quill": "^1.3.7",
|
||||||
"rxjs": "~6.4.0",
|
"rxjs": "~6.4.0",
|
||||||
"rxjs-compat": "^6.5.3",
|
"rxjs-compat": "^6.5.3",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
|
@ -43,6 +43,8 @@ import {SelectorComponent} from './ui/selector/selector.component';
|
|||||||
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||||
import {ConfigService} from "./services/config.service";
|
import {ConfigService} from "./services/config.service";
|
||||||
import {PollService} from "./services/poll.service";
|
import {PollService} from "./services/poll.service";
|
||||||
|
import {ToastModule} from 'primeng/toast';
|
||||||
|
import {MessageService} from "primeng";
|
||||||
|
|
||||||
export class MyMissingTranslationHandler implements MissingTranslationHandler {
|
export class MyMissingTranslationHandler implements MissingTranslationHandler {
|
||||||
handle(params: MissingTranslationHandlerParams) {
|
handle(params: MissingTranslationHandlerParams) {
|
||||||
@ -88,6 +90,7 @@ export function HttpLoaderFactory(http: HttpClient) {
|
|||||||
BrowserModule,
|
BrowserModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
|
ToastModule,
|
||||||
MarkdownModule.forRoot(),
|
MarkdownModule.forRoot(),
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
missingTranslationHandler: {
|
missingTranslationHandler: {
|
||||||
@ -105,7 +108,7 @@ export function HttpLoaderFactory(http: HttpClient) {
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
RouterModule.forRoot(Routes)
|
RouterModule.forRoot(Routes)
|
||||||
],
|
],
|
||||||
providers: [TranslateService, ConfigService, PollService],
|
providers: [TranslateService, ConfigService, PollService, MessageService],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
export class AppModule {
|
export class AppModule {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
{{"config.find_my_polls"|translate}}
|
{{"config.find_my_polls"|translate}}
|
||||||
</h1>
|
</h1>
|
||||||
<form
|
<form
|
||||||
(ngSubmit)="findMyPollsByEmail(emailToFind.value)"
|
(ngSubmit)="findMyPollsByEmail(config.myEmail)"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
class="description"
|
class="description"
|
||||||
@ -40,17 +40,19 @@
|
|||||||
{{"config.find_helper"|translate}} :
|
{{"config.find_helper"|translate}} :
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
#emailToFind
|
|
||||||
type="email"
|
type="email"
|
||||||
name="mail"
|
name="mail"
|
||||||
id="email"
|
id="email"
|
||||||
autofocus="autofocus"
|
autofocus="autofocus"
|
||||||
|
[(ngModel)]="config.myEmail"
|
||||||
|
required="required"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-block"
|
class="btn btn-block"
|
||||||
|
[ngClass]="{'btn-primary': config.myEmail}"
|
||||||
i18n-value="'config.find_button'|translate"
|
i18n-value="'config.find_button'|translate"
|
||||||
[disabled]="!emailToFind.value"
|
[disabled]="!config.myEmail"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
|
|||||||
import {PollConfig} from '../config/PollConfig';
|
import {PollConfig} from '../config/PollConfig';
|
||||||
import {HttpClient, HttpHeaders, HttpParams} from "@angular/common/http";
|
import {HttpClient, HttpHeaders, HttpParams} from "@angular/common/http";
|
||||||
import {environment} from "../../environments/environment";
|
import {environment} from "../../environments/environment";
|
||||||
|
import {MessageService} from 'primeng/api';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* le service transverse à chaque page qui permet de syncroniser la configuration de sondage souhaitée
|
* le service transverse à chaque page qui permet de syncroniser la configuration de sondage souhaitée
|
||||||
@ -17,7 +17,8 @@ export class ConfigService extends PollConfig {
|
|||||||
myPolls: any;// list of retrieved polls from the backend api
|
myPolls: any;// list of retrieved polls from the backend api
|
||||||
|
|
||||||
|
|
||||||
constructor(public http: HttpClient) {
|
constructor(public http: HttpClient,
|
||||||
|
private messageService: MessageService) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ export class ConfigService extends PollConfig {
|
|||||||
// TODO handle a toast message
|
// TODO handle a toast message
|
||||||
console.error('err', err)
|
console.error('err', err)
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.messageService.add({severity: 'success', summary: 'Service Message', detail: 'Via MessageService'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
baseApiHref: 'http://127.0.0.1:8000/api/v1/'
|
baseApiHref: 'https://framadate-api.cipherbliss.com/api/v1'
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user