From e06e4db4b71939b35d88e5e4f326d9f5bb9b70d0 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 13 Jul 2024 18:16:03 +0100 Subject: [PATCH 1/2] Small layout tweaks to oauth page Signed-off-by: snipe --- resources/lang/en-US/account/general.php | 1 + .../views/livewire/oauth-clients.blade.php | 69 +++++++++++++++---- 2 files changed, 58 insertions(+), 12 deletions(-) diff --git a/resources/lang/en-US/account/general.php b/resources/lang/en-US/account/general.php index d99e36df8..4fe86164e 100644 --- a/resources/lang/en-US/account/general.php +++ b/resources/lang/en-US/account/general.php @@ -12,4 +12,5 @@ return array( 'api_reference' => 'Please check the API reference to find specific API endpoints and additional API documentation.', 'profile_updated' => 'Account successfully updated', 'no_tokens' => 'You have not created any personal access tokens.', + 'expires' => 'Expires', ); diff --git a/resources/views/livewire/oauth-clients.blade.php b/resources/views/livewire/oauth-clients.blade.php index 27a76b623..eeba0e686 100644 --- a/resources/views/livewire/oauth-clients.blade.php +++ b/resources/views/livewire/oauth-clients.blade.php @@ -32,14 +32,23 @@ @endif @if ($clients->count() > 0) - +
- - - - + + + + + + @@ -57,7 +66,7 @@ @@ -65,6 +74,16 @@ {{ $client->secret }} + + + + @@ -96,18 +115,29 @@
-

+

{{ trans('admin/settings/general.oauth_authorized_apps') }}

-
{{ trans('general.id') }}{{ trans('general.name') }}{{ trans('admin/settings/general.oauth_redirect_url') }}{{ trans('admin/settings/general.oauth_secret') }}{{ trans('general.actions') }}{{ trans('general.name') }}{{ trans('admin/settings/general.oauth_redirect_url') }}{{ trans('admin/settings/general.oauth_secret') }}{{ trans('general.created_at') }}{{ trans('general.updated_at') }}{{ trans('general.actions') }}
- {{ $client->redirect }} + {{ $client->redirect }} + {{ $client->created_at ? Helper::getFormattedDateObject($client->created_at, 'datetime', false) : '' }} + + @if ($client->created_at != $client->updated_at) + {{ $client->updated_at ? Helper::getFormattedDateObject($client->updated_at, 'datetime', false) : '' }} + @endif + @@ -77,8 +96,8 @@ - {{ trans('general.delete') }} - + {{ trans('general.delete') }} +
+
- - + + + + + @@ -120,6 +150,10 @@ {{ $token->client->name }} + + + + + - + @@ -90,7 +94,10 @@ - {{ trans('general.update') }} + + + {{ trans('general.update') }} + @@ -115,21 +122,21 @@
-

+

{{ trans('admin/settings/general.oauth_authorized_apps') }}

-
{{ trans('general.name') }}{{ trans('admin/settings/general.oauth_scopes') }}{{ trans('general.name') }} {{ trans('account/general.personal_access_token') }}{{ trans('admin/settings/general.oauth_scopes') }}{{ trans('general.created_at') }}{{ trans('account/general.expires') }}
+ {{ $token->name }} + @if(!$token->scopes) @@ -129,6 +163,13 @@ @endif + {{ $token->created_at ? Helper::getFormattedDateObject($token->created_at, 'datetime', false) : '' }} + + {{ $token->expires_at ? Helper::getFormattedDateObject($token->expires_at, 'datetime', false) : '' }} + +@section('moar_scripts') + @include ('partials.bootstrap-table') +@endsection + From 2d1aeca9494b9320e8412e8219b546e3d9e84bc5 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 13 Jul 2024 18:24:56 +0100 Subject: [PATCH 2/2] Re-use existing string Signed-off-by: snipe --- resources/lang/en-US/account/general.php | 1 - .../views/livewire/oauth-clients.blade.php | 27 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/resources/lang/en-US/account/general.php b/resources/lang/en-US/account/general.php index 4fe86164e..d99e36df8 100644 --- a/resources/lang/en-US/account/general.php +++ b/resources/lang/en-US/account/general.php @@ -12,5 +12,4 @@ return array( 'api_reference' => 'Please check the API reference to find specific API endpoints and additional API documentation.', 'profile_updated' => 'Account successfully updated', 'no_tokens' => 'You have not created any personal access tokens.', - 'expires' => 'Expires', ); diff --git a/resources/views/livewire/oauth-clients.blade.php b/resources/views/livewire/oauth-clients.blade.php index eeba0e686..7caf5f6a2 100644 --- a/resources/views/livewire/oauth-clients.blade.php +++ b/resources/views/livewire/oauth-clients.blade.php @@ -48,7 +48,11 @@ {{ trans('admin/settings/general.oauth_secret') }} {{ trans('general.created_at') }} {{ trans('general.updated_at') }}{{ trans('general.actions') }} + + {{ trans('general.actions') }} + +
@@ -137,8 +144,12 @@ - - + +
{{ trans('account/general.personal_access_token') }} {{ trans('admin/settings/general.oauth_scopes') }} {{ trans('general.created_at') }}{{ trans('account/general.expires') }}{{ trans('general.expires') }} + + {{ trans('general.actions') }} + +