-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed logout issues - Fixed automatic logout problem after session timeout - Fixed error: TypeError: this.logout is not a function - Fixed error: TypeError: this.sseConnection is undefined
- Loading branch information
Showing
4 changed files
with
195 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,80 @@ | ||
<template> | ||
<div class="user-menu cx-user-menu"> | ||
|
||
<!--USERMENU--> | ||
<v-menu close-on-click close-on-content-click offset-y st> | ||
<template v-slot:activator="{ on }"> | ||
<div class="user-menu-button pl-0 pr-2"> | ||
<v-btn icon v-on="on"> | ||
<v-icon color="white" medium>mdi-shield-account</v-icon> | ||
</v-btn> | ||
</div> | ||
</template> | ||
<v-list> | ||
<v-list-item> | ||
<v-list-item-avatar class=""> | ||
<v-icon>mdi-shield-account</v-icon> | ||
</v-list-item-avatar> | ||
<v-list-item-content> | ||
<v-list-item-title>{{ username }}</v-list-item-title> | ||
<v-list-item-subtitle>{{ organizationName }}</v-list-item-subtitle> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-divider></v-divider> | ||
|
||
<v-list-item @click="settings"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-cog-outline</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title> {{ $t('user_menu.settings') }}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
|
||
<v-list-item @click="logout"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-logout</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title> {{ $t('user_menu.logout') }}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
|
||
<UserSettings/> | ||
|
||
</div> | ||
</template> | ||
|
||
<script> | ||
import UserSettings from "./UserSettings"; | ||
export default { | ||
name: "UserMenu", | ||
components: { | ||
UserSettings | ||
}, | ||
data: () => ({ | ||
darkTheme: false | ||
}), | ||
computed: { | ||
username() { | ||
return this.$store.getters.getUserName | ||
}, | ||
organizationName() { | ||
return this.$store.getters.getOrganizationName | ||
} | ||
}, | ||
methods: { | ||
logout() { | ||
this.$store.dispatch('logout'); | ||
}, | ||
settings() { | ||
this.$root.$emit('show-user-settings'); | ||
}, | ||
darkToggle() { | ||
this.$vuetify.theme.dark = this.darkTheme | ||
} | ||
} | ||
} | ||
<template> | ||
<div class="user-menu cx-user-menu"> | ||
|
||
<!--USERMENU--> | ||
<v-menu close-on-click close-on-content-click offset-y st> | ||
<template v-slot:activator="{ on }"> | ||
<div class="user-menu-button pl-0 pr-2"> | ||
<v-btn icon v-on="on"> | ||
<v-icon color="white" medium>mdi-shield-account</v-icon> | ||
</v-btn> | ||
</div> | ||
</template> | ||
<v-list> | ||
<v-list-item> | ||
<v-list-item-avatar class=""> | ||
<v-icon>mdi-shield-account</v-icon> | ||
</v-list-item-avatar> | ||
<v-list-item-content> | ||
<v-list-item-title>{{ username }}</v-list-item-title> | ||
<v-list-item-subtitle>{{ organizationName }}</v-list-item-subtitle> | ||
</v-list-item-content> | ||
</v-list-item> | ||
<v-divider></v-divider> | ||
|
||
<v-list-item @click="settings"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-cog-outline</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title> {{ $t('user_menu.settings') }}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
|
||
<v-list-item @click="logout"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-logout</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-content> | ||
<v-list-item-title> {{ $t('user_menu.logout') }}</v-list-item-title> | ||
</v-list-item-content> | ||
</v-list-item> | ||
</v-list> | ||
</v-menu> | ||
|
||
<UserSettings/> | ||
|
||
</div> | ||
</template> | ||
|
||
<script> | ||
import AuthMixin from "@/services/auth/auth_mixin"; | ||
import UserSettings from "./UserSettings"; | ||
export default { | ||
name: "UserMenu", | ||
mixins: [AuthMixin], | ||
components: { | ||
UserSettings | ||
}, | ||
data: () => ({ | ||
darkTheme: false | ||
}), | ||
computed: { | ||
username() { | ||
return this.$store.getters.getUserName | ||
}, | ||
organizationName() { | ||
return this.$store.getters.getOrganizationName | ||
} | ||
}, | ||
methods: { | ||
settings() { | ||
this.$root.$emit('show-user-settings'); | ||
}, | ||
darkToggle() { | ||
this.$vuetify.theme.dark = this.darkTheme | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.