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
@ -28,6 +28,9 @@
|
||||
"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": [
|
||||
@ -128,6 +131,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}},
|
||||
}
|
||||
},
|
||||
"defaultProject": "framadate"
|
||||
}
|
||||
|
@ -13,7 +13,8 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.2.0",
|
||||
"@angular/animations": "^8.2.14",
|
||||
"@angular/cdk": "^8.2.3",
|
||||
"@angular/common": "~8.2.0",
|
||||
"@angular/compiler": "~8.2.0",
|
||||
"@angular/core": "~8.2.0",
|
||||
@ -21,11 +22,15 @@
|
||||
"@angular/platform-browser": "~8.2.0",
|
||||
"@angular/platform-browser-dynamic": "~8.2.0",
|
||||
"@angular/router": "~8.2.0",
|
||||
"@fullcalendar/core": "^4.3.1",
|
||||
"@ngx-translate/core": "^11.0.1",
|
||||
"@ngx-translate/http-loader": "^4.0.0",
|
||||
"chart.js": "^2.8.0",
|
||||
"ngx-markdown": "^8.2.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-compat": "^6.5.3",
|
||||
"tslib": "^1.10.0",
|
||||
|
@ -43,6 +43,8 @@ import {SelectorComponent} from './ui/selector/selector.component';
|
||||
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||
import {ConfigService} from "./services/config.service";
|
||||
import {PollService} from "./services/poll.service";
|
||||
import {ToastModule} from 'primeng/toast';
|
||||
import {MessageService} from "primeng";
|
||||
|
||||
export class MyMissingTranslationHandler implements MissingTranslationHandler {
|
||||
handle(params: MissingTranslationHandlerParams) {
|
||||
@ -88,6 +90,7 @@ export function HttpLoaderFactory(http: HttpClient) {
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
AppRoutingModule,
|
||||
ToastModule,
|
||||
MarkdownModule.forRoot(),
|
||||
TranslateModule.forRoot({
|
||||
missingTranslationHandler: {
|
||||
@ -105,7 +108,7 @@ export function HttpLoaderFactory(http: HttpClient) {
|
||||
FormsModule,
|
||||
RouterModule.forRoot(Routes)
|
||||
],
|
||||
providers: [TranslateService, ConfigService, PollService],
|
||||
providers: [TranslateService, ConfigService, PollService, MessageService],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule {
|
||||
|
@ -30,7 +30,7 @@
|
||||
{{"config.find_my_polls"|translate}}
|
||||
</h1>
|
||||
<form
|
||||
(ngSubmit)="findMyPollsByEmail(emailToFind.value)"
|
||||
(ngSubmit)="findMyPollsByEmail(config.myEmail)"
|
||||
>
|
||||
<label
|
||||
class="description"
|
||||
@ -40,17 +40,19 @@
|
||||
{{"config.find_helper"|translate}} :
|
||||
</label>
|
||||
<input
|
||||
#emailToFind
|
||||
type="email"
|
||||
name="mail"
|
||||
id="email"
|
||||
autofocus="autofocus"
|
||||
[(ngModel)]="config.myEmail"
|
||||
required="required"
|
||||
/>
|
||||
<input
|
||||
type="submit"
|
||||
class="btn btn-block"
|
||||
[ngClass]="{'btn-primary': config.myEmail}"
|
||||
i18n-value="'config.find_button'|translate"
|
||||
[disabled]="!emailToFind.value"
|
||||
[disabled]="!config.myEmail"
|
||||
/>
|
||||
</form>
|
||||
</section>
|
||||
|
@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
|
||||
import {PollConfig} from '../config/PollConfig';
|
||||
import {HttpClient, HttpHeaders, HttpParams} from "@angular/common/http";
|
||||
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
|
||||
@ -17,7 +17,8 @@ export class ConfigService extends PollConfig {
|
||||
myPolls: any;// list of retrieved polls from the backend api
|
||||
|
||||
|
||||
constructor(public http: HttpClient) {
|
||||
constructor(public http: HttpClient,
|
||||
private messageService: MessageService) {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -108,6 +109,7 @@ export class ConfigService extends PollConfig {
|
||||
// TODO handle a toast message
|
||||
console.error('err', err)
|
||||
this.loading = false;
|
||||
this.messageService.add({severity: 'success', summary: 'Service Message', detail: 'Via MessageService'});
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
export const environment = {
|
||||
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