#115 lister les features de démo sur l'accueil

This commit is contained in:
Tykayn 2021-05-21 12:56:52 +02:00 committed by tykayn
parent d05c77cb08
commit eb6a046fa1
5 changed files with 66 additions and 8 deletions

View File

@ -7,13 +7,13 @@
libre sous licence AGPL v3. libre sous licence AGPL v3.
<app-theme-selector></app-theme-selector> <app-theme-selector></app-theme-selector>
<a href="https://framagit.org/framasoft/framadate/funky-framadate-front"> <a href="https://framagit.org/framasoft/framadate/funky-framadate-front/-/tree/master">
<i class="fa fa-gitlab"></i> Sources</a <i class="fa fa-gitlab"></i> Sources</a
> >
| |
<a href="https://framagit.org/framasoft/framadate/funky-framadate-front/-/wikis/home"> <a href="https://framagit.org/framasoft/framadate/funky-framadate-front/-/tree/master/docs">
<i class="fa fa-book"></i> <i class="fa fa-book"></i>
Documentation 🚴 Documentation
</a> </a>
| |
<a href="https://framateam.org/ux-framatrucs/channels/framadate"> <a href="https://framateam.org/ux-framatrucs/channels/framadate">

View File

@ -18,6 +18,41 @@
{{ 'config.letsgo' | translate }} {{ 'config.letsgo' | translate }}
</a> </a>
</div> </div>
<div
*ngIf="environment.showDemoWarning"
class="demo demo-warning well has-background-warning-light padded marged"
>
Ce que l'on peut faire sur cette démo:
<ul>
<li>
☑️ Créer un nouveau sondage
</li>
<li>
☑️ accéder à un sondage existant en tant que visiteur, ajouter une réponse (StackOfVote)
et un commentaire.
</li>
<li>
☑️
<a
href="https://framagit.org/framasoft/framadate/funky-framadate-front/-/tree/master/docs"
>lire la documentation</a
>
</li>
</ul>
Ce qu'on ne peut pas encore faire:
<ul>
<li>
🚴‍️ mettre à jour son vote à un sondage
</li>
<li>
🚴‍ modifier un de ses sondages existants par un lien d'administration
</li>
<li>
🚴‍ recevoir immédiatement les emails. Ceux ci nécessitent un vidage du spool d'emails
du backend sur demande (mesure anti spam).
</li>
</ul>
</div>
</section> </section>
<section class="search"> <section class="search">
<h1 class="title is-1 is-centered"> <h1 class="title is-1 is-centered">
@ -48,10 +83,22 @@
id="search_email" id="search_email"
placeholder="moi@example.com" placeholder="moi@example.com"
[ngClass]="{ [ngClass]="{
'ng-invalid': nonexistent_email === storageService.vote_stack.owner.email 'has-background-success': email_sent,
'ng-invalid has-background-warning':
nonexistent_email === storageService.vote_stack.owner.email
}" }"
[(ngModel)]="storageService.vote_stack.owner.email" [(ngModel)]="storageService.vote_stack.owner.email"
/> />
<div class="email_sent has-background-success padded" *ngIf="email_sent">
<i class="fa fa-envelope"></i> C'est envoyé! Vérifiez votre boite email, ainsi que votre
dossier de spam.
</div>
<div
class="email_error has-background-warning padded"
*ngIf="nonexistent_email === storageService.vote_stack.owner.email"
>
<i class="fa fa-warning"></i> Aucun sondage enregistré pour cet email.
</div>
<button <button
type="submit" type="submit"
role="button" role="button"

View File

@ -13,6 +13,7 @@ import { DOCUMENT } from '@angular/common';
export class HomeComponent { export class HomeComponent {
public environment = environment; public environment = environment;
public nonexistent_email = ''; public nonexistent_email = '';
private email_sent = false;
constructor( constructor(
@Inject(DOCUMENT) private document: any, @Inject(DOCUMENT) private document: any,
public storageService: StorageService, public storageService: StorageService,
@ -22,6 +23,7 @@ export class HomeComponent {
searchMyPolls() { searchMyPolls() {
const email = this.storageService.vote_stack.owner.email; const email = this.storageService.vote_stack.owner.email;
this.email_sent = false;
this.api.findMyPollsByEmail(email).then( this.api.findMyPollsByEmail(email).then(
(resp) => { (resp) => {
console.log('resp', resp); console.log('resp', resp);
@ -29,6 +31,7 @@ export class HomeComponent {
if (resp) { if (resp) {
if (resp.data && resp.data.mail_sent == '1') { if (resp.data && resp.data.mail_sent == '1') {
this.toastService.display("C'est bon, vérifiez votre boite mail"); this.toastService.display("C'est bon, vérifiez votre boite mail");
this.email_sent = true;
} }
} }
}, },

View File

@ -12,7 +12,7 @@ export const environment = {
production: false, production: false,
display_routes: true, display_routes: true,
autofill: true, autofill: true,
showDemoWarning: false, showDemoWarning: true,
autoSendNewPoll: false, autoSendNewPoll: false,
interval_days_default: 7, interval_days_default: 7,
appTitle: 'funky', appTitle: 'funky',

View File

@ -133,10 +133,12 @@ mat-checkbox {
.cdk-drag { .cdk-drag {
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background: #fefefe; background: #fefefe;
} }
} }
.admin-form { .admin-form {
max-width: 800px; max-width: 800px;
margin: 0 auto; margin: 0 auto;
@ -144,6 +146,7 @@ mat-checkbox {
.fa { .fa {
margin-right: 1ch; margin-right: 1ch;
&.fa-times, &.fa-times,
&.fa-trash { &.fa-trash {
margin-right: 0; margin-right: 0;
@ -205,18 +208,23 @@ mat-checkbox {
.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) { .example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder) {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
} }
.ng-pristine, .ng-pristine,
.ng-dirty { .ng-dirty {
//border-left: #ccc 3px solid; //border-left: #ccc 3px solid;
padding-left: 1em; padding-left: 1em;
} }
.ng-touched.ng-invalid { .ng-touched.ng-invalid {
border-left: $danger 3px solid; border-left: $danger 3px solid;
padding-left: 1em; padding-left: 1em;
} }
.ng-touched.ng-valid {
border-left: $success 3px solid; .theme-dark-crystal {
padding-left: 1em; .ng-touched.ng-valid {
border-left: $success 3px solid;
padding-left: 1em;
}
} }
.bar-nav-admin { .bar-nav-admin {