Skip to content
Snippets Groups Projects
Unverified Commit 3164ae3e authored by Marius Friess's avatar Marius Friess Committed by GitHub
Browse files

Update design when dashboard is empty (#66)

* Change banner if dashboard is empty

* remove import
parent c608b7c7
No related branches found
No related tags found
No related merge requests found
<template> <template>
<div class="row mb-5"> <div class="row mb-5">
<div <div
class="card d-flex align-items-center justify-content-center" class="card d-flex align-items-center justify-content-center py-5"
v-if="store.categories.length === 0" v-if="store.categories.length === 0"
> >
<p class="py-5 m-0"> <i class="fa-regular fa-xl fa-folder-open"></i>
Hier ist noch nichts zu sehen. Erstelle deine erste Kategorie! <h4 class="mt-3">Keine Kategorien vorhanden</h4>
<p class="m-0">
Hier ist noch nichts zu sehen. Erstelle deine erste Kategorie, um zu
starten!
</p> </p>
<button
class="btn btn-primary mt-3"
data-bs-toggle="modal"
data-bs-target="#create-category-modal"
>
<i class="fa fa-plus"></i>
Neue Kategorie anlegen
</button>
</div> </div>
<div <div
...@@ -100,6 +111,7 @@ ...@@ -100,6 +111,7 @@
<EditCategoryModal :category="categoryToEdit" /> <EditCategoryModal :category="categoryToEdit" />
<EditRoomModal :room="roomToEdit" /> <EditRoomModal :room="roomToEdit" />
<CreateCategoryModal />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
...@@ -113,6 +125,7 @@ ...@@ -113,6 +125,7 @@
import EditRoomModal from '@/components/EditRoomModal.vue'; import EditRoomModal from '@/components/EditRoomModal.vue';
import { useChannel } from '@/composables/channel/channel'; import { useChannel } from '@/composables/channel/channel';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import CreateCategoryModal from '@/components/CreateCategoryModal.vue';
const user = useUser(); const user = useUser();
const auth = useAuth(); const auth = useAuth();
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<hr /> <hr />
<div class="row my-5"> <div class="row my-5">
<div class="col"> <div v-if="store.categories && store.categories.length !== 0" class="col">
<button <button
class="btn btn-primary" class="btn btn-primary"
data-bs-toggle="modal" data-bs-toggle="modal"
...@@ -38,8 +38,10 @@ ...@@ -38,8 +38,10 @@
import Rooms from '@/components/Rooms.vue'; import Rooms from '@/components/Rooms.vue';
import { useChannel } from '@/composables/channel/channel'; import { useChannel } from '@/composables/channel/channel';
import { useAuth } from '@/composables/auth'; import { useAuth } from '@/composables/auth';
import { useStore } from '@/composables/store';
const channel = useChannel(); const channel = useChannel();
const auth = useAuth(); const auth = useAuth();
const store = useStore();
channel.connect(); channel.connect();
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment