antidote display and functionality (#10199)

* update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

update antidote display and functionality - fixes #9758 and #10160

* clean up / refactor

* prevent unpin of all items which don't have a pinType

* remove the double boolean casting / fix lint
This commit is contained in:
negue
2018-03-31 13:39:26 +02:00
committed by Matteo Pagliazzi
parent c21726ec61
commit f3c041a561
7 changed files with 198 additions and 60 deletions

View File

@@ -620,6 +620,11 @@ export default {
}
},
togglePinned (item) {
if (!item.pinType) {
this.error(this.$t('errorTemporaryItem'));
return;
}
try {
if (!this.$store.dispatch('user:togglePinnedItem', {type: item.pinType, path: item.path})) {
this.text(this.$t('unpinnedItem', {item: item.text}));