Skip to content

Commit

Permalink
improve login layout and cleanup login
Browse files Browse the repository at this point in the history
  • Loading branch information
scammo committed Apr 20, 2024
1 parent 0975a25 commit 355fcde
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions frontend/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
import InputText from "primevue/inputtext";
import Button from "primevue/button";
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";
import { useRouter } from "vue-router";
import { client, setLogin } from "../lib/api";
const router = useRouter();
const route = useRoute();
const loading = ref(false);
const email = ref(import.meta.env.PROD ? "" : "[email protected]");
Expand All @@ -23,12 +22,7 @@ const onSubmit = async () => {
setLogin(response.data.user, response.data.authorization.token)
const response2 = await client.get('tracks', {
password: password.value,
email: email.value
})
router.push('/orga')
console.log(response2)
} catch (error) {
console.error(error)
}
Expand All @@ -42,15 +36,15 @@ const onSubmit = async () => {
<div class="">
<h1>Login</h1>
<form @submit.prevent="onSubmit">
<div class="field">
<label>E-Mail-Adresse</label>
<InputText v-model="email" type="email" required />
<div class="flex flex-column gap-2">
<label for="email">E-Mail-Adresse: </label>
<InputText v-model="email" type="email" required id="email" autofocus="true" />
</div>
<div class="field">
<label>Passwort</label>
<InputText v-model="password" type="password" required />
<div class="flex flex-column gap-2 mt-2">
<label for="password">Passwort</label>
<InputText v-model="password" type="password" required id="password" />
</div>
<Button :disabled="loading" type="submit" label="Login" />
<Button :disabled="loading" type="submit" label="Login" class="mt-3" />
</form>
</div>
</div>
Expand Down

0 comments on commit 355fcde

Please sign in to comment.