Add home page component; fix user state issues

must be sure to keep "anonymous" user represented as {} instead of
null, otherwise getting errors.  this also fixes the menu upon user
login; previously it wasn't showing most options
This commit is contained in:
Lance Edgar 2022-08-26 17:56:31 -05:00
parent 2a1f5764a1
commit 721600b12d
7 changed files with 93 additions and 7 deletions

View file

@ -2,7 +2,7 @@
<section>
<nav class="level is-mobile">
<div v-if="user"
<div v-if="user.uuid"
class="level-item">
<b-dropdown aria-role="menu">
@ -43,7 +43,7 @@
</b-dropdown>
</div>
<div v-if="!user && showLoginButton"
<div v-if="!user.uuid && showLoginButton"
class="level-item">
<b-button type="is-primary"
tag="router-link" to="/login">
@ -137,7 +137,7 @@ export default {
if (this.allowFeedback !== null) {
return this.allowFeedback
}
if (!this.allowAnonymousFeedback && !this.user) {
if (!this.allowAnonymousFeedback && !this.user.uuid) {
return false
}
return true