This commit is contained in:
BurnLP2013 2024-07-09 11:36:20 +02:00
commit 90e3d3250c
18 changed files with 390 additions and 46 deletions

View file

@ -6,8 +6,7 @@
licenseKey="321z8321789"
startDate="12.12.2020"
endDate="13.12.2021"
amount="1"
tags=""
:amount=1
notes="No notes"
/>
<!-- <ListViewElement

View file

@ -28,5 +28,9 @@
</script>
<style scoped>
.logo {
margin-right: 20%;
margin-left: 10px;
}
</style>

View file

@ -48,7 +48,6 @@
startDate: String,
endDate: String,
amount: Number,
tags: Array,
notes: String,
})

View file

@ -1,24 +0,0 @@
<template>
<div style="display: flex;">
<div style="flex: 30%">
<h1>Start Page</h1>
<p>Welcome to the start page</p>
</div>
<div style="flex: 70%;">
<h1>Start Page</h1>
<p>Welcome to the start page</p>
</div>
</div>
</template>
<script setup lang="ts">
</script>
<style scoped>
</style>

View file

@ -0,0 +1,58 @@
<template>
<v-container>
<v-row justify="center">
<v-col cols="12" sm="8" md="4">
<v-card>
<v-card-title class="text-h5">Login</v-card-title>
<v-card-text>
<v-form>
<v-text-field v-model="email" label="Email" required></v-text-field>
<v-text-field v-model="password" label="Password" type="password" required></v-text-field>
</v-form>
</v-card-text>
<v-card-actions>
<v-btn @click="login" color="primary">Login</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-container>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import axios from 'axios'
import { store } from '@/store';
const email = ref('')
const password = ref('')
async function login() {
try {
const response = await axios.post<string>("http://localhost:8080/api/v1/auth/login", { email: email.value, password: password.value})
if (response.status === 200) {
store.setToken(response.data)
} else {
alert("Invalid Credentials")
}
} catch(err) {
alert("Invalid Credentials")
}
}
/*
setTimeout(() => {
console.log(email.value)
console.log(password.value)
}, 3000);
*/
</script>
<style scoped>
</style>