translate poll creation, buttons place in stepper 🎨

This commit is contained in:
Tykayn 2022-02-08 18:06:47 +01:00 committed by tykayn
parent 19b9d61192
commit c7e4798ce0
5 changed files with 21 additions and 13 deletions

View File

@ -87,12 +87,12 @@
<div class="column has-text-right"> <div class="column has-text-right">
<app-language-selector class="nav-button"></app-language-selector> <app-language-selector class="nav-button"></app-language-selector>
<button <button
class="has-no-border nav-button cancel-button" class="nav-button cancel-button"
(click)="showCancelDialog()" (click)="showCancelDialog()"
id="display_cancel_popup_button" id="display_cancel_popup_button"
aria-haspopup="dialog" aria-haspopup="dialog"
> >
{{ 'nav.leave' | translate }} <i class="fa fa-times"></i> {{ 'nav.leave' | translate }}
</button> </button>
</div> </div>
</div> </div>

View File

@ -54,24 +54,29 @@
.nav-button { .nav-button {
margin-top: 0; margin-top: 0;
line-height: $stepper-nav-height; margin-right: 1em;
height: $stepper-nav-height; line-height: $stepper-nav-height / 2;
height: $stepper-nav-height / 2;
display: inline-block; display: inline-block;
padding-left: 1em; padding-left: 1em;
&:nth-last-of-type(1) {
margin-right: 0;
}
&app-language-selector { &app-language-selector {
padding-top: 1rem; padding-top: 1rem;
} }
} }
.cancel-button { .cancel-button {
line-height: $stepper-nav-height; line-height: $stepper-nav-height / 2;
height: $stepper-nav-height; height: $stepper-nav-height / 2;
padding: 0 1rem; padding: 0 1rem;
color: $secondary_color; margin-top: $stepper-nav-height / 4.5;
color: $primary_color;
border-color: $primary_color;
&:hover { &:hover {
color: $font_color; color: $white;
outline: black; background: $primary_color;
outline-style: solid;
} }
} }
.cancel-button-reject-bottom { .cancel-button-reject-bottom {

View File

@ -3,7 +3,7 @@
<i class="fa fa-language"></i> <i class="fa fa-language"></i>
{{ 'LANGUAGES_SHORT.' + currentLang.toUpperCase() | translate }} {{ 'LANGUAGES_SHORT.' + currentLang.toUpperCase() | translate }}
<!-- <i class="fa fa-language lang-selector-icon clickable" ></i>--> <!-- <i class="fa fa-language lang-selector-icon clickable" ></i>-->
<i class="fa fa-chevron-down"></i> <!-- <i class="fa fa-chevron-down"></i>-->
</button> </button>
<p-dialog <p-dialog
[modal]="true" [modal]="true"

View File

@ -25,10 +25,13 @@ export class LanguageSelectorComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.availableLanguages = this.languageService.getAvailableLanguages(); this.availableLanguages = this.languageService.getAvailableLanguages();
this.currentLang = this.languageService.getLangage();
if (this.storageService.language && this.availableLanguages.indexOf(this.storageService.language) !== -1) { if (this.storageService.language && this.availableLanguages.indexOf(this.storageService.language) !== -1) {
this.languageService.setLanguage(this.storageService.language); this.languageService.setLanguage(this.storageService.language);
this.currentLang = this.storageService.language;
} }
this.currentLang = this.languageService.getLangage();
this.language_to_apply = '' + this.currentLang;
} }
setLang(newlang: string = 'fr'): void { setLang(newlang: string = 'fr'): void {

View File

@ -41,7 +41,7 @@
}, },
"creation": { "creation": {
"init": "Creation", "init": "Creation",
"title": "To begin with", "title": "Poll creation",
"want": "I want to create a poll", "want": "I want to create a poll",
"dialog": "Leave poll creation?", "dialog": "Leave poll creation?",
"dialog_content": "Do you really want to leave the poll creation ? All data will be lost.", "dialog_content": "Do you really want to leave the poll creation ? All data will be lost.",