diff --git a/app/Composers/AppComposer.php b/app/Composers/AppComposer.php index 4d9cb199..0d97bd3a 100644 --- a/app/Composers/AppComposer.php +++ b/app/Composers/AppComposer.php @@ -42,8 +42,9 @@ class AppComposer $view->withAppHeader(Config::get('setting.header')); $view->withAppFooter(Config::get('setting.footer')); $view->withAppName(Config::get('setting.app_name')); - $view->withShowSupport($support = Config::get('setting.show_support')); + $view->withShowSupport(Config::get('setting.show_support')); $view->withAutomaticLocalization(Config::get('setting.automatic_localization')); + $view->withEnableExternalDependencies(Config::get('setting.enable_external_dependencies')); $view->withSiteTitle(Config::get('setting.app_name')); $view->withFontSubset(Config::get('langs.'.Config::get('app.locale').'.subset', 'latin')); } diff --git a/config/setting.php b/config/setting.php index 109231b5..9cda36f7 100644 --- a/config/setting.php +++ b/config/setting.php @@ -56,4 +56,15 @@ return [ 'show_support' => true, + /* + |-------------------------------------------------------------------------- + | Enable External Dependencies + |-------------------------------------------------------------------------- + | + | Whether to disable third-party dependencies. + | + */ + + 'enable_external_dependencies' => true, + ]; diff --git a/resources/lang/en/forms.php b/resources/lang/en/forms.php index e706de8a..de0d7fe1 100644 --- a/resources/lang/en/forms.php +++ b/resources/lang/en/forms.php @@ -101,15 +101,16 @@ return [ 'settings' => [ /// Application setup 'app-setup' => [ - 'site-name' => 'Site Name', - 'site-url' => 'Site URL', - 'display-graphs' => 'Display graphs on status page?', - 'about-this-page' => 'About this page', - 'days-of-incidents' => 'How many days of incidents to show?', - 'banner' => 'Banner Image', - 'banner-help' => "It's recommended that you upload files no bigger than 930px wide .", - 'subscribers' => 'Allow people to signup to email notifications?', - 'automatic_localization' => 'Automatically localise your status page to your visitor\'s language?', + 'site-name' => 'Site Name', + 'site-url' => 'Site URL', + 'display-graphs' => 'Display graphs on status page?', + 'about-this-page' => 'About this page', + 'days-of-incidents' => 'How many days of incidents to show?', + 'banner' => 'Banner Image', + 'banner-help' => "It's recommended that you upload files no bigger than 930px wide .", + 'subscribers' => 'Allow people to signup to email notifications?', + 'automatic_localization' => 'Automatically localise your status page to your visitor\'s language?', + 'enable_external_dependencies' => 'Enable Third Party Dependencies (Google Fonts, Trackers, etc...)', ], 'analytics' => [ 'analytics_google' => 'Google Analytics code', diff --git a/resources/views/dashboard/partials/head.blade.php b/resources/views/dashboard/partials/head.blade.php index 87474024..57697742 100644 --- a/resources/views/dashboard/partials/head.blade.php +++ b/resources/views/dashboard/partials/head.blade.php @@ -20,7 +20,9 @@ {{ $page_title or $site_title }} + @if($enable_external_dependencies) + @endif @yield('css') diff --git a/resources/views/dashboard/settings/app-setup.blade.php b/resources/views/dashboard/settings/app-setup.blade.php index a301f520..3cb62d60 100644 --- a/resources/views/dashboard/settings/app-setup.blade.php +++ b/resources/views/dashboard/settings/app-setup.blade.php @@ -84,6 +84,17 @@ +
+
+
+ +
+
+
diff --git a/resources/views/layout/master.blade.php b/resources/views/layout/master.blade.php index 1f9d055d..6da5f9d5 100644 --- a/resources/views/layout/master.blade.php +++ b/resources/views/layout/master.blade.php @@ -46,7 +46,9 @@ {{ $site_title }} + @if($enable_external_dependencies) + @endif @include('partials.stylesheet') diff --git a/resources/views/partials/analytics.blade.php b/resources/views/partials/analytics.blade.php index f68c74a0..5287c3e4 100644 --- a/resources/views/partials/analytics.blade.php +++ b/resources/views/partials/analytics.blade.php @@ -1,3 +1,4 @@ +@if($enable_external_dependencies) @if($app_analytics) @endif @if($app_analytics_piwik_url) - @endif +@endif diff --git a/resources/views/partials/crowdin.blade.php b/resources/views/partials/crowdin.blade.php index e55c2b2d..18d4944b 100644 --- a/resources/views/partials/crowdin.blade.php +++ b/resources/views/partials/crowdin.blade.php @@ -1,4 +1,4 @@ -@if($app_locale === 'en-UD') +@if($app_locale === 'en-UD' && $enable_external_dependencies)