feat: Multi-user system with PostgreSQL - WIP temporary save
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
</span>
|
||||
<template v-slot:overlay>
|
||||
<a-menu class="ant-pro-drop-down menu" :selected-keys="[]">
|
||||
<a-menu-item key="profile" @click="handleProfile">
|
||||
<a-icon type="user" />
|
||||
{{ $t('menu.profile') || 'My Profile' }}
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="logout" @click="handleLogout">
|
||||
<a-icon type="logout" />
|
||||
{{ $t('menu.account.logout') }}
|
||||
@@ -34,6 +39,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleProfile () {
|
||||
this.$router.push({ name: 'Profile' })
|
||||
},
|
||||
handleLogout (e) {
|
||||
Modal.confirm({
|
||||
title: this.$t('layouts.usermenu.dialog.title'),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :class="wrpCls">
|
||||
<!-- User avatar/name removed for local OSS build -->
|
||||
<avatar-dropdown :menu="true" :current-user="currentUser" :class="prefixCls" />
|
||||
<notice-icon :class="prefixCls" />
|
||||
<select-lang :class="prefixCls" />
|
||||
<a-tooltip :title="$t('app.setting.tooltip')">
|
||||
@@ -12,12 +12,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AvatarDropdown from './AvatarDropdown'
|
||||
import SelectLang from '@/components/SelectLang'
|
||||
import NoticeIcon from '@/components/NoticeIcon'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'RightContent',
|
||||
components: {
|
||||
AvatarDropdown,
|
||||
SelectLang,
|
||||
NoticeIcon
|
||||
},
|
||||
@@ -51,6 +54,13 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['nickname', 'avatar']),
|
||||
currentUser () {
|
||||
return {
|
||||
name: this.nickname,
|
||||
avatar: this.avatar
|
||||
}
|
||||
},
|
||||
wrpCls () {
|
||||
return {
|
||||
'ant-pro-global-header-index-right': true,
|
||||
|
||||
Reference in New Issue
Block a user