seepur/resources/scripts/applications/home/views/settings.vue

33 lines
499 B
Vue
Raw Normal View History

2020-02-02 22:42:18 +00:00
<template>
<div class="wrapper">
<h1 class="is-1">Settings {{ user.name }}!!!</h1>
</div>
</template>
<script lang="ts">
let user: {
avatar?: string;
email?: string;
name: string;
isAdmin: boolean;
} = {
name: "LOADING...",
isAdmin: false
};
export default {
name: "Settings",
beforeCreate() {},
async created() {
const response = await fetch("/users/profile/");
this.user = await response.json();
},
data() {
return {
user
};
}
};
</script>