release v2.0.0 #4

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

View File

@ -5,25 +5,22 @@
class="fit row justify-around items-start q-col-gutter-sm" class="fit row justify-around items-start q-col-gutter-sm"
> >
<div v-for="(item, index) in widgets" :key="index" class="col-4 full-height col-sm-6 col-xs-12"> <div v-for="(item, index) in widgets" :key="index" class="col-4 full-height col-sm-6 col-xs-12">
<component :is="item" /> <component :is="item.widget" />
</div> </div>
</q-page> </q-page>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, defineComponent, onMounted, inject, markRaw } from 'vue'; import { computed, defineComponent, inject } from 'vue';
import { hasPermissions } from 'src/utils/permission'; import { hasPermissions } from 'src/utils/permission';
import { FG_Plugin } from 'src/plugins'; import { FG_Plugin } from 'src/plugins';
export default defineComponent({ export default defineComponent({
name: 'Dashboard', name: 'Dashboard',
setup() { setup() {
const widgets = markRaw<Array<Component>>([]);
const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist'); const flaschengeist = inject<FG_Plugin.Flaschengeist>('flaschengeist');
const widgets = computed(() => {
onMounted(() => { return flaschengeist?.widgets.filter((widget) => hasPermissions(widget.permissions));
flaschengeist?.widgets.forEach((widget) => {
if (hasPermissions(widget.permissions)) widgets.push(widget.widget);
});
}); });
return { return {