Tweaked display of note cards, again

* Added an option to pin notes, on the main screen
This commit is contained in:
Max G
2020-03-02 05:33:49 +00:00
parent 984ac6ccff
commit 98f4695739
6 changed files with 96 additions and 12 deletions

View File

@@ -198,7 +198,7 @@
<div class="menu-section" v-if="loggedIn" data-tooltip="Click to log out" data-inverted="" data-position="right center">
<div v-if="loggedIn" v-on:click="destroyLoginToken" class="menu-item menu-button">
<i class="user outline icon"></i>{{ucWords($store.getters.getUsername)}}
<i v-if="userIcon" class="user outline icon"></i>{{ usernameDisplay }}
</div>
</div>
@@ -225,6 +225,7 @@
mobile: false,
disableNewNote: false,
menuOpen: true,
userIcon: true,
}
},
beforeCreate: function(){
@@ -246,7 +247,19 @@
loggedIn () {
//Map logged in from state
return this.$store.getters.getLoggedIn
}
},
usernameDisplay() {
//Remove Emails from username, limit length to 16 chars
let name = this.$store.getters.getUsername
let splitName = name.split('@')
if(splitName.length > 1){
name = splitName.shift()
this.userIcon = false
}
return this.ucWords(name.substring(0, 16))
},
},
methods: {
menuClicked(){