From 91fb7b09bff88ce269f229425fd171830eadff53 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 7 Jun 2023 22:07:26 +0200 Subject: [PATCH] more ui --- app/Http/Controllers/Controller.php | 13 +++++++++++- .../Settings/{Form.php => Configuration.php} | 2 +- resources/views/components/navbar.blade.php | 2 +- .../components/settings/navbar.blade.php | 21 +++++++++++++++++++ .../views/livewire/force-upgrade.blade.php | 2 +- .../views/livewire/server/proxy.blade.php | 13 ++++++------ ...form.blade.php => configuration.blade.php} | 13 ++---------- .../views/livewire/settings/email.blade.php | 2 +- resources/views/settings.blade.php | 10 --------- .../views/settings/configuration.blade.php | 8 +++++++ resources/views/settings/emails.blade.php | 4 ++++ routes/web.php | 3 ++- 12 files changed, 59 insertions(+), 34 deletions(-) rename app/Http/Livewire/Settings/{Form.php => Configuration.php} (99%) create mode 100644 resources/views/components/settings/navbar.blade.php rename resources/views/livewire/settings/{form.blade.php => configuration.blade.php} (81%) delete mode 100644 resources/views/settings.blade.php create mode 100644 resources/views/settings/configuration.blade.php create mode 100644 resources/views/settings/emails.blade.php diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a623fe429..7fafe144c 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -33,7 +33,18 @@ public function settings() { if (auth()->user()->isAdmin()) { $settings = InstanceSettings::get(); - return view('settings', [ + return view('settings.configuration', [ + 'settings' => $settings + ]); + } else { + return redirect()->route('dashboard'); + } + } + public function emails() + { + if (auth()->user()->isAdmin()) { + $settings = InstanceSettings::get(); + return view('settings.emails', [ 'settings' => $settings ]); } else { diff --git a/app/Http/Livewire/Settings/Form.php b/app/Http/Livewire/Settings/Configuration.php similarity index 99% rename from app/Http/Livewire/Settings/Form.php rename to app/Http/Livewire/Settings/Configuration.php index 3d34b4ddc..3405562b2 100644 --- a/app/Http/Livewire/Settings/Form.php +++ b/app/Http/Livewire/Settings/Configuration.php @@ -8,7 +8,7 @@ use Spatie\Url\Url; use Symfony\Component\Yaml\Yaml; -class Form extends Component +class Configuration extends Component { public ModelsInstanceSettings $settings; public $do_not_track; diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index 50f291502..5ea535f24 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -57,7 +57,7 @@ class="{{ request()->is('command-center') ? 'text-warning icon' : 'icon' }}" vie
  • is('settings')) href="/settings" @endif> diff --git a/resources/views/components/settings/navbar.blade.php b/resources/views/components/settings/navbar.blade.php new file mode 100644 index 000000000..fd3d3daba --- /dev/null +++ b/resources/views/components/settings/navbar.blade.php @@ -0,0 +1,21 @@ + diff --git a/resources/views/livewire/force-upgrade.blade.php b/resources/views/livewire/force-upgrade.blade.php index 83fe28b80..dd9818a8c 100644 --- a/resources/views/livewire/force-upgrade.blade.php +++ b/resources/views/livewire/force-upgrade.blade.php @@ -1,6 +1,6 @@
    - Force Upgrade + Force Upgrade Your Instance