fix: lint

This commit is contained in:
kolaente 2022-02-06 20:32:21 +01:00
parent 84f177c80e
commit aac777e286
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 16 additions and 12 deletions

View file

@ -1,5 +1,6 @@
<template> <template>
<card class="has-no-shadow how-it-works-modal" <card
class="has-no-shadow how-it-works-modal"
:title="$t('input.datepickerRange.math.title')"> :title="$t('input.datepickerRange.math.title')">
<p> <p>
{{ $t('input.datepickerRange.math.intro') }} {{ $t('input.datepickerRange.math.intro') }}
@ -12,11 +13,13 @@
</p> </p>
<p> <p>
<i18n-t keypath="input.datepickerRange.math.similar"> <i18n-t keypath="input.datepickerRange.math.similar">
<a href="https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/" <a
href="https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/"
rel="noreferrer noopener nofollow" target="_blank"> rel="noreferrer noopener nofollow" target="_blank">
Grafana Grafana
</a> </a>
<a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math" <a
href="https://www.elastic.co/guide/en/elasticsearch/reference/7.3/common-options.html#date-math"
rel="noreferrer noopener nofollow" target="_blank"> rel="noreferrer noopener nofollow" target="_blank">
Elasticsearch Elasticsearch
</a> </a>

View file

@ -256,7 +256,7 @@ const router = createRouter({
dateTo: parseDateOrString(route.query.to, getNextWeekDate()), dateTo: parseDateOrString(route.query.to, getNextWeekDate()),
showNulls: route.query.showNulls === 'true', showNulls: route.query.showNulls === 'true',
showOverdue: route.query.showOverdue === 'true', showOverdue: route.query.showOverdue === 'true',
}) }),
}, },
{ {
path: '/lists/new/:namespaceId/', path: '/lists/new/:namespaceId/',

View file

@ -5,7 +5,7 @@
</h3> </h3>
<p v-if="!showAll" class="show-tasks-options"> <p v-if="!showAll" class="show-tasks-options">
<datepicker-with-range @dateChanged="setDate"> <datepicker-with-range @dateChanged="setDate">
<template #trigger="{toggle, buttonText}"> <template #trigger="{toggle}">
<x-button @click.prevent.stop="toggle()" variant="primary" :shadow="false" class="mb-2"> <x-button @click.prevent.stop="toggle()" variant="primary" :shadow="false" class="mb-2">
{{ $t('task.show.select') }} {{ $t('task.show.select') }}
</x-button> </x-button>
@ -46,8 +46,7 @@
<script setup lang="ts"> <script setup lang="ts">
import SingleTaskInList from '@/components/tasks/partials/singleTaskInList.vue' import SingleTaskInList from '@/components/tasks/partials/singleTaskInList.vue'
import {parseDateOrString} from '@/helpers/time/parseDateOrString' import {useStore} from 'vuex'
import {mapState, useStore} from 'vuex'
import {computed, ref, watchEffect} from 'vue' import {computed, ref, watchEffect} from 'vue'
import Fancycheckbox from '@/components/input/fancycheckbox.vue' import Fancycheckbox from '@/components/input/fancycheckbox.vue'
@ -73,6 +72,8 @@ const showNothingToDo = ref<boolean>(false)
setTimeout(() => showNothingToDo.value = true, 100) setTimeout(() => showNothingToDo.value = true, 100)
// NOTE: You MUST provide either dateFrom and dateTo OR showAll for the component to actually show tasks. // NOTE: You MUST provide either dateFrom and dateTo OR showAll for the component to actually show tasks.
// Linting disabled because we explicitely enabled destructuring in vite's config, this will work.
// eslint-disable-next-line vue/no-setup-props-destructure
const { const {
dateFrom, dateFrom,
dateTo, dateTo,
@ -128,7 +129,7 @@ const tasksSorted = computed(() => {
...tasksWithoutDueDate, ...tasksWithoutDueDate,
] ]
}) })
const hasTasks = computed(() => tasks && tasks.value.length > 0) const hasTasks = computed(() => tasks.value && tasks.value.length > 0)
const userAuthenticated = computed(() => store.state.auth.authenticated) const userAuthenticated = computed(() => store.state.auth.authenticated)
const loading = computed(() => store.state[LOADING] && store.state[LOADING_MODULE] === 'tasks') const loading = computed(() => store.state[LOADING] && store.state[LOADING_MODULE] === 'tasks')
@ -173,7 +174,7 @@ async function loadPendingTasks(from: string, to: string) {
// Since this route is authentication only, users would get an error message if they access the page unauthenticated. // Since this route is authentication only, users would get an error message if they access the page unauthenticated.
// Since this component is mounted as the home page before unauthenticated users get redirected // Since this component is mounted as the home page before unauthenticated users get redirected
// to the login page, they will almost always see the error message. // to the login page, they will almost always see the error message.
if (!userAuthenticated) { if (!userAuthenticated.value) {
return return
} }