Skip to content

Commit

Permalink
Run npm run lint:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krystof-k committed Jan 31, 2024
1 parent 8f986b0 commit 4c4a4f3
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const getReducedCandidates = () => {
<StackComponent spacing="medium">
<StackComponent spacing="extra-small">
<TitleText tag="h4" size="small">{{ electionName }}</TitleText>
<BodyText size="small" v-if="electionDateFrom && electionDateTo">
<BodyText v-if="electionDateFrom && electionDateTo" size="small">
{{ getDurationDate(electionDateFrom, electionDateTo) }}
</BodyText>
</StackComponent>
Expand All @@ -151,8 +151,8 @@ const getReducedCandidates = () => {
class="full-width"
>
<AvatarComponent
:backgroundImage="candidate.image"
:backgroundColor="
:background-image="candidate.image"
:background-color="
idx == 0
? 'rgb(var(--color-primary-bg-strong))'
: 'rgb(var(--color-primary-bg))'
Expand Down Expand Up @@ -248,7 +248,7 @@ const getReducedCandidates = () => {
padding="medium"
border
corner="bottom-left"
borderRadius="medium"
border-radius="medium"
class="full-width"
>
<StackComponent horizontal spacing="medium" centered>
Expand Down Expand Up @@ -313,7 +313,7 @@ const getReducedCandidates = () => {
padding="medium"
border
corner="bottom-left"
borderRadius="medium"
border-radius="medium"
class="full-width"
>
<StackComponent horizontal spacing="medium" centered>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/comparison/ComparisonGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export interface Source {
answer.candidate_id === candidateId &&
answer.question_id === question.id,
)[0]?.sources as Source[]"
v-bind:key="source.url"
:key="source.url"
>
<li>
<a :href="source.url">{{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/profile/AuthPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const { t } = useI18n();
$t('routes.profile.AuthPageVue.log-in')
}}</template>
</TitleText>
<BodyText strong size="small" v-if="type === 'registration'">
<BodyText v-if="type === 'registration'" strong size="small">
{{ $t('routes.profile.AuthPageVue.opinion') }}
</BodyText>
</StackComponent>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/profile/EmailAuthPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@ const handleSubmit = async () => {
>
<StackComponent spacing="medium" centered stretched>
<TextInputComponent
v-model="emailAddress"
required
label="E-mail"
type="email"
placeholder="E-mail"
:value="emailAddress"
v-model="emailAddress"
:icon="mdiEmailOutline"
:disabled="posting"
/>

<ButtonComponent
kind="filled"
color="primary"
@click.prevent="handleSubmit"
:loading="posting"
@click.prevent="handleSubmit"
>
{{ $t('routes.profile.EmailAuthPageVue.confirmation') }}
<template #iconAfter>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/routes/profile/EmailFormPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const handleSubmit = async () => {
</ResponsiveWrapper>
</template>

<NavigationBar transparent :with-logo="false" v-if="step === 1">
<NavigationBar v-if="step === 1" transparent :with-logo="false">
<template #right>
<IconButton kind="link" @click="handleClose">
<IconComponent
Expand All @@ -164,7 +164,7 @@ const handleSubmit = async () => {
</template>
<StaticContentLayout size="small">
<StackComponent spacing="medium" centered>
<TitleText tag="p" size="medium" v-if="step === 0">
<TitleText v-if="step === 0" tag="p" size="medium">
{{ texts[step][type].title }}
</TitleText>

Expand All @@ -176,31 +176,31 @@ const handleSubmit = async () => {
</TitleText>
</template>

<BodyText strong size="medium" v-if="step === 0">
<BodyText v-if="step === 0" strong size="medium">
{{ $t('routes.profile.EmailFormPageVue.notification') }}
</BodyText>

<BodyText size="medium" centered v-if="step === 1">
<BodyText v-if="step === 1" size="medium" centered>
{{ texts[step][type].info }}
<BodyText strong size="medium"> {{ emailAddress }} </BodyText>
</BodyText>

<BodyText tag="p" size="medium" centered v-if="step === 0">
<BodyText v-if="step === 0" tag="p" size="medium" centered>
{{ texts[step][type].info }}
</BodyText>

<BodyText tag="p" size="medium" centered v-if="step === 1">
<BodyText v-if="step === 1" tag="p" size="medium" centered>
{{ $t('routes.profile.EmailFormPageVue.about-spam') }}
</BodyText>

<FormComponent @submit.prevent="handleSubmit" v-if="step === 0">
<FormComponent v-if="step === 0" @submit.prevent="handleSubmit">
<TextInputComponent
v-model="emailAddress"
required
label="E-mail"
type="email"
placeholder="E-mail"
:value="emailAddress"
v-model="emailAddress"
:icon="mdiEmailOutline"
:disabled="posting"
:error="emailAddressError"
Expand All @@ -209,8 +209,8 @@ const handleSubmit = async () => {
<ButtonComponent
kind="filled"
color="primary"
@click.prevent="handleSubmit"
:loading="posting"
@click.prevent="handleSubmit"
>
{{ $t('routes.profile.EmailFormPageVue.send-confirm') }}
<template #iconAfter>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/routes/profile/ProfilePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ if (!userStore.user) router.push(appRoutes.login);
</ResponsiveWrapper>

<TimelineComponent style="margin-top: 2rem">
<TimelineItemComponent
v-for="(answer, idx) in answers"
v-bind:key="idx"
>
<TimelineItemComponent v-for="(answer, idx) in answers" :key="idx">
<ElectionCardWrapperComponent :answer="answer" />
</TimelineItemComponent>

Expand Down
14 changes: 7 additions & 7 deletions frontend/src/routes/profile/ProfileSettingsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ const handleLogout = async () => {
<StackComponent spacing="large" centered>
<FormComponent
class="w-full"
@submit.prevent="onSubmit"
:success="formSavedSuccess"
@submit.prevent="onSubmit"
>
<TextInputComponent
label="Celé jméno"
type="text"
placeholder="Jan Novák"
class="w-full"
:modelValue="user?.displayName"
:model-value="user?.displayName"
:icon="mdiAccountOutline"
@update:modelValue="
:error="validateInput(user?.displayName)"
@update:model-value="
(newVal) => {
if (user) user.displayName = newVal;
}
"
:error="validateInput(user?.displayName)"
/>

<TextInputComponent
Expand All @@ -147,9 +147,9 @@ const handleLogout = async () => {
type="email"
placeholder="E-mail"
class="w-full"
:modelValue="user?.email"
:model-value="user?.email"
:icon="mdiEmailOutline"
@update:modelValue="
@update:model-value="
(newVal) => {
if (user) user.email = newVal;
}
Expand Down Expand Up @@ -245,8 +245,8 @@ const handleLogout = async () => {
kind="filled"
size="medium"
color="primary"
@click.prevent="handleDeleteUserClick"
center
@click.prevent="handleDeleteUserClick"
>
{{
$t('routes.profile.ProfileSettingsPage.button-delete-profile')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/result/ResultCandidateCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const toggleClick = () => {
? candidate?.parties?.[0].name
: candidate?.name
}}</BodyText>
<BodyText size="medium" v-if="expert">
<BodyText v-if="expert" size="medium">
postoje z verejných zdrojov
</BodyText>
<!--
Expand Down

0 comments on commit 4c4a4f3

Please sign in to comment.