implemented notification component and logic

This commit is contained in:
Sockenklaus
2021-10-21 01:24:46 +02:00
parent 5017be6d42
commit 7e5ab9b445
6 changed files with 129 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
<template lang="pug">
p {{ state }}
//- p {{ state }}
MonthPicker(:selectedMonth="selectedMonth" :selectedYear="selectedYear" @getMonth="selectedMonth = $event" @getYear="selectedYear = $event")

View File

@@ -1,4 +1,7 @@
<template>
<br />
<img src="/src/assets/logo.png">
<form class="m-auto">
<h1 class="h3 mb-3">Bitte einloggen</h1>
@@ -24,22 +27,26 @@
<script setup lang="ts">
import { useUser } from '@/stores/user'
import { onMounted, reactive } from 'vue'
import { useNotifications } from '@/stores/notifications'
import { reactive } from 'vue'
import { storeToRefs } from 'pinia'
import { useRouter } from 'vue-router'
const userStore = useUser()
const noteStore = useNotifications()
const router = useRouter()
const input = reactive({
username: '',
password: ''
})
onMounted(() => {
})
async function onClick() {
userStore.login(input.username, input.password)
if(await userStore.login(input.username, input.password)) {
router.push({name: 'Home'})
}
}