first commit

This commit is contained in:
2023-02-23 14:06:30 +01:00
commit bf8ae41804
33 changed files with 5820 additions and 0 deletions

38
src/pages/IndexPage.vue Normal file
View File

@@ -0,0 +1,38 @@
<template>
<q-page class="flex flex-center">
<h3>{{ resultList }}</h3>
</q-page>
</template>
<script setup>
import PocketBase from "pocketbase";
import { ref } from "vue";
const resultList = ref("");
const pb = new PocketBase("https://pocketbase.clonbg.es");
const authData = pb
.collection("users")
.authWithPassword("diloma", "dilomadiloma");
// after the above you can also access the auth data from the authStore
console.log(pb.authStore.isValid);
console.log(pb.authStore.token);
console.log(pb.authStore.model.id);
// console.log(authData);
pb.collection("lista")
.getList(1, 50)
.then((result) => {
// success...
console.log("Result:", result);
resultList.value = result;
})
.catch((error) => {
// error...
console.log("Error:", error);
});
// "logout" the last authenticated account
//pb.authStore.clear();
</script>