From e8dc383eaee3f4923a252802340d247e2a459797 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 10 Mar 2022 16:37:17 +0100 Subject: [PATCH] add bullet on lang selector --- mocks/old-stuff/config/defaultConfigs.ts | 8 ++--- src/app/core/models/dateChoice.model.ts | 12 +++---- src/app/core/services/poll.service.ts | 9 +++-- .../steps/step-one/step-one.component.html | 2 +- .../steps/step-two/step-two.component.html | 2 +- .../nav-steps/nav-steps.component.scss | 4 --- .../success/success.component.html | 2 +- .../language-selector.component.html | 3 +- .../language-selector.component.scss | 33 ++++++++++++++++--- src/assets/i18n/en.json | 2 +- src/assets/i18n/fr.json | 2 +- src/styles/libraries/_overrides.scss | 21 ++++++++++-- src/styles/partials/_buttons.scss | 6 +++- src/styles/partials/_typo.scss | 4 +-- 14 files changed, 74 insertions(+), 36 deletions(-) diff --git a/mocks/old-stuff/config/defaultConfigs.ts b/mocks/old-stuff/config/defaultConfigs.ts index 7e18eae6..1697b287 100644 --- a/mocks/old-stuff/config/defaultConfigs.ts +++ b/mocks/old-stuff/config/defaultConfigs.ts @@ -23,10 +23,10 @@ const currentMonth = new Date().getMonth(); const currentDay = new Date().getDate(); export const basicSlicesOfDay: TimeSlices[] = [ - { literal: 'matin' }, - { literal: 'midi' }, - { literal: 'après-midi' }, - { literal: 'soir' }, + { literal: '' }, + // { literal: 'midi' }, + // { literal: 'après-midi' }, + // { literal: 'soir' }, ]; export const otherSlicesOfDay: TimeSlices[] = [ { literal: 'aux aurores' }, diff --git a/src/app/core/models/dateChoice.model.ts b/src/app/core/models/dateChoice.model.ts index bc1ab9d1..faf7e0d0 100644 --- a/src/app/core/models/dateChoice.model.ts +++ b/src/app/core/models/dateChoice.model.ts @@ -11,10 +11,10 @@ export interface TimeSlices { export const timeSlicesProposals: TimeSlices[] = [ { literal: 'matin' }, - { literal: 'midi' }, - { literal: 'après-midi' }, - { literal: 'soir' }, - { literal: 'aux aurores' }, - { literal: 'au petit dej' }, - { literal: 'au deuxième petit dej des hobbits' }, + // { literal: 'midi' }, + // { literal: 'après-midi' }, + // { literal: 'soir' }, + // { literal: 'aux aurores' }, + // { literal: 'au petit dej' }, + // { literal: 'au deuxième petit dej des hobbits' }, ]; diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts index d6f11d85..c55ecb9a 100644 --- a/src/app/core/services/poll.service.ts +++ b/src/app/core/services/poll.service.ts @@ -51,7 +51,7 @@ export class PollService implements Resolve { public allowSeveralHours = false; public richTextMode = false; public mode_calendar = true; // default input to select dates in creation step - public calendar: Date[] = [new Date()]; + public calendar: Date[] = []; public disabled_dates: Date[] = []; constructor( @@ -72,16 +72,15 @@ export class PollService implements Resolve { ) { this.createFormGroup(); - // fill in the next 3 days of the calendar date picker - this.calendar = this.DateUtilitiesService.makeDefaultCalendarDateChoices(); - this.dateChoiceList = this.DateUtilitiesService.makeDefaultDateChoices(); - // disable days before today for (let i = 1; i < 31; i++) { this.disabled_dates.push(this.DateUtilitiesService.addDaysToDate(-i, new Date())); } if (environment.autofill_creation) { this.setDemoValues(); + // fill in the next 3 days of the calendar date picker + this.calendar = this.DateUtilitiesService.makeDefaultCalendarDateChoices(); + this.dateChoiceList = this.DateUtilitiesService.makeDefaultDateChoices(); } if (environment.autoSendNewPoll) { this.createPoll(); diff --git a/src/app/features/administration/form/steps/step-one/step-one.component.html b/src/app/features/administration/form/steps/step-one/step-one.component.html index 91a9a1d9..55070fe2 100644 --- a/src/app/features/administration/form/steps/step-one/step-one.component.html +++ b/src/app/features/administration/form/steps/step-one/step-one.component.html @@ -2,7 +2,7 @@
-

+

{{ 'creation.choose_title' | translate }}

diff --git a/src/app/features/administration/form/steps/step-two/step-two.component.html b/src/app/features/administration/form/steps/step-two/step-two.component.html index 4cb04f75..0b42e717 100644 --- a/src/app/features/administration/form/steps/step-two/step-two.component.html +++ b/src/app/features/administration/form/steps/step-two/step-two.component.html @@ -3,7 +3,7 @@
-

+

{{ 'creation.want' | translate }}

diff --git a/src/app/features/administration/nav-steps/nav-steps.component.scss b/src/app/features/administration/nav-steps/nav-steps.component.scss index 02979618..f800566f 100644 --- a/src/app/features/administration/nav-steps/nav-steps.component.scss +++ b/src/app/features/administration/nav-steps/nav-steps.component.scss @@ -3,9 +3,5 @@ .bottom-step-buttons { .button-previous { margin-left: 0; - &:hover { - background: $d-primary; - color: $white !important; - } } } diff --git a/src/app/features/administration/success/success.component.html b/src/app/features/administration/success/success.component.html index a6f795e4..bc83ed3d 100644 --- a/src/app/features/administration/success/success.component.html +++ b/src/app/features/administration/success/success.component.html @@ -25,7 +25,7 @@
-

+

{{ 'success.title' | translate }}

diff --git a/src/app/shared/components/selectors/language-selector/language-selector.component.html b/src/app/shared/components/selectors/language-selector/language-selector.component.html index 0367895d..bc921a8f 100644 --- a/src/app/shared/components/selectors/language-selector/language-selector.component.html +++ b/src/app/shared/components/selectors/language-selector/language-selector.component.html @@ -80,12 +80,11 @@ [attr.for]="'#lang_' + language" class="lang-element button is-action" [ngClass]="{ - 'is-primary': language_to_apply === language.value, + 'is-primary is-focused': language_to_apply === language.value, 'is-current': language.value === currentLang }" > span:focus, .p-datepicker .p-datepicker-header .p-datepicker-prev:focus, .p-datepicker .p-datepicker-header .p-datepicker-next:focus { - outline: 3px solid $outline-color !important; + //outline: 3px solid $outline-color !important; + + @extend .outlined; } -.p-button.p-button-text { - color: $primary-color; + +.p-datepicker-buttonbar { + .p-button.p-button-text { + color: $primary-color; + background: white; + + &:hover { + color: $d-primary-intense; + background: #f6f5fb; + .p-button-label { + color: $d-primary-intense; + background: #f6f5fb; + } + } + } } diff --git a/src/styles/partials/_buttons.scss b/src/styles/partials/_buttons.scss index 3c7ae57c..a519b9b1 100644 --- a/src/styles/partials/_buttons.scss +++ b/src/styles/partials/_buttons.scss @@ -159,7 +159,11 @@ a { .is-danger { background-color: #e08181; } - +.is-focused { + outline: $outline-color !important; + outline-style: solid; + outline-offset: 0.15rem; +} .btn--danger { @extend .is-danger; } diff --git a/src/styles/partials/_typo.scss b/src/styles/partials/_typo.scss index 5ef5b0c4..73c0b60c 100644 --- a/src/styles/partials/_typo.scss +++ b/src/styles/partials/_typo.scss @@ -16,7 +16,7 @@ body { font-weight: 700; font-size: 32px; line-height: 37px; - margin-bottom: 1rem; + margin-bottom: 2rem; } &.is-2 { color: $d-primary-intense; @@ -39,7 +39,7 @@ body { font-weight: 700; font-size: 32px; line-height: 37px; - margin-bottom: 1rem; + margin-bottom: 2rem; } .is-2 { color: $d-primary-intense;