diff --git a/template/index.html b/template/index.html index 8304933..f45f434 100644 --- a/template/index.html +++ b/template/index.html @@ -89,7 +89,18 @@
-
+
+
+ + +
+
diff --git a/template/static/images/star-full.svg b/template/static/images/star-full.svg new file mode 100644 index 0000000..eeed68d --- /dev/null +++ b/template/static/images/star-full.svg @@ -0,0 +1 @@ + diff --git a/template/static/javascripts/app.js b/template/static/javascripts/app.js index bf569ed..cd566f6 100644 --- a/template/static/javascripts/app.js +++ b/template/static/javascripts/app.js @@ -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' + } + }, } })