diff --git a/client/src/components/MainNavigationBar.vue b/client/src/components/MainNavigationBar.vue index 508006a9..de065e86 100644 --- a/client/src/components/MainNavigationBar.vue +++ b/client/src/components/MainNavigationBar.vue @@ -55,7 +55,6 @@ function learninPathSlug(): string { } function handleDropdownSelect(data: DropdownData) { - log.debug("Selected action:", data.action); switch (data.action) { case "settings": router.push("/profile"); @@ -76,25 +75,21 @@ onMounted(() => { log.debug("MainNavigationBar mounted"); }); -const profileDropdownData: DropdownListItem[][] = [ - [ - { - title: "Kontoeinstellungen", - icon: IconSettings as Component, - data: { - action: "settings", - }, +const profileDropdownData: DropdownListItem[] = [ + { + title: "Kontoeinstellungen", + icon: IconSettings as Component, + data: { + action: "settings", }, - ], - [ - { - title: "Abmelden", - icon: IconLogout as Component, - data: { - action: "logout", - }, + }, + { + title: "Abmelden", + icon: IconLogout as Component, + data: { + action: "logout", }, - ], + }, ]; @@ -102,7 +97,6 @@ const profileDropdownData: DropdownListItem[][] = [
(); diff --git a/client/src/components/competences/PerformanceCriteriaRow.vue b/client/src/components/competences/PerformanceCriteriaRow.vue index 624177ab..41ff8093 100644 --- a/client/src/components/competences/PerformanceCriteriaRow.vue +++ b/client/src/components/competences/PerformanceCriteriaRow.vue @@ -8,7 +8,6 @@ interface Props { } const props = withDefaults(defineProps(), { - criteria: undefined, showState: false, }); diff --git a/client/src/components/mediaLibrary/LinkCard.vue b/client/src/components/mediaLibrary/LinkCard.vue index c4ab5003..76502e1a 100644 --- a/client/src/components/mediaLibrary/LinkCard.vue +++ b/client/src/components/mediaLibrary/LinkCard.vue @@ -23,9 +23,9 @@ const props = withDefaults(defineProps(), {

{{ title }}

{{ description }}

- + {{ linkText }} - +
diff --git a/client/src/components/mediaLibrary/MediaLink.vue b/client/src/components/mediaLibrary/MediaLink.vue index 08047853..0a101871 100644 --- a/client/src/components/mediaLibrary/MediaLink.vue +++ b/client/src/components/mediaLibrary/MediaLink.vue @@ -3,14 +3,14 @@ // https://vueschool.io/articles/vuejs-tutorials/extending-vue-router-links-in-vue-3/ import { computed } from "vue"; -import { RouterLink } from "vue-router"; +import type { RouterLinkProps } from "vue-router"; -const props = defineProps({ - ...RouterLink.props, // @ts-ignore - blank: { - type: Boolean, - default: false, - }, +export interface Props extends RouterLinkProps { + blank?: boolean; +} + +const props = withDefaults(defineProps(), { + blank: false, }); const isExternalLink = computed( @@ -24,7 +24,7 @@ const isExternalLink = computed( v-if="isExternalLink" :target="props.blank ? '_blank' : '_self'" rel="noopener" - :href="props.to" + :href="(props.to as string)" > diff --git a/client/src/components/ui/ItDropdown.vue b/client/src/components/ui/ItDropdown.vue index faf6b6ad..74567875 100644 --- a/client/src/components/ui/ItDropdown.vue +++ b/client/src/components/ui/ItDropdown.vue @@ -3,13 +3,13 @@ import type { DropdownListItem } from "@/types"; import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/vue"; const props = defineProps<{ - buttonClasses: [string]; - listItems: [[DropdownListItem]]; + buttonClasses: [string] | []; + listItems: DropdownListItem[]; align: "left" | "right"; }>(); const emit = defineEmits<{ - (e: "select", data: object): void; + (e: "select", data: any): void; }>(); @@ -33,20 +33,18 @@ const emit = defineEmits<{ class="absolute mt-2 px-6 w-56 w-max-full origin-top-right divide-y divide-gray-500 bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" :class="[align === 'left' ? 'left-0' : 'right-0']" > -
-
- - - -
+
+ + +
diff --git a/client/src/i18n.ts b/client/src/i18n.ts index a162a525..235b991a 100644 --- a/client/src/i18n.ts +++ b/client/src/i18n.ts @@ -23,7 +23,7 @@ export function setI18nLanguage(i18n: any, locale: string) { * * axios.defaults.headers.common['Accept-Language'] = locale */ - document.querySelector("html").setAttribute("lang", locale); + document.querySelector("html")?.setAttribute("lang", locale); } export async function loadLocaleMessages(i18n: any, locale: any) { diff --git a/client/src/pages/LoginPage.vue b/client/src/pages/LoginPage.vue index 5d0cd71e..96550c8b 100644 --- a/client/src/pages/LoginPage.vue +++ b/client/src/pages/LoginPage.vue @@ -25,7 +25,11 @@ const userStore = useUserStore();
diff --git a/client/src/pages/StyleGuidePage.vue b/client/src/pages/StyleGuidePage.vue index 24247a61..8e7c584e 100644 --- a/client/src/pages/StyleGuidePage.vue +++ b/client/src/pages/StyleGuidePage.vue @@ -27,29 +27,25 @@ const state = reactive({ }); const dropdownData = [ - [ - { - title: "Option 1", - icon: IconLogout, - data: {}, + { + title: "Option 1", + icon: IconLogout, + data: {}, + }, + { + title: "Option 2", + icon: IconLogout, + data: { + test: 12, }, - { - title: "Option 2", - icon: null, - data: { - test: 12, - }, + }, + { + title: "Option 3", + icon: IconSettings, + data: { + amount: 34, }, - ], - [ - { - title: "Option 3", - icon: IconSettings, - data: { - amount: 34, - }, - }, - ], + }, ]; // TODO: die CSS-Klasse für die Farben wird hier in der StyleGuideView.vue generiert. diff --git a/client/src/pages/competence/CompetenceListPage.vue b/client/src/pages/competence/CompetenceListPage.vue index 2a9f2630..a1d43fb7 100644 --- a/client/src/pages/competence/CompetenceListPage.vue +++ b/client/src/pages/competence/CompetenceListPage.vue @@ -14,6 +14,7 @@ const competenceStore = useCompetenceStore();