Merge pull request #889 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
fbcf111ed3
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2
public/js/timeline.js
vendored
2
public/js/timeline.js
vendored
File diff suppressed because one or more lines are too long
|
@ -8,5 +8,5 @@
|
|||
"/js/micro.js": "/js/micro.js?id=178479fb6990f8806257",
|
||||
"/js/profile.js": "/js/profile.js?id=488dcd99d616ca9ef8de",
|
||||
"/js/status.js": "/js/status.js?id=096927f9312b1d7bb1b0",
|
||||
"/js/timeline.js": "/js/timeline.js?id=afa68ba1bfc868adde1c"
|
||||
"/js/timeline.js": "/js/timeline.js?id=7a82d4fdc9c5d88394c3"
|
||||
}
|
||||
|
|
|
@ -204,10 +204,6 @@
|
|||
<label class="custom-control-label font-weight-bold" for="mode-mod">Moderator Mode</label>
|
||||
</div>
|
||||
<!-- <div class="custom-control custom-switch mb-3">
|
||||
<input type="checkbox" class="custom-control-input" id="mode-dark" v-on:click="modeDarkToggle()" v-model="modes.dark">
|
||||
<label class="custom-control-label font-weight-bold" for="mode-dark">Dark Mode</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-3">
|
||||
<input type="checkbox" class="custom-control-input" id="mode-notify" v-on:click="modeNotifyToggle()" v-model="!modes.notify">
|
||||
<label class="custom-control-label font-weight-bold" for="mode-notify">Disable Notifications</label>
|
||||
</div> -->
|
||||
|
@ -215,6 +211,12 @@
|
|||
<input type="checkbox" class="custom-control-input" id="mode-infinite" v-on:click="modeInfiniteToggle()" v-model="modes.infinite">
|
||||
<label class="custom-control-label font-weight-bold" for="mode-infinite">Enable Infinite Scroll</label>
|
||||
</div>
|
||||
<hr>
|
||||
<p class="font-weight-bold">BETA FEATURES</p>
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="mode-dark" v-on:click="modeDarkToggle()" v-model="modes.dark">
|
||||
<label class="custom-control-label font-weight-bold" for="mode-dark">Dark Mode</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="canonical" href="{{request()->url()}}">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||
@stack('styles')
|
||||
</head>
|
||||
<body class="">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="canonical" href="{{request()->url()}}">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||
@stack('styles')
|
||||
|
||||
</head>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="canonical" href="{{request()->url()}}">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||
@stack('styles')
|
||||
</head>
|
||||
<body class="">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="canonical" href="{{request()->url()}}">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet" data-stylesheet="light">
|
||||
@stack('styles')
|
||||
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue