hide nav on creation, stepper bar color 🎨
This commit is contained in:
parent
61214b5e0d
commit
60d0678cb7
|
@ -5,7 +5,11 @@
|
||||||
|
|
||||||
<mat-sidenav-content>
|
<mat-sidenav-content>
|
||||||
<div id="big_container" [class]="themeClass">
|
<div id="big_container" [class]="themeClass">
|
||||||
<app-header [appTitle]="appTitle" [appLogo]="appLogo"></app-header>
|
<app-header
|
||||||
|
*ngIf="onHomePage || environment.display_menu_creation"
|
||||||
|
[appTitle]="appTitle"
|
||||||
|
[appLogo]="appLogo"
|
||||||
|
></app-header>
|
||||||
<div [class.container]="!onHomePage">
|
<div [class.container]="!onHomePage">
|
||||||
<main [@routeAnimations]="prepareRoute(outlet)">
|
<main [@routeAnimations]="prepareRoute(outlet)">
|
||||||
<router-outlet #outlet></router-outlet>
|
<router-outlet #outlet></router-outlet>
|
||||||
|
|
|
@ -72,7 +72,7 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
|
|
||||||
this.onHomePage = evt.url === '/';
|
this.onHomePage = evt.url === '/';
|
||||||
|
|
||||||
let mainelem = this.document.querySelector('#big_container main');
|
let mainelem = this.document.querySelector('#big_container');
|
||||||
console.log('mainelem', mainelem);
|
console.log('mainelem', mainelem);
|
||||||
window.scrollTo(0, mainelem.offsetTop);
|
window.scrollTo(0, mainelem.offsetTop);
|
||||||
});
|
});
|
||||||
|
|
|
@ -114,7 +114,7 @@ export class PollService implements Resolve<Poll> {
|
||||||
public createFormGroup() {
|
public createFormGroup() {
|
||||||
let minlengthValidation = environment.production ? 12 : 0;
|
let minlengthValidation = environment.production ? 12 : 0;
|
||||||
let form = this.fb.group({
|
let form = this.fb.group({
|
||||||
title: ['mon titre de sondage', [Validators.required, Validators.minLength(minlengthValidation)]],
|
title: ['', [Validators.required, Validators.minLength(minlengthValidation)]],
|
||||||
creatorPseudo: ['', [Validators.required]],
|
creatorPseudo: ['', [Validators.required]],
|
||||||
created_at: [new Date(), [Validators.required]],
|
created_at: [new Date(), [Validators.required]],
|
||||||
creatorEmail: ['', [Validators.required]],
|
creatorEmail: ['', [Validators.required]],
|
||||||
|
@ -126,7 +126,6 @@ export class PollService implements Resolve<Poll> {
|
||||||
whoCanChangeAnswers: ['', [Validators.required]],
|
whoCanChangeAnswers: ['', [Validators.required]],
|
||||||
isAboutDate: [true, [Validators.required]],
|
isAboutDate: [true, [Validators.required]],
|
||||||
expiresDaysDelay: [environment.expiresDaysDelay, []],
|
expiresDaysDelay: [environment.expiresDaysDelay, []],
|
||||||
maxCountOfAnswers: [300, []],
|
|
||||||
isZeroKnoledge: [false, [Validators.required]],
|
isZeroKnoledge: [false, [Validators.required]],
|
||||||
isProtectedByPassword: [false, [Validators.required]],
|
isProtectedByPassword: [false, [Validators.required]],
|
||||||
isOwnerNotifiedByEmailOnNewVote: [true, [Validators.required]],
|
isOwnerNotifiedByEmailOnNewVote: [true, [Validators.required]],
|
||||||
|
@ -137,6 +136,7 @@ export class PollService implements Resolve<Poll> {
|
||||||
isMaybeAnswerAvailable: [true, [Validators.required]],
|
isMaybeAnswerAvailable: [true, [Validators.required]],
|
||||||
isNoAnswerAvailable: [true, [Validators.required]],
|
isNoAnswerAvailable: [true, [Validators.required]],
|
||||||
allowComments: [true, [Validators.required]],
|
allowComments: [true, [Validators.required]],
|
||||||
|
maxCountOfAnswers: [300, []],
|
||||||
hasMaxCountOfAnswers: [300, [Validators.required]],
|
hasMaxCountOfAnswers: [300, [Validators.required]],
|
||||||
useVoterUniqueLink: [false, [Validators.required]],
|
useVoterUniqueLink: [false, [Validators.required]],
|
||||||
voterEmailList: ['', []],
|
voterEmailList: ['', []],
|
||||||
|
@ -153,7 +153,7 @@ export class PollService implements Resolve<Poll> {
|
||||||
*/
|
*/
|
||||||
public patchFormDefaultValues() {
|
public patchFormDefaultValues() {
|
||||||
this.form.patchValue({
|
this.form.patchValue({
|
||||||
title: 'mon titre de sondage',
|
title: 'Mon titre de sondage',
|
||||||
description: '',
|
description: '',
|
||||||
custom_url: this.uuidService.getUUID(),
|
custom_url: this.uuidService.getUUID(),
|
||||||
creatorPseudo: '',
|
creatorPseudo: '',
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@import '../../../../styles/variables';
|
@import '../../../../styles/variables';
|
||||||
.admin-form {
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
border: solid 1px $border-color;
|
border: solid 1px $border-color;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<section class="creation-stepper" id="creation_stepper">
|
<section class="creation-stepper" id="creation_stepper">
|
||||||
<div class="shortcuts" *ngIf="show_shortcuts">
|
<div class="shortcuts" *ngIf="environment.showStepperShortcuts">
|
||||||
<a
|
<a
|
||||||
class="shortcut"
|
class="shortcut"
|
||||||
href="#"
|
href="#"
|
||||||
|
@ -51,17 +51,17 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="step-info">
|
<div class="step-info">
|
||||||
<h2 classs="title is-2" *ngIf="pollService.step_current == 1">
|
<h2 classs="step-title-poll" *ngIf="pollService.step_current == 1">
|
||||||
{{ 'creation.title' | translate }}
|
{{ 'creation.title' | translate }}
|
||||||
</h2>
|
</h2>
|
||||||
<h2 class="title is-3" *ngIf="pollService.step_current > 1">
|
<h2 class="step-title-poll" *ngIf="pollService.step_current > 1">
|
||||||
<span class="poll-title">
|
<span class="poll-title">
|
||||||
{{ pollService.form.value.title }}
|
{{ pollService.form.value.title }}
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h3 class="title is-2">Étape {{ step_current }} sur {{ step_max }}</h3>
|
<h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-narrow has-text-right">
|
<div class="column is-narrow has-text-right">
|
||||||
<a class="shortcut cancel-button" (click)="cancelDialog()">
|
<a class="shortcut cancel-button" (click)="cancelDialog()">
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
@import '../../../../styles/variables';
|
@import '../../../../styles/variables';
|
||||||
|
.step-info {
|
||||||
|
.title.step-title-poll {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: $border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
.step-bar-container {
|
.step-bar-container {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
height: 0.6em;
|
height: 0.6em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 1px;
|
min-width: 1px;
|
||||||
background: $border-color !important;
|
background: $d-grey !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.step-bar-progress {
|
.step-bar-progress {
|
||||||
|
|
|
@ -14,6 +14,7 @@ export class StepperComponent {
|
||||||
public step_current: number = 1;
|
public step_current: number = 1;
|
||||||
@Input()
|
@Input()
|
||||||
public step_max: number = 5;
|
public step_max: number = 5;
|
||||||
|
public environment = environment;
|
||||||
public show_shortcuts = environment.showStepperShortcuts;
|
public show_shortcuts = environment.showStepperShortcuts;
|
||||||
constructor(
|
constructor(
|
||||||
public pollService: PollService,
|
public pollService: PollService,
|
||||||
|
|
|
@ -19,13 +19,14 @@ export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
display_routes: false,
|
display_routes: false,
|
||||||
showDemoWarning: false,
|
showDemoWarning: false,
|
||||||
autofill_creation: true,
|
display_menu_creation: false,
|
||||||
|
autofill_creation: false,
|
||||||
autofill_participation: false,
|
autofill_participation: false,
|
||||||
advanced_options_display: false,
|
advanced_options_display: false,
|
||||||
autofill_default_timeslices: false,
|
autofill_default_timeslices: false,
|
||||||
autoSendNewPoll: false,
|
autoSendNewPoll: false,
|
||||||
interval_days_default: 7,
|
interval_days_default: 7,
|
||||||
showStepperShortcuts: true,
|
showStepperShortcuts: false,
|
||||||
expiresDaysDelay: 60,
|
expiresDaysDelay: 60,
|
||||||
maxCountOfAnswers: 300,
|
maxCountOfAnswers: 300,
|
||||||
appTitle: 'FramaDate',
|
appTitle: 'FramaDate',
|
||||||
|
|
|
@ -11,13 +11,14 @@ export const environment = {
|
||||||
frontDomain: 'http://127.0.0.1:4200',
|
frontDomain: 'http://127.0.0.1:4200',
|
||||||
production: false,
|
production: false,
|
||||||
display_routes: false, // demo paths to test polls
|
display_routes: false, // demo paths to test polls
|
||||||
autofill_creation: true,
|
display_menu_creation: false,
|
||||||
|
autofill_creation: false,
|
||||||
advanced_options_display: false,
|
advanced_options_display: false,
|
||||||
autofill_participation: false,
|
autofill_participation: false,
|
||||||
autofill_default_timeslices: false,
|
autofill_default_timeslices: false,
|
||||||
showDemoWarning: false,
|
showDemoWarning: false,
|
||||||
autoSendNewPoll: false,
|
autoSendNewPoll: false,
|
||||||
showStepperShortcuts: true,
|
showStepperShortcuts: false,
|
||||||
interval_days_default: 7,
|
interval_days_default: 7,
|
||||||
expiresDaysDelay: 60,
|
expiresDaysDelay: 60,
|
||||||
maxCountOfAnswers: 300,
|
maxCountOfAnswers: 300,
|
||||||
|
|
|
@ -176,8 +176,10 @@ mat-checkbox {
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-form {
|
.admin-form {
|
||||||
max-width: 800px;
|
.step {
|
||||||
margin: 0 auto;
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fa {
|
.fa {
|
||||||
|
|
Loading…
Reference in New Issue