Add notifications to basic auth. Basic Auth DONE
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user