瀏覽代碼

Update Timeline.vue

Daniel Supernault 6 年之前
父節點
當前提交
ddaafd9678
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      resources/assets/js/components/Timeline.vue

+ 10 - 1
resources/assets/js/components/Timeline.vue

@@ -449,6 +449,13 @@
 				this.config = res.data;
 				this.config = res.data;
 				this.fetchProfile();
 				this.fetchProfile();
 				this.fetchTimelineApi();
 				this.fetchTimelineApi();
+
+				// if(this.config.announcement.enabled == true) {
+				// 	let msg = $('<div>')
+				// 	.addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold')
+				// 	.html(this.config.announcement.message);
+				// 	$('body').prepend(msg);
+				// }
 			});
 			});
 		},
 		},
 
 
@@ -748,7 +755,9 @@
 					type: 'status',
 					type: 'status',
 					item: status.id
 					item: status.id
 				}).then(res => {
 				}).then(res => {
-					this.feed.splice(index,1);
+					this.feed = this.feed.filter(s => {
+						return s.id != status.id;
+					})
 					swal('Success', 'You have successfully deleted this post', 'success');
 					swal('Success', 'You have successfully deleted this post', 'success');
 				}).catch(err => {
 				}).catch(err => {
 					swal('Error', 'Something went wrong. Please try again later.', 'error');
 					swal('Error', 'Something went wrong. Please try again later.', 'error');