Minor change to mostly test Drone.
This commit is contained in:
@@ -8,7 +8,7 @@ import AuthNav from './components/AuthNav.vue'
|
||||
<div class="title">
|
||||
<h1>
|
||||
<RouterLink to="/">
|
||||
{{ year }} Tracker Expanded
|
||||
Tracker Expanded
|
||||
</RouterLink>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import TheWelcome from '../components/TheWelcome.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<TheWelcome />
|
||||
</main>
|
||||
</template>
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user