Minor change to mostly test Drone.

This commit is contained in:
2023-05-15 15:17:49 -04:00
parent f36bd0423f
commit d2fa100a89
6 changed files with 65 additions and 55 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import AuthNav from './components/AuthNav.vue'
<div class="title">
<h1>
<RouterLink to="/">
{{ year }} Tracker Expanded
Tracker Expanded
</RouterLink>
</h1>
</div>
-9
View File
@@ -1,9 +0,0 @@
<script setup lang="ts">
import TheWelcome from '../components/TheWelcome.vue'
</script>
<template>
<main>
<TheWelcome />
</main>
</template>
+8 -3
View File
@@ -244,6 +244,7 @@ const ExampleComponent = defineComponent({
}
},
subscribe(){
console.log("Subscribing to realtime.");
appwrite.subscribe((payload) => {
var event = payload.events.filter((e) =>
e.match(/databases\.\*\.collections\.\*\.documents\.\*\.\w+/)
@@ -251,19 +252,23 @@ const ExampleComponent = defineComponent({
switch (event) {
case 'create':
this.entries.push(payload.payload)
this.entries = this.entries
this.entries = this.entries;
this.updateTable();
break
case 'update':
console.log("Updating");
this.entries = this.entries.map((day) => {
if (day.$id === payload.payload.$id) {
return payload.payload
} else {
return day
}
})
});
this.updateTable();
break
case 'delete':
this.entries = this.entries.filter((day) => day.$id !== payload.payload.$id)
this.entries = this.entries.filter((day) => day.$id !== payload.payload.$id);
this.updateTable();
break
}
})