From 4c30ad49409d2a56fdeffc0b7f5226651ad480aa Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 2 Aug 2019 02:14:30 -0600 Subject: [PATCH] Update base layouts --- app/Util/Site/Config.php | 47 +++++++++++++++++++++++++ resources/assets/js/app.js | 2 +- resources/views/layouts/anon.blade.php | 2 ++ resources/views/layouts/app.blade.php | 8 +++-- resources/views/layouts/blank.blade.php | 3 ++ resources/views/site/index.blade.php | 1 + resources/views/timeline/home.blade.php | 6 +--- 7 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 app/Util/Site/Config.php diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php new file mode 100644 index 000000000..3e6c5351f --- /dev/null +++ b/app/Util/Site/Config.php @@ -0,0 +1,47 @@ +addMinutes(30), function() { + return [ + 'uploader' => [ + 'max_photo_size' => config('pixelfed.max_photo_size'), + 'max_caption_length' => config('pixelfed.max_caption_length'), + 'album_limit' => config('pixelfed.max_album_length'), + 'image_quality' => config('pixelfed.image_quality'), + + 'optimize_image' => config('pixelfed.optimize_image'), + 'optimize_video' => config('pixelfed.optimize_video'), + + 'media_types' => config('pixelfed.media_types'), + 'enforce_account_limit' => config('pixelfed.enforce_account_limit') + ], + + 'activitypub' => [ + 'enabled' => config('federation.activitypub.enabled'), + 'remote_follow' => config('federation.activitypub.remoteFollow') + ], + + 'ab' => [ + 'lc' => config('exp.lc'), + 'rec' => config('exp.rec'), + 'loops' => config('exp.loops') + ], + + 'site' => [ + 'domain' => config('pixelfed.domain.app'), + 'url' => config('app.url') + ] + ]; + }); + } + + public static function json() { + return json_encode(self::get(), JSON_FORCE_OBJECT); + } +} diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 2f5022e35..b16d71c3b 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -14,7 +14,7 @@ if (token) { console.error('CSRF token not found.'); } -window.App = {}; +window.App = window.App || {}; window.App.boot = function() { new Vue({ el: '#content'}); diff --git a/resources/views/layouts/anon.blade.php b/resources/views/layouts/anon.blade.php index f2e0a7f22..03affd7a9 100644 --- a/resources/views/layouts/anon.blade.php +++ b/resources/views/layouts/anon.blade.php @@ -27,6 +27,8 @@ @stack('styles') + + @include('layouts.partial.noauthnav') diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index d786a970f..947a70011 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1,7 +1,6 @@ - @@ -25,12 +24,17 @@ @if(request()->cookie('dark-mode')) + @else + @endif + @stack('styles') - + + + @include('layouts.partial.nav') diff --git a/resources/views/layouts/blank.blade.php b/resources/views/layouts/blank.blade.php index a7d5a4f62..24f4bd6f3 100644 --- a/resources/views/layouts/blank.blade.php +++ b/resources/views/layouts/blank.blade.php @@ -25,6 +25,9 @@ @stack('styles') + + +
diff --git a/resources/views/site/index.blade.php b/resources/views/site/index.blade.php index 7588468fa..c64f57e12 100644 --- a/resources/views/site/index.blade.php +++ b/resources/views/site/index.blade.php @@ -23,6 +23,7 @@ +
diff --git a/resources/views/timeline/home.blade.php b/resources/views/timeline/home.blade.php index 6c7f129aa..19be8df98 100644 --- a/resources/views/timeline/home.blade.php +++ b/resources/views/timeline/home.blade.php @@ -9,9 +9,5 @@ @push('scripts') - + @endpush \ No newline at end of file