From d3967b37cdcdeaa26db0f0fbf37d3da961e4152c Mon Sep 17 00:00:00 2001 From: spencerrlongg Date: Tue, 5 Dec 2023 14:52:14 -0600 Subject: [PATCH] this is a start, buttons not working? --- app/Http/Livewire/OauthClients.php | 39 +++ .../views/livewire/oauth-clients.blade.php | 250 ++++++++++++++++++ resources/views/settings/api.blade.php | 1 + 3 files changed, 290 insertions(+) create mode 100644 app/Http/Livewire/OauthClients.php create mode 100644 resources/views/livewire/oauth-clients.blade.php diff --git a/app/Http/Livewire/OauthClients.php b/app/Http/Livewire/OauthClients.php new file mode 100644 index 0000000000..8e23f6335c --- /dev/null +++ b/app/Http/Livewire/OauthClients.php @@ -0,0 +1,39 @@ + app(ClientRepository::class)->activeForUser(auth()->user()->id), + ]); + } + + public function rules(): array + { + return [ + 'name' => 'required|string|max:255', + 'redirect' => 'required|url|max:255', + ]; + } + + public function createClient(): void + { + $this->validate(); + + //$newClient = ; + + $this->dispatchBrowserEvent('clientCreated', $newClient->accessToken); + } + + public function deleteClient($clientId): void + { + Auth::user()->clients()->find($clientId)->delete(); + } +} diff --git a/resources/views/livewire/oauth-clients.blade.php b/resources/views/livewire/oauth-clients.blade.php new file mode 100644 index 0000000000..8f6c45cb8d --- /dev/null +++ b/resources/views/livewire/oauth-clients.blade.php @@ -0,0 +1,250 @@ + + + \ No newline at end of file diff --git a/resources/views/settings/api.blade.php b/resources/views/settings/api.blade.php index 5db4e1e7dc..3c36c6a18f 100644 --- a/resources/views/settings/api.blade.php +++ b/resources/views/settings/api.blade.php @@ -14,6 +14,7 @@ @section('content') @if (!config('app.lock_passwords'))
+