Add notifications to basic auth. Basic Auth DONE

This commit is contained in:
2023-11-07 08:21:47 -05:00
parent 4a43b5813d
commit b14646bfb1
3 changed files with 32 additions and 23 deletions

View File

@@ -41,6 +41,7 @@ import { account } from 'boot/appwrite';
import type { Models } from 'appwrite';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { useQuasar } from 'quasar';
const linksList = [
{
@@ -51,6 +52,7 @@ const linksList = [
},
];
const q = useQuasar();
const leftDrawerOpen = ref(false);
const loggedInUser = ref<Models.User<Models.Preferences> | null>();
@@ -63,6 +65,13 @@ account.get().then((result) => {
async function logout() {
await account.deleteSession('current');
q.notify({
message: 'Logged out!',
type: 'warning',
position: 'top',
timeout: 2000,
group: false,
});
router.push({ name: 'login' });
}