release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
4 changed files with 33 additions and 20 deletions
Showing only changes of commit 1e64cc3f60 - Show all commits

View File

@ -1,19 +1,11 @@
<template> <template>
<q-item <q-item clickable tag="a" target="self" :to="{ name: link }">
clickable <q-item-section v-if="icon" avatar>
tag="a"
target="self"
:to="{name:link}"
>
<q-item-section
v-if="icon"
avatar
>
<q-icon :name="icon" /> <q-icon :name="icon" />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label>{{ title }}</q-item-label> <q-item-label>{{ realTitle }}</q-item-label>
<q-item-label caption> <q-item-label caption>
{{ caption }} {{ caption }}
</q-item-label> </q-item-label>
@ -22,30 +14,48 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from '@vue/composition-api'; import { computed, defineComponent } from '@vue/composition-api';
export default defineComponent({ export default defineComponent({
name: 'EssentialLink', name: 'EssentialLink',
props: { props: {
title: { title: {
type: String, type: String,
required: true, required: true
}, },
caption: { caption: {
type: String, type: String,
default: '', default: ''
}, },
link: { link: {
type: String, type: String,
default: 'home', default: 'home'
}, },
icon: { icon: {
type: String, type: String,
default: '', default: ''
}, }
}, },
setup(props, { root }) {
let title = props.title;
if (props.title.includes('loadFromStore')) {
const startIndex = props.title.indexOf('(') + 1;
const endIndex = props.title.indexOf(')');
const substring = props.title
.substring(startIndex, endIndex)
.replace(/"/g, '');
console.log(substring);
console.log(root.$store.getters[substring]);
console.log('loadFromStore');
title = computed(() => {
return root.$store.getters[substring];
});
}
return { realTitle: title };
}
}); });
</script> </script>

View File

@ -1,5 +1,5 @@
const config = { const config = {
baseURL: "http://flaschengeist.local:5000" baseURL: 'http://localhost:5000'
}; };
export default config; export default config;

View File

@ -6,7 +6,7 @@ import routes from './routes';
const mainLink: PluginMainLink = { const mainLink: PluginMainLink = {
name: 'user', name: 'user',
title: 'User', title: 'loadFromStore("user/displayName")',
link: 'user', link: 'user',
icon: 'mdi-account', icon: 'mdi-account',
children: [ children: [

View File

@ -134,6 +134,9 @@ const getters: GetterTree<UserStateInterface, StateInterface> = {
}, },
loginLoading({ loginLoading }) { loginLoading({ loginLoading }) {
return loginLoading; return loginLoading;
},
displayName({ user }) {
return `${user.firstname} ${user.lastname}`;
} }
}; };