mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-27 15:57:04 +03:00
Fix Reloading changes on dark mode switch
This commit is contained in:
parent
46e3b2ceb3
commit
57791c1466
@ -2,23 +2,16 @@
|
|||||||
|
|
||||||
namespace BookStack\App;
|
namespace BookStack\App;
|
||||||
|
|
||||||
use BookStack\Activity\ActivityQueries;
|
|
||||||
use BookStack\Entities\Models\Book;
|
|
||||||
use BookStack\Entities\Models\Page;
|
|
||||||
use BookStack\Entities\Queries\RecentlyViewed;
|
|
||||||
use BookStack\Entities\Queries\TopFavourites;
|
|
||||||
use BookStack\Entities\Repos\BookRepo;
|
|
||||||
use BookStack\Entities\Repos\BookshelfRepo;
|
|
||||||
use BookStack\Entities\Tools\PageContent;
|
|
||||||
use BookStack\Http\Controller;
|
use BookStack\Http\Controller;
|
||||||
use BookStack\Uploads\FaviconHandler;
|
|
||||||
use BookStack\Util\SimpleListOptions;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class PwaManifestBuilder extends Controller
|
class PwaManifestBuilder extends Controller
|
||||||
{
|
{
|
||||||
private function GenerateManifest()
|
private function GenerateManifest()
|
||||||
{
|
{
|
||||||
|
dump(setting()->getForCurrentUser('dark-mode-enabled'));
|
||||||
|
dump(setting('app-color-dark'));
|
||||||
|
dump(setting('app-color'));
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"name" => setting('app-name'),
|
"name" => setting('app-name'),
|
||||||
"short_name" => setting('app-name'),
|
"short_name" => setting('app-name'),
|
||||||
@ -27,7 +20,7 @@ class PwaManifestBuilder extends Controller
|
|||||||
"display" => "standalone",
|
"display" => "standalone",
|
||||||
"background_color" => (setting()->getForCurrentUser('dark-mode-enabled') ? setting('app-color-dark') : setting('app-color')),
|
"background_color" => (setting()->getForCurrentUser('dark-mode-enabled') ? setting('app-color-dark') : setting('app-color')),
|
||||||
"description" => setting('app-name'),
|
"description" => setting('app-name'),
|
||||||
"theme_color" => setting('app-color'),
|
"theme_color" => (setting()->getForCurrentUser('dark-mode-enabled') ? setting('app-color-dark') : setting('app-color')),
|
||||||
"launch_handler" => [
|
"launch_handler" => [
|
||||||
"client_mode" => "focus-existing"
|
"client_mode" => "focus-existing"
|
||||||
],
|
],
|
||||||
@ -59,12 +52,12 @@ class PwaManifestBuilder extends Controller
|
|||||||
"type" => "image/png"
|
"type" => "image/png"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"src" => "icon.ico",
|
"src" => public_path('icon.ico'),
|
||||||
"sizes" => "48x48",
|
"sizes" => "48x48",
|
||||||
"type" => "image/vnd.microsoft.icon"
|
"type" => "image/vnd.microsoft.icon"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"src" => "favicon.ico",
|
"src" => public_path('favicon.ico'),
|
||||||
"sizes" => "48x48",
|
"sizes" => "48x48",
|
||||||
"type" => "image/vnd.microsoft.icon"
|
"type" => "image/vnd.microsoft.icon"
|
||||||
],
|
],
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="token" content="{{ csrf_token() }}">
|
<meta name="token" content="{{ csrf_token() }}">
|
||||||
<meta name="base-url" content="{{ url('/') }}">
|
<meta name="base-url" content="{{ url('/') }}">
|
||||||
<meta name="theme-color" content="{{ setting('app-color') }}"/>
|
<meta name="theme-color" content="{{(setting()->getForCurrentUser('dark-mode-enabled') ? setting('app-color-dark') : setting('app-color'))}}"/>
|
||||||
|
|
||||||
<!-- Social Cards Meta -->
|
<!-- Social Cards Meta -->
|
||||||
<meta property="og:title" content="{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}">
|
<meta property="og:title" content="{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user