Small fixes with user table

This commit is contained in:
aldrin 2021-04-16 11:31:11 +02:00
parent fbb4e4502e
commit 907a51b44b
4 changed files with 5 additions and 4 deletions

View file

@ -25,7 +25,7 @@ async function request(
init.headers.set("X-CSRFToken", csrfToken);
}
if (authToken != undefined) {
init.headers.set("Authentication", authToken);
init.headers.set("Authorization", `Token ${authToken}`);
}
init.headers.set("Accept", "application/json");
init.headers.set("Content-Type", "application/json");

View file

@ -1,8 +1,8 @@
<template>
<div>
<div style="display: flex">
<b-input v-if="isEditing" v-model="editorValue" />
<span v-else>{{ value }}</span>
<b-button @click="toggleEditor">{{
<b-button @click="toggleEditor" style="margin-left: auto">{{
isEditing ? "Speichern" : "Bearbeiten"
}}</b-button>
</div>

View file

@ -50,6 +50,7 @@ export default class LoginForm extends Vue {
private async doAction() {
if (this.mode === "login") {
await this.user.login();
if (this.$route.name !== "home") this.$router.push({ name: "home" });
} else {
await this.user.signup();
this.$router.push({ name: "login" });

View file

@ -3,7 +3,7 @@
<div class="columns is-centered">
<div
v-if="user.isAuthenticated"
class="column is-3-widescreen is-4-desktop is-5-tablet"
class="column is-5-fullhd is-6-widescreen is-7-desktop is-7-tablet"
>
<UserTable :user="user" />
</div>