mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-13 18:00:05 +00:00
item status toggle buttons
This commit is contained in:
@@ -55,6 +55,9 @@ var vm = new Vue({
|
||||
},
|
||||
'itemSelected': function(newVal, oldVal) {
|
||||
this.itemSelectedDetails = this.itemsById[newVal]
|
||||
if (this.itemSelectedDetails.status == 'unread') {
|
||||
this.itemSelectedDetails.status = 'read'
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -141,5 +144,19 @@ var vm = new Vue({
|
||||
vm.loading.newfeed = false
|
||||
})
|
||||
},
|
||||
toggleItemStarred: function(item) {
|
||||
if (item.status == 'starred') {
|
||||
item.status = 'read'
|
||||
} else if (item.status != 'starred') {
|
||||
item.status = 'starred'
|
||||
}
|
||||
},
|
||||
toggleItemRead: function(item) {
|
||||
if (item.status == 'unread') {
|
||||
item.status = 'read'
|
||||
} else if (item.status == 'read') {
|
||||
item.status = 'unread'
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user