env message demo dans le header

This commit is contained in:
Tykayn 2021-05-01 23:10:00 +02:00 committed by tykayn
parent e7343810d5
commit d222d88872
8 changed files with 40 additions and 15 deletions

View File

@ -21,6 +21,8 @@ export class AppComponent implements OnInit, OnDestroy {
public devModeEnabled = !environment.production; public devModeEnabled = !environment.production;
private themeSubscription: Subscription; private themeSubscription: Subscription;
public environment = environment;
constructor( constructor(
private router: Router, private router: Router,
private titleService: Title, private titleService: Title,

View File

@ -6,7 +6,7 @@
<span class="app-title title is-2"> <span class="app-title title is-2">
{{ appTitle }} {{ appTitle }}
</span> </span>
<span class="dev-env button has-background-success" *ngIf="!env.production"> <span class="dev-env button has-background-success" *ngIf="!environment.production">
<i> <i>
(dev) (dev)
</i> </i>
@ -47,8 +47,18 @@
<app-navigation [appTitle]="appTitle" [appLogo]="appLogo"></app-navigation> <app-navigation [appTitle]="appTitle" [appLogo]="appLogo"></app-navigation>
</div> </div>
</nav> </nav>
<div class="demo padded box" *ngIf="env.display_routes"> <div
Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de date-poll-api. *ngIf="environment.showDemoWarning"
class="well debug has-text-white-bis has-background-warning-dark padded marged"
>
<!-- infos locales storage-->
<i class="fa fa-info"></i>
Ce site est un espace de démonstration, les informations que vous y mettrez seront régulièrement supprimées.
N'en faites pas une utilisation réelle.
</div>
<div class="demo padded box has-background-info-light" *ngIf="environment.display_routes">
voici des liens de démonstration issus des fixtures Doctrine de date-poll-api.
<div class="padded"> <div class="padded">
<div class=""> <div class="">
<a <a

View File

@ -13,11 +13,10 @@ import { environment } from '../../../../environments/environment';
styleUrls: ['./header.component.scss'], styleUrls: ['./header.component.scss'],
}) })
export class HeaderComponent implements OnInit { export class HeaderComponent implements OnInit {
public _user: Observable<Owner> = this.userService.user;
public env = environment;
@Input() public appTitle = environment.appTitle; @Input() public appTitle = environment.appTitle;
@Input() public appLogo = environment.appLogo; @Input() public appLogo = environment.appLogo;
mobileMenuVisible = false; mobileMenuVisible = false;
public environment = environment;
constructor(private userService: UserService) {} constructor(private userService: UserService) {}

View File

@ -6,6 +6,13 @@
</p> </p>
<br /> <br />
<label class="hidden" for="title">Titre</label> <label class="hidden" for="title">Titre</label>
errors:
<pre class="debug padded warning">
form.errors :
{{ form.controls.title.errors | json }}
</pre
>
<input <input
matInput matInput
#title #title
@ -14,8 +21,12 @@
id="title" id="title"
autofocus="autofocus" autofocus="autofocus"
(change)="updateSlug()" (change)="updateSlug()"
required required="required"
#title
/> />
<span class="button is-error" *ngIf="form.controls.title.errors">
Ce champ est requis
</span>
<button <button
mat-button mat-button
*ngIf="form.value.title" *ngIf="form.value.title"

View File

@ -1,9 +1,5 @@
<section class="loading_poll" *ngIf="fetching"></section> <section class="loading_poll" *ngIf="fetching"></section>
<section class="poll_loaded padded" *ngIf="!fetching && poll"> <section class="poll_loaded padded" *ngIf="!fetching && poll">
<div class="well debug">
<!-- infos locales storage-->
</div>
<!-- messages--> <!-- messages-->
<article class="message is-warning" *ngIf="isArchived"> <article class="message is-warning" *ngIf="isArchived">
@ -26,13 +22,12 @@
<div id="export_and_share"> <div id="export_and_share">
<div class="sharing" *ngIf="poll"> <div class="sharing" *ngIf="poll">
<h3 class="margin-top-x8"> <div class="margin-top-x8">
Partager le sondage Partager le sondage
<i class="fa fa-share" aria-hidden="true"></i> <i class="fa fa-share" aria-hidden="true"></i>
</h3> </div>
<p class="nobold text-14" for="copyLink"> <p class="nobold text-14" for="copyLink">
Pour partager le sondage, vous pouvez diffuser ce lien :
<a href="{{ pollService.getParticipationUrl() }}"> <a href="{{ pollService.getParticipationUrl() }}">
{{ pollService.getParticipationUrl() }} {{ pollService.getParticipationUrl() }}
</a> </a>

View File

@ -14,7 +14,8 @@ export const environment = {
frontDomain: 'https://framadate-api.cipherbliss.com', frontDomain: 'https://framadate-api.cipherbliss.com',
production: true, production: true,
display_routes: true, display_routes: true,
autofill: true, showDemoWarning: true,
autofill: false,
autoSendNewPoll: false, autoSendNewPoll: false,
appTitle: 'FramaDate Funky', appTitle: 'FramaDate Funky',
appVersion: '2.1.0', appVersion: '2.1.0',

View File

@ -21,7 +21,8 @@ export const environment = {
frontDomain: 'http://tktest.lan', frontDomain: 'http://tktest.lan',
production: false, production: false,
display_routes: true, display_routes: true,
autofill: true, autofill: false,
showDemoWarning: true,
autoSendNewPoll: false, autoSendNewPoll: false,
appTitle: 'FramaDate Funky', appTitle: 'FramaDate Funky',
appVersion: '2.1.0', appVersion: '2.1.0',

View File

@ -12,6 +12,12 @@ textarea {
color: $primary_color; color: $primary_color;
} }
} }
input[required] {
&:after {
content: '*';
color: red;
}
}
select, select,
option { option {