')
- // .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold')
- // .html(this.config.announcement.message);
- // $('body').prepend(msg);
- // }
- });
+ // if(this.config.announcement.enabled == true) {
+ // let msg = $('
')
+ // .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold')
+ // .html(this.config.announcement.message);
+ // $('body').prepend(msg);
+ // }
},
mounted() {
@@ -604,7 +655,8 @@
if (res.data.length && this.loading == false) {
let data = res.data;
let self = this;
- data.forEach(d => {
+ data.forEach((d, index) => {
+ console.log(index);
if(self.ids.indexOf(d.id) == -1) {
self.feed.push(d);
self.ids.push(d.id);
@@ -669,13 +721,15 @@
if($('body').hasClass('loggedIn') == false) {
return;
}
-
+ let count = status.favourites_count;
+ status.favourited = !status.favourited;
axios.post('/i/like', {
item: status.id
}).then(res => {
status.favourites_count = res.data.count;
- status.favourited = !status.favourited;
}).catch(err => {
+ status.favourited = !status.favourited;
+ status.favourites_count = count;
swal('Error', 'Something went wrong, please try again later.', 'error');
});
},
@@ -1159,7 +1213,97 @@
})
})
+ },
+
+ ctxMenu(status) {
+ this.ctxMenuStatus = status;
+ let payload = '