diff --git a/app/Bus/Commands/User/InviteUserCommand.php b/app/Bus/Commands/User/InviteUserCommand.php index 2585f095..49f16d9a 100644 --- a/app/Bus/Commands/User/InviteUserCommand.php +++ b/app/Bus/Commands/User/InviteUserCommand.php @@ -31,7 +31,7 @@ final class InviteUserCommand * @var string[] */ public $rules = [ - 'emails' => 'required|array|email', + 'emails.*' => 'required|email', ]; /** diff --git a/app/Composers/AppComposer.php b/app/Composers/AppComposer.php index c656c692..5776e456 100644 --- a/app/Composers/AppComposer.php +++ b/app/Composers/AppComposer.php @@ -81,6 +81,7 @@ class AppComposer $view->withAutomaticLocalization($this->config->get('setting.automatic_localization')); $view->withEnableExternalDependencies($this->config->get('setting.enable_external_dependencies')); $view->withShowTimezone($this->config->get('setting.show_timezone')); + $view->withAppRefreshRate($this->config->get('setting.app_refresh_rate')); $view->withTimezone($this->dates->getTimezone()); $view->withSiteTitle($this->config->get('setting.app_name')); $view->withFontSubset($this->config->get('langs.'.$this->config->get('app.locale').'.subset', 'latin')); diff --git a/app/Console/Commands/DemoSeederCommand.php b/app/Console/Commands/DemoSeederCommand.php index ecddf574..f71847d1 100644 --- a/app/Console/Commands/DemoSeederCommand.php +++ b/app/Console/Commands/DemoSeederCommand.php @@ -393,6 +393,9 @@ EINCIDENT; ], [ 'key' => 'app_incident_days', 'value' => '7', + ], [ + 'key' => 'app_refresh_rate', + 'value' => '0', ], [ 'key' => 'app_analytics', 'value' => 'UA-58442674-3', diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index fdcd9fe3..53bed099 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -106,6 +106,13 @@ $factory->define(Setting::class, function ($faker) { ]; }); +$factory->define(Setting::class, function ($faker) { + return [ + 'name' => 'app_refresh_rate', + 'value' => '0', + ]; +}); + $factory->define(Subscriber::class, function ($faker) { return [ 'email' => $faker->safeEmail, diff --git a/resources/lang/en-US/forms.php b/resources/lang/en-US/forms.php index f8866be1..4c6b56db 100644 --- a/resources/lang/en-US/forms.php +++ b/resources/lang/en-US/forms.php @@ -151,6 +151,7 @@ return [ 'display-graphs' => 'Display graphs on status page?', 'about-this-page' => 'About this page', 'days-of-incidents' => 'How many days of incidents to show?', + 'time_before_refresh' => 'Status page refresh rate (in seconds).', '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?', diff --git a/resources/lang/en/dashboard.php b/resources/lang/en/dashboard.php index 93c731f7..2d452d09 100644 --- a/resources/lang/en/dashboard.php +++ b/resources/lang/en/dashboard.php @@ -147,14 +147,15 @@ return [ ], // Subscribers 'subscribers' => [ - 'subscribers' => 'Subscribers', - 'description' => 'Subscribers will receive email updates when incidents are created or components are updated.', - 'verified' => 'Verified', - 'not_verified' => 'Not verified', - 'subscriber' => ':email, subscribed :date', - 'no_subscriptions' => 'Subscribed to all updates', - 'global' => 'Globally subscribed', - 'add' => [ + 'subscribers' => 'Subscribers', + 'description' => 'Subscribers will receive email updates when incidents are created or components are updated.', + 'description_disabled' => 'To use this feature, you need allow people to signup for notifications.', + 'verified' => 'Verified', + 'not_verified' => 'Not verified', + 'subscriber' => ':email, subscribed :date', + 'no_subscriptions' => 'Subscribed to all updates', + 'global' => 'Globally subscribed', + 'add' => [ 'title' => 'Add a new subscriber', 'success' => 'Subscriber has been added!', 'failure' => 'Something went wrong adding the subscriber, please try again.', diff --git a/resources/lang/en/forms.php b/resources/lang/en/forms.php index eb8cf3e1..c800d80f 100644 --- a/resources/lang/en/forms.php +++ b/resources/lang/en/forms.php @@ -151,6 +151,7 @@ return [ 'display-graphs' => 'Display graphs on status page?', 'about-this-page' => 'About this page', 'days-of-incidents' => 'How many days of incidents to show?', + 'time_before_refresh' => 'Status page refresh rate (in seconds).', '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?', diff --git a/resources/views/dashboard/settings/app-setup.blade.php b/resources/views/dashboard/settings/app-setup.blade.php index 7facb215..62cc0660 100644 --- a/resources/views/dashboard/settings/app-setup.blade.php +++ b/resources/views/dashboard/settings/app-setup.blade.php @@ -49,6 +49,14 @@ +
+
+
+ + +
+
+
diff --git a/resources/views/dashboard/subscribers/index.blade.php b/resources/views/dashboard/subscribers/index.blade.php index bed638e3..9e8650a4 100644 --- a/resources/views/dashboard/subscribers/index.blade.php +++ b/resources/views/dashboard/subscribers/index.blade.php @@ -18,7 +18,13 @@
-

{{ trans('dashboard.subscribers.description') }}

+

+ @if($enable_subscribers) + {{ trans('dashboard.subscribers.description') }} + @else + {{ trans('dashboard.subscribers.description_disabled') }} + @endif +

@foreach($subscribers as $subscriber) diff --git a/resources/views/dashboard/team/invite.blade.php b/resources/views/dashboard/team/invite.blade.php index 043b44d7..202889d9 100644 --- a/resources/views/dashboard/team/invite.blade.php +++ b/resources/views/dashboard/team/invite.blade.php @@ -18,19 +18,19 @@
- +
- +
- +
- +
- +
diff --git a/resources/views/layout/master.blade.php b/resources/views/layout/master.blade.php index dc056cb2..f9f6a40e 100644 --- a/resources/views/layout/master.blade.php +++ b/resources/views/layout/master.blade.php @@ -63,6 +63,17 @@ diff --git a/resources/views/setup/index.blade.php b/resources/views/setup/index.blade.php index b9dda91c..9957e202 100644 --- a/resources/views/setup/index.blade.php +++ b/resources/views/setup/index.blade.php @@ -212,6 +212,7 @@
+ {{ trans('pagination.previous') }}