-
- Old stuff
-
-
- Administration
-
-
- Consultation
-
-
- Participation
+
-
+
Accueil
diff --git a/src/app/core/components/sibebar/navigation/navigation.component.ts b/src/app/core/components/sibebar/navigation/navigation.component.ts
index cc46e897..37884608 100644
--- a/src/app/core/components/sibebar/navigation/navigation.component.ts
+++ b/src/app/core/components/sibebar/navigation/navigation.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { Poll } from '../../../models/poll.model';
@@ -13,6 +13,9 @@ import { environment } from '../../../../../environments/environment';
export class NavigationComponent implements OnInit {
public _pollsAvailables: Observable
= this.mockingService.pollsAvailables;
public devModeEnabled = !environment.production;
+ @Input() public appTitle = 'FramaDate Funky';
+ @Input() public appLogo: string;
+ public environment = environment;
constructor(private mockingService: MockingService) {}
diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts
index f1ef9c65..b145f707 100644
--- a/src/app/core/services/poll.service.ts
+++ b/src/app/core/services/poll.service.ts
@@ -13,6 +13,7 @@ import { UuidService } from './uuid.service';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../../environments/environment';
import { StorageService } from './storage.service';
+import { Title } from '@angular/platform-browser';
@Injectable({
providedIn: 'root',
@@ -28,6 +29,7 @@ export class PollService implements Resolve {
private storageService: StorageService,
private userService: UserService,
private uuidService: UuidService,
+ private titleService: Title,
private toastService: ToastService
) {}
@@ -74,9 +76,11 @@ export class PollService implements Resolve {
console.log('slug', slug);
if (slug) {
const poll: Poll | undefined = await this.apiService.getPollBySlug(slug);
+
console.log({ loadPollBySlugResponse: poll });
if (poll) {
this.updateCurrentPoll(poll);
+ this.titleService.setTitle(`☑️ ${poll.title} - ${environment.appTitle}`);
} else {
this.toastService.display(`sondage ${slug} non trouvé`);
}
diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts
index 132a061a..3ae752ba 100644
--- a/src/app/features/consultation/consultation.component.ts
+++ b/src/app/features/consultation/consultation.component.ts
@@ -11,6 +11,7 @@ import { StorageService } from '../../core/services/storage.service';
import { ApiService } from '../../core/services/api.service';
import { Stack } from '../../core/models/stack.model';
import { environment } from '../../../environments/environment';
+import { Title } from '@angular/platform-browser';
@Component({
selector: 'app-consultation',
@@ -62,7 +63,7 @@ export class ConsultationComponent implements OnInit, OnDestroy {
console.log('params', params);
this.pollSlug = params.get('slug');
this.passHash = params.get('hash');
- console.log('hash, slug', this.passHash, this.pollSlug);
+
if (this.passHash) {
this.pollService.loadPollBySlugWithPasswordHash(this.pollSlug, this.passHash);
} else {
@@ -86,7 +87,7 @@ export class ConsultationComponent implements OnInit, OnDestroy {
addVoteStack() {
this.api.sendVoteStackOfPoll(this.poll, this.storageService.vote_stack).subscribe((resp) => {
- console.log('resp', resp);
+ console.log('sendVoteStackOfPoll resp', resp);
if (resp) {
this.api.getPollBySlug(this.poll.custom_url);
diff --git a/src/app/shared/components/feedback/feedback.component.scss b/src/app/shared/components/feedback/feedback.component.scss
index b5963fdb..c7b6c2f5 100644
--- a/src/app/shared/components/feedback/feedback.component.scss
+++ b/src/app/shared/components/feedback/feedback.component.scss
@@ -1,6 +1,6 @@
:host {
position: fixed;
- bottom: 1em;
+ bottom: 4em;
right: 1em;
color: white;
.feedback-choices {
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 77223ef5..5e832bca 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -3,7 +3,7 @@ const backendApiUrlsInDev = {
remote: 'https://framadate-api.cipherbliss.com/api/v1',
};
const apiV1 = {
- baseHref: 'http://localhost:8000/api/v1',
+ baseHref: 'https://framadate-api.cipherbliss.com/api/v1',
api_new_poll: '/poll/',
api_get_poll: '/poll/{id}',
'api_test-mail-poll': '/api/v1/poll/mail/test-mail-poll/{emailChoice}',
@@ -12,6 +12,7 @@ const apiV1 = {
export const environment = {
production: true,
+ display_routes: true,
autofill: true,
appTitle: 'FramaDate Funky',
appVersion: '2.1.0',
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index b0fcef5a..c483393a 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -18,7 +18,8 @@ const apiV1 = {
};
export const environment = {
- production: false,
+ production: true,
+ display_routes: true,
autofill: true,
appTitle: 'FramaDate Funky',
appVersion: '2.1.0',