Add account menu

This commit is contained in:
Dominik Korsa 2021-02-12 14:00:00 +01:00
parent b0c0a7202d
commit d70905e8c5
No known key found for this signature in database
GPG key ID: 546F986F71A6FE6E
4 changed files with 74 additions and 25847 deletions

6195
backend/package-lock.json generated

File diff suppressed because it is too large Load diff

19683
website/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -9,13 +9,38 @@
<v-app-bar app color="primary" dark>
<v-app-bar-title>Developer</v-app-bar-title>
<v-spacer />
<v-app-bar-title>
{{ loginState.name }} | {{ loginState.login }}
</v-app-bar-title>
<v-btn icon>
<v-img :src="loginState.avatarUrl" :width="48" />
</v-btn>
<v-btn outlined href="/api/website/developer/sign-out">Sign out</v-btn>
<v-menu offset-y nudge-bottom="12" min-width="350">
<template #activator="{ on }">
<v-btn icon v-on="on">
<v-avatar>
<v-img :src="loginState.avatarUrl" :width="48" />
</v-avatar>
</v-btn>
</template>
<v-card outlined>
<v-card-title v-if="loginState.name" class="d-block">
{{ loginState.name }}
<span class="text--secondary">
({{ loginState.login }})
</span>
</v-card-title>
<v-card-title v-else>
{{ loginState.login }}
</v-card-title>
<v-card-subtitle>Developer account</v-card-subtitle>
<v-divider />
<v-card-actions>
<v-btn
block
color="primary"
outlined
href="/api/website/developer/sign-out"
>
Sign out
</v-btn>
</v-card-actions>
</v-card>
</v-menu>
</v-app-bar>
<router-view />
</v-app>

View file

@ -9,6 +9,10 @@ const routes: Array<RouteConfig> = [
name: 'Home',
component: () => import(/* webpackChunkName: "developer-home" */ './views/home.vue'),
},
{
path: '*',
redirect: '/',
},
];
const router = new VueRouter({