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;
private themeSubscription: Subscription;
public environment = environment;
constructor(
private router: Router,
private titleService: Title,

View File

@ -6,7 +6,7 @@
<span class="app-title title is-2">
{{ appTitle }}
</span>
<span class="dev-env button has-background-success" *ngIf="!env.production">
<span class="dev-env button has-background-success" *ngIf="!environment.production">
<i>
(dev)
</i>
@ -47,8 +47,18 @@
<app-navigation [appTitle]="appTitle" [appLogo]="appLogo"></app-navigation>
</div>
</nav>
<div class="demo padded box" *ngIf="env.display_routes">
Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de date-poll-api.
<div
*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="">
<a

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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