fix:#53 linted formatted frontend files

This commit is contained in:
Elmar Kresse
2024-09-07 10:09:30 +02:00
parent a9234cbb16
commit fcbe5c0c55
115 changed files with 14849 additions and 11152 deletions

View File

@@ -26,7 +26,9 @@ import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
const toast = useToast();
const domain = import.meta.env.SSR ? inject<string>("domain")! : window.location.hostname;
const domain = import.meta.env.SSR
? inject<string>("domain")!
: window.location.hostname;
const getLink = () =>
"https://" + domain + "/api/feed?token=" + tokenStore().token;
@@ -36,7 +38,7 @@ const show = () => {
severity: "info",
summary: t("calendarLink.copyToastSummary"),
detail: t("calendarLink.copyToastNotification"),
life: 3000
life: 3000,
});
};
@@ -57,7 +59,7 @@ function copyToClipboard() {
severity: "error",
summary: t("calendarLink.copyToastError"),
detail: t("calendarLink.copyToastErrorDetail"),
life: 3000
life: 3000,
});
});
}
@@ -65,14 +67,14 @@ function copyToClipboard() {
const forwardToGoogle = () => {
window.open(
"https://calendar.google.com/calendar/u/0/r?cid=" +
encodeURI(getLink().replace("https://", "http://"))
encodeURI(getLink().replace("https://", "http://")),
);
};
const forwardToMicrosoft = () => {
window.open(
"https://outlook.live.com/owa?path=/calendar/action/compose&rru=addsubscription&name=HTWK%20Kalender&url=" +
encodeURI(getLink())
encodeURI(getLink()),
);
};
@@ -80,18 +82,18 @@ const actions = computed(() => [
{
label: t("calendarLink.copyToClipboard"),
icon: "pi pi-copy",
command: copyToClipboard
command: copyToClipboard,
},
{
label: t("calendarLink.toGoogleCalendar"),
icon: "pi pi-google",
command: forwardToGoogle
command: forwardToGoogle,
},
{
label: t("calendarLink.toMicrosoftCalendar"),
icon: "pi pi-microsoft",
command: forwardToMicrosoft
}
command: forwardToMicrosoft,
},
]);
</script>

View File

@@ -87,15 +87,15 @@ const hasContent = computed(() => {
>
<slot name="content"></slot>
<div
v-if="button"
class="flex flex-wrap my-3 gap-2 align-items-center justify-content-end"
v-if="button"
class="flex flex-wrap my-3 gap-2 align-items-center justify-content-end"
>
<Button
:disabled="button.disabled"
class="col-12 md:col-4"
:icon="button.icon"
:label="button.label"
@click="button.onClick()"
:disabled="button.disabled"
class="col-12 md:col-4"
:icon="button.icon"
:label="button.label"
@click="button.onClick()"
/>
</div>
</div>

View File

@@ -16,8 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<script lang="ts" setup>
</script>
<script lang="ts" setup></script>
<template>
<div class="flex align-items-center justify-content-center flex-column">
@@ -244,21 +243,30 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<div class="col">
{{ $t("faqView.crossPromo.teaser") }}
<div class="flex flex-column gap-3 my-3">
<Card v-for="promoPage in new Array('mensa', 'htwkarte')" :key="promoPage">
<Card
v-for="promoPage in new Array('mensa', 'htwkarte')"
:key="promoPage"
>
<template #title>
<div class="flex flex-row align-items-start">
<Avatar :image="'/promo/' + promoPage + '.png'" class="mr-2 flex-shrink-0" size="xlarge" />
<div class="flex flex-column gap-1">
<div>
{{$t("faqView.crossPromo." + promoPage + ".title") }}
</div>
<div class="p-card-subtitle text-base">
<a :href="$t('faqView.crossPromo.' + promoPage + '.link')">
{{$t("faqView.crossPromo." + promoPage + ".link") }}
</a>
</div>
<div class="flex flex-row align-items-start">
<Avatar
:image="'/promo/' + promoPage + '.png'"
class="mr-2 flex-shrink-0"
size="xlarge"
/>
<div class="flex flex-column gap-1">
<div>
{{ $t("faqView.crossPromo." + promoPage + ".title") }}
</div>
<div class="p-card-subtitle text-base">
<a
:href="$t('faqView.crossPromo.' + promoPage + '.link')"
>
{{ $t("faqView.crossPromo." + promoPage + ".link") }}
</a>
</div>
</div>
</div>
</template>
<template #content>
<p class="m-0">

View File

@@ -18,13 +18,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<script lang="ts" setup>
import moduleStore from "@/store/moduleStore";
import {router} from "@/main";
import { router } from "@/main";
import AdditionalModuleTable from "@/components/AdditionalModuleTable.vue";
const store = moduleStore();
function topFunction() {
window.scrollTo({top: 0, behavior: 'smooth'});
window.scrollTo({ top: 0, behavior: "smooth" });
}
async function nextStep() {

View File

@@ -129,8 +129,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
/>
</template>
<template #body="slotProps">
<div class="flex flex-column sm:flex-row justify-content-between flex-1 column-gap-4 mx-2 md:mx-4">
<p class="flex-1 align-self-stretch sm:align-self-center my-2">{{ slotProps.data.room }}</p>
<div
class="flex flex-column sm:flex-row justify-content-between flex-1 column-gap-4 mx-2 md:mx-4"
>
<p class="flex-1 align-self-stretch sm:align-self-center my-2">
{{ slotProps.data.room }}
</p>
<Button
:label="$t('freeRooms.viewOccupancy')"
icon="pi pi-hourglass"