Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Apr 28, 2024
1 parent 552a9c7 commit 71edaac
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 27 deletions.
4 changes: 2 additions & 2 deletions webclient/components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ const navigation = computed(() => [
<div class="mt-10 flex justify-center space-x-10 text-center">
<Btn to="https://tum.de" variant="rounded-xl pt-2 pb-4 px-4 focusable" size="sm">
<p class="text-zinc-600 text-center text-xs">
{{ t("official_roomfinder") }}<br />
{{ t("official_roomfinder") }}<br >
<img
:alt="t('tum_logo_alt')"
:src="`/logos/tum_${colorMode.value === 'dark' ? 'dark' : 'light'}_${locale}.svg`"
width="200"
height="80"
loading="lazy"
aria-hidden="true"
/>
>
</p>
</Btn>
</div>
Expand Down
2 changes: 1 addition & 1 deletion webclient/components/AppNavHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<nav class="mx-auto max-w-4xl">
<div class="mx-5 my-2.5 flex place-content-between content-between justify-between gap-x-10 lg:mx-10">
<NuxtLink class="my-auto hidden lg:block print:!block" to="/">
<img alt="Navigatum Logo" class="pt-2" width="201" height="32" src="~/assets/logos/navigatum.svg" />
<img alt="Navigatum Logo" class="pt-2" width="201" height="32" src="~/assets/logos/navigatum.svg" >
</NuxtLink>
<div class="my-auto max-w-lg flex-grow lg:col-span-3 print:!hidden">
<slot />
Expand Down
5 changes: 2 additions & 3 deletions webclient/components/AppSearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ watchEffect(() => {
<ul v-for="s in data.sections" v-cloak :key="s.facet" class="flex flex-col gap-2">
<div class="flex items-center">
<span class="text-md text-zinc-800 me-4 flex-shrink">{{ t(`sections.${s.facet}`) }}</span>
<div class="border-zinc-800 flex-grow border-t"></div>
<div class="border-zinc-800 flex-grow border-t" />
</div>

<template v-for="(e, i) in s.entries" :key="e.id">
Expand All @@ -181,8 +181,7 @@ watchEffect(() => {
@click="searchBarFocused = false"
@mousedown="keep_focus = true"
@mouseover="highlighted = null"
>
</SearchResultItem>
/>
</template>
<li class="-mt-2">
<Btn
Expand Down
2 changes: 1 addition & 1 deletion webclient/components/BreadcrumbList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const props = withDefaults(defineProps<{ items: Item[]; class?: string }>(), { c
>
<span property="name">{{ item.name }}</span>
</NuxtLink>
<meta property="position" :content="`${i + 1}`" />
<meta property="position" :content="`${i + 1}`" >
</li>
</template>
</ol>
Expand Down
2 changes: 1 addition & 1 deletion webclient/components/Checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const model = defineModel<boolean>();
v-model="model"
type="checkbox"
class="focusable bg-zinc-100 border-zinc-300 z-40 min-h-4 min-w-4 accent-blue-400"
/>
>
</div>
<div class="ps-1">
<label :for="id" class="text-zinc-900 z-30 text-sm font-medium">
Expand Down
5 changes: 2 additions & 3 deletions webclient/components/DetailsInteractiveMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ function loadInteractiveMap(fromUi = false) {
if (document.getElementById("interactive-map")?.classList.contains("maplibregl-map")) {
marker.value?.remove();
} else {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore recursive calls are not supported by ts
// @ts-expect-error recursive calls are not supported by ts
map.value = initMap("interactive-map");
document.getElementById("interactive-map")?.classList.remove("loading");
Expand Down Expand Up @@ -260,7 +259,7 @@ function setOverlayImage(imgUrl: string | null, coords: Coordinates | undefined)
<div v-if="webglSupport" id="interactive-map" class="absolute !h-full !w-full" />
<div v-else class="relative">
{{ t("no_webgl.no_browser_support") }}
{{ t("no_webgl.explain_webgl") }} <br />
{{ t("no_webgl.explain_webgl") }} <br >
{{ t("no_webgl.please_try") }}:
<ol>
<li>
Expand Down
2 changes: 1 addition & 1 deletion webclient/components/DetailsSources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { t } = useI18n({ useScope: "local" });
<template v-if="i < sources.base.length - 1"> • </template>
</span>
<span v-if="sources.patched">
<br />
<br >
({{ t("base.patched") }})
</span>
</p>
Expand Down
5 changes: 2 additions & 3 deletions webclient/components/FeedbackModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const feedback = useFeedback();
class="focusable bg-zinc-200 border-zinc-400 flex-grow rounded border px-2 py-1"
type="text"
:placeholder="t('subject')"
/>
>
</div>

<div class="flex flex-col pb-5">
Expand All @@ -41,8 +41,7 @@ const feedback = useFeedback();
class="focusable bg-zinc-200 border-zinc-400 resize-y rounded border px-2 py-1"
:placeholder="t('message')"
rows="6"
>
</textarea>
/>
<p class="text-zinc-500 text-xs">
{{
{
Expand Down
2 changes: 1 addition & 1 deletion webclient/components/RoomfinderImageLocation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ onMounted(draw);
'max-w-2xl': map.height <= map.width,
}"
>
<canvas :id="props.id" class="w-full" :width="map.width" :height="map.height"></canvas>
<canvas :id="props.id" class="w-full" :width="map.width" :height="map.height" />
</div>
</template>

Expand Down
4 changes: 2 additions & 2 deletions webclient/components/SearchResultItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ type RoomEntry = components["schemas"]["RoomEntry"];
<small>
{{ item.subtext }}
<template v-if="item.type === 'room' || item.type === 'virtual_room' || item.type === 'poi'"
>, <b v-html="item.subtext_bold"></b
></template>
>, <b v-html="item.subtext_bold"
/></template>
</small>
</div>
</NuxtLink>
Expand Down
10 changes: 7 additions & 3 deletions webclient/components/SearchSectionList.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
type SearchResponse = components["schemas"]["SearchResponse"];
import type { components } from "~/api_types";
import SearchResultItem from "~/components/SearchResultItem.vue";
type SearchResponse = components["schemas"]["SearchResponse"];
defineProps<{
data: SearchResponse;
Expand All @@ -19,8 +19,12 @@ const { t } = useI18n({ useScope: "local" });
<h2 class="text-md text-zinc-500 font-semibold">{{ t(`sections.${s.facet}`) }}</h2>
<ul class="flex flex-col gap-3">
<template v-for="(e, i) in s.entries" :key="e.id">
<SearchResultItem v-if="i < s.n_visible" :highlighted="false" :item="e" @click="router.push(`/view/${e.id}`)">
</SearchResultItem>
<SearchResultItem
v-if="i < s.n_visible"
:highlighted="false"
:item="e"
@click="router.push(`/view/${e.id}`)"
/>
</template>
</ul>
<p v-if="s.estimatedTotalHits > 10" class="text-zinc-500 text-sm">
Expand Down
4 changes: 2 additions & 2 deletions webclient/components/Spinner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const props = defineProps<{
fill="none"
viewBox="0 0 24 24"
>
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" />
<path
class="opacity-75"
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
></path>
/>
</svg>
</template>
2 changes: 1 addition & 1 deletion webclient/components/TokenBasedModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function sendForm() {
@click="sendForm"
>
<template v-if="loading">
<Spinner class="my-auto h-4 w-4"></Spinner>
<Spinner class="my-auto h-4 w-4" />
{{ t("sending...") }}
</template>
<template v-else-if="error.blockSend">{{ t("try_again_later") }}</template>
Expand Down
2 changes: 1 addition & 1 deletion webclient/composables/feedbackToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function useFeedbackToken(t: ReturnType<typeof useI18n>["t"]): {

// legacy migration function TODO: remove only after 31.09.2023, to give our users time to migrate to the new token format
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// @ts-expect-error
if (token.value?.expiry) {
token.value = null;
}
Expand Down
4 changes: 2 additions & 2 deletions webclient/pages/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
const route = useRoute();
import { ArrowRightIcon } from "@heroicons/vue/24/outline";
const route = useRoute();
const feedback = useFeedback();
const { t } = useI18n({ useScope: "local" });
</script>

<template>
<div class="mx-auto max-w-xl pt-4">
<img src="../assets/404_navigatum.svg" :alt="t('img_alt')" />
<img src="../assets/404_navigatum.svg" :alt="t('img_alt')" >
<div class="flex flex-col items-center gap-1 p-5">
<h5 class="text-zinc-800 text-lg">{{ t("header") }}</h5>
<p class="text-md text-zinc-600">{{ t("description") }}</p>
Expand Down

0 comments on commit 71edaac

Please sign in to comment.