From c1853ca8c2d129fcc9877323950ce29c028ab70b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 21 Jun 2020 00:56:06 -0600 Subject: [PATCH] Update Timeline component, add grid mode --- resources/assets/js/components/Timeline.vue | 35 +++++++++++++++++++-- resources/views/timeline/local.blade.php | 4 +++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index f4c2cb5a6..6f7e5f274 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -6,8 +6,19 @@

+
+
+

  {{scope == 'local' ? 'Public' : 'Home'}} Timeline

+

+   Feed +   |   +   Grid +

+
+
+
-
+
@@ -330,6 +341,17 @@
+
+
+

  {{scope == 'local' ? 'Public' : 'Home'}} Timeline

+

+   Feed +   |   +   Grid +

+
+
+
@@ -1557,7 +1579,16 @@ this.feed.unshift(...data); this.morePostsAvailable = false; this.mpData = null; - } + }, + + switchFeedLayout(toggle) { + this.loading = true; + this.layout = toggle; + let self = this; + setTimeout(function() { + self.loading = false; + }, 500); + }, }, beforeDestroy () { clearInterval(this.mpInterval); diff --git a/resources/views/timeline/local.blade.php b/resources/views/timeline/local.blade.php index 47d8572e9..ddc4ef8b5 100644 --- a/resources/views/timeline/local.blade.php +++ b/resources/views/timeline/local.blade.php @@ -8,7 +8,11 @@
+@if(request()->has('l') && request()->input('l') == 'grid') + +@else +@endif