diff --git a/src/components/ChatCardComponent.vue b/src/components/ChatCardComponent.vue
index b677429..ae8a182 100644
--- a/src/components/ChatCardComponent.vue
+++ b/src/components/ChatCardComponent.vue
@@ -1,5 +1,4 @@
\ No newline at end of file
diff --git a/src/components/CreateChatComponent.vue b/src/components/CreateChatComponent.vue
index 1e02fba..283968d 100644
--- a/src/components/CreateChatComponent.vue
+++ b/src/components/CreateChatComponent.vue
@@ -11,7 +11,7 @@
{{ user.firstName }} {{ user.lastName }}
@@ -67,7 +67,8 @@
import { computed, ref } from 'vue';
import ProfileCardComponent from './ProfileCardComponent.vue';
import { useUserStore } from 'src/stores/user-store';
- import type { ptpUser } from 'src/models';
+ import type { ptpUser, responseModel } from 'src/models';
+ import {sendNotification} from 'src/utils';
import { useQuasar } from 'quasar';
import { useChatStore } from 'src/stores/chat-store';
@@ -79,8 +80,6 @@ import { useChatStore } from 'src/stores/chat-store';
const searchResults = ref([] as ptpUser[]);
- const $q = useQuasar();
-
const emit = defineEmits(['update:showDialog', 'showModal']);
const props = defineProps({
showDialog: Boolean,
@@ -117,36 +116,16 @@ import { useChatStore } from 'src/stores/chat-store';
let errorOccured = false;
if(usersForChat.value.length == 0) {
- $q.notify({
- message: 'Du hast keine Mitglieder ausgewählt',
- position: 'top',
- timeout: 2000,
- color: "red",
- icon: 'warning'
- });
+ sendNotification("Du hast keine Mitglieder ausgewählt", false);
errorOccured = true;
}
if(chatName.value == "") {
- $q.notify({
- message: 'Du hast keinen Namen festgelegt',
- position: 'top',
- timeout: 2000,
- color: "red",
- icon: 'warning'
- });
+ sendNotification("Du hast keinen Namen festgelegt", false);
errorOccured = true;
}
if(!errorOccured) {
- $q.notify({
- message: 'Der Chat "'+chatName.value+'" wurde erstellt',
- position: 'top',
- timeout: 2000,
- color: "green",
- type: "positive"
- });
-
setupChat(chatName.value);
closeDialog();
chatName.value = "";
@@ -157,8 +136,11 @@ import { useChatStore } from 'src/stores/chat-store';
const chatStore = useChatStore();
const setupChat = async(chatName: string)=>{
- await chatStore.createChat(chatName, usersForChat.value.map((user) => user.id));
- reloadChats();
+ chatStore.createChat(chatName, usersForChat.value.map((user) => user.id), userStore.user!.id).then((response : responseModel) => {
+ sendNotification(response.message, response.success);
+ reloadChats();
+ });
+
}
const reloadChats = async() => {
diff --git a/src/components/EssentialLink.vue b/src/components/EssentialLink.vue
deleted file mode 100644
index 0075b5c..0000000
--- a/src/components/EssentialLink.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
- {{ title }}
- {{ caption }}
-
-
-
-
-
diff --git a/src/components/ExampleComponent.vue b/src/components/ExampleComponent.vue
deleted file mode 100644
index 6fd2d2a..0000000
--- a/src/components/ExampleComponent.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
{{ title }}
-
- -
- {{ todo.id }} - {{ todo.content }}
-
-
-
Count: {{ todoCount }} / {{ meta.totalCount }}
-
Active: {{ active ? 'yes' : 'no' }}
-
Clicks on todos: {{ clickCount }}
-
-
-
-
diff --git a/src/components/MessageComponent.vue b/src/components/MessageComponent.vue
index 81d3314..205c204 100644
--- a/src/components/MessageComponent.vue
+++ b/src/components/MessageComponent.vue
@@ -1,21 +1,26 @@
+
+
{{ props.sender!.firstName }} {{ props.sender!.lastName }}
+
@{{ props.sender!.username }}
+
{{props.message}}
{{props.url}}
diff --git a/src/components/ProfileCardComponent.vue b/src/components/ProfileCardComponent.vue
index 26e5b73..e05cba1 100644
--- a/src/components/ProfileCardComponent.vue
+++ b/src/components/ProfileCardComponent.vue
@@ -1,23 +1,24 @@
-
+
{{props.user!.firstName}} {{ props.user!.lastName }}
- @{{props.user!.username}}
+ @{{props.user!.username}}
-
{{ props.user!.status }}
+
{{ props.user!.status }}
+
Hier steht die letzte Nachricht
diff --git a/src/components/SettingsPopUp.vue b/src/components/SettingsPopUp.vue
index edea8b5..ae8bf02 100644
--- a/src/components/SettingsPopUp.vue
+++ b/src/components/SettingsPopUp.vue
@@ -1,4 +1,16 @@
+
+
+
+ Account löschen
+ Bist du sicher, dass du deinen Account löschen möchtest?
+
+
+
+
+
+
+
@@ -40,7 +52,7 @@
Aktionen
-
+
@@ -79,8 +91,9 @@