From 7295b1b887744d6f788db5b227c9a93cafffdac4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 26 Feb 2019 00:30:54 -0700 Subject: [PATCH 1/3] Update StatusPipeline --- app/Jobs/StatusPipeline/NewStatusPipeline.php | 12 +----------- app/Jobs/StatusPipeline/StatusEntityLexer.php | 10 +++++++++- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/Jobs/StatusPipeline/NewStatusPipeline.php b/app/Jobs/StatusPipeline/NewStatusPipeline.php index 2ba51114d..0b392639b 100644 --- a/app/Jobs/StatusPipeline/NewStatusPipeline.php +++ b/app/Jobs/StatusPipeline/NewStatusPipeline.php @@ -41,16 +41,6 @@ class NewStatusPipeline implements ShouldQueue */ public function handle() { - $status = $this->status; - - StatusEntityLexer::dispatch($status); - - if(config('pixelfed.activitypub_enabled') == true) { - StatusActivityPubDeliver::dispatch($status); - } - - // Cache::forever('post.'.$status->id, $status); - // $redis = Redis::connection(); - // $redis->lpush(config('cache.prefix').':user.'.$status->profile_id.'.posts', $status->id); + StatusEntityLexer::dispatch($this->status); } } diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index 72cd0394c..5fe3cf34a 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -75,7 +75,6 @@ class StatusEntityLexer implements ShouldQueue public function storeEntities() { $this->storeHashtags(); - $this->storeMentions(); DB::transaction(function () { $status = $this->status; $status->rendered = nl2br($this->autolink); @@ -100,6 +99,7 @@ class StatusEntityLexer implements ShouldQueue ); }); } + $this->storeMentions(); } public function storeMentions() @@ -123,5 +123,13 @@ class StatusEntityLexer implements ShouldQueue MentionPipeline::dispatch($status, $m); }); } + $this->deliver(); + } + + public function deliver() + { + if(config('pixelfed.activitypub_enabled') == true) { + StatusActivityPubDeliver::dispatch($this->status); + } } } From 898e411327e492eb1de7cd5e555c1e360484e336 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 26 Feb 2019 00:46:33 -0700 Subject: [PATCH 2/3] Add dark mode --- resources/assets/js/components/Timeline.vue | 22 ++++++++------------- resources/views/layouts/anon.blade.php | 2 +- resources/views/layouts/app.blade.php | 2 +- resources/views/layouts/blank.blade.php | 2 +- resources/views/layouts/bundle.blade.php | 2 +- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index a518ce327..0d60705be 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -204,10 +204,6 @@ @@ -215,6 +211,12 @@ +
+

BETA FEATURES

+
+ + +
@@ -793,23 +795,15 @@ // todo: more graceful stylesheet change if(this.modes.dark == true) { this.modes.dark = false; - $('link[rel=stylesheet]').remove(); - let head = document.head; - let link = document.createElement("link"); - link.type = "text/css"; - link.rel = "stylesheet"; - link.href = "/css/app.css"; - head.appendChild(link); + $('link[data-stylesheet=dark]').remove(); } else { this.modes.dark = true; - $('link[rel=stylesheet]').remove(); let head = document.head; let link = document.createElement("link"); - link.id = "darkModeSheet"; link.type = "text/css"; link.rel = "stylesheet"; link.href = "/css/appdark.css"; - + link.setAttribute('data-stylesheet','dark'); head.appendChild(link); } window.ls.set('pixelfed-classicui-settings', this.modes); diff --git a/resources/views/layouts/anon.blade.php b/resources/views/layouts/anon.blade.php index 737b6fc17..a97bd5da4 100644 --- a/resources/views/layouts/anon.blade.php +++ b/resources/views/layouts/anon.blade.php @@ -25,7 +25,7 @@ - + @stack('styles') diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index dfbe77a56..6f7c571f7 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -23,7 +23,7 @@ - + @stack('styles') diff --git a/resources/views/layouts/blank.blade.php b/resources/views/layouts/blank.blade.php index c7969dfe0..089d8a261 100644 --- a/resources/views/layouts/blank.blade.php +++ b/resources/views/layouts/blank.blade.php @@ -22,7 +22,7 @@ - + @stack('styles') diff --git a/resources/views/layouts/bundle.blade.php b/resources/views/layouts/bundle.blade.php index 99775f597..e212cf2a2 100644 --- a/resources/views/layouts/bundle.blade.php +++ b/resources/views/layouts/bundle.blade.php @@ -23,7 +23,7 @@ - + @stack('styles') From e55b9b4974f1b52b50e8168563fedff103089bbd Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 26 Feb 2019 00:47:07 -0700 Subject: [PATCH 3/3] Update compiled assets --- public/js/timeline.js | Bin 34539 -> 35244 bytes public/mix-manifest.json | Bin 641 -> 641 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/timeline.js b/public/js/timeline.js index 5e409d7fdacacb04bd4004efc1b9cd8d3e6b6b55..358ac25adfe2d1003cd1883c77ccf302d962a5c9 100644 GIT binary patch delta 513 zcmaFe%d}=P(}s!6Y)S@^A>m4s-xY^*SejXwm>4G|PxdW|LU7iXxFI-yOH?;cWd5l+ zxm#D-A|?eHYKqrJ61_kuP8M)zbsWl(>gV$IJLSYBePg9H$Nq{ zSP!JYR?%Sc0p0A$fAqMlQuT^cOB_o|iZYW*OHwtI&logAXy!jhMsazK`zY_98y!j3TAUzd{ry2Y3rk?oa3Bb8-!F zRB&^33<(W#4OW`m5TG(yE-FlRri(Z1#+`5<^5ncX2$6Qle|f)u+5o3=j7NbAzTPjlu?wLW~&5JpbvBx$P9=xi&31JsaZSup|0&@W`h=% zi0rEJ&D{n*x|# E0F+CLzyJUM diff --git a/public/mix-manifest.json b/public/mix-manifest.json index c5c0513a2a4fa6701a4c705981aacf78525d52cc..67b084cc68d9a9ae87951aba5a6270a879a57c75 100644 GIT binary patch delta 32 ncmZo?lxUcgmTX~Wk(iQ_YM89VRm%kcp=1eg