Small fixes with user table
This commit is contained in:
parent
fbb4e4502e
commit
907a51b44b
4 changed files with 5 additions and 4 deletions
|
@ -25,7 +25,7 @@ async function request(
|
||||||
init.headers.set("X-CSRFToken", csrfToken);
|
init.headers.set("X-CSRFToken", csrfToken);
|
||||||
}
|
}
|
||||||
if (authToken != undefined) {
|
if (authToken != undefined) {
|
||||||
init.headers.set("Authentication", authToken);
|
init.headers.set("Authorization", `Token ${authToken}`);
|
||||||
}
|
}
|
||||||
init.headers.set("Accept", "application/json");
|
init.headers.set("Accept", "application/json");
|
||||||
init.headers.set("Content-Type", "application/json");
|
init.headers.set("Content-Type", "application/json");
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div style="display: flex">
|
||||||
<b-input v-if="isEditing" v-model="editorValue" />
|
<b-input v-if="isEditing" v-model="editorValue" />
|
||||||
<span v-else>{{ value }}</span>
|
<span v-else>{{ value }}</span>
|
||||||
<b-button @click="toggleEditor">{{
|
<b-button @click="toggleEditor" style="margin-left: auto">{{
|
||||||
isEditing ? "Speichern" : "Bearbeiten"
|
isEditing ? "Speichern" : "Bearbeiten"
|
||||||
}}</b-button>
|
}}</b-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -50,6 +50,7 @@ export default class LoginForm extends Vue {
|
||||||
private async doAction() {
|
private async doAction() {
|
||||||
if (this.mode === "login") {
|
if (this.mode === "login") {
|
||||||
await this.user.login();
|
await this.user.login();
|
||||||
|
if (this.$route.name !== "home") this.$router.push({ name: "home" });
|
||||||
} else {
|
} else {
|
||||||
await this.user.signup();
|
await this.user.signup();
|
||||||
this.$router.push({ name: "login" });
|
this.$router.push({ name: "login" });
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="columns is-centered">
|
<div class="columns is-centered">
|
||||||
<div
|
<div
|
||||||
v-if="user.isAuthenticated"
|
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" />
|
<UserTable :user="user" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue