Small layout tweaks to oauth page

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-13 18:16:03 +01:00
parent 51242fcbb2
commit e06e4db4b7
2 changed files with 58 additions and 12 deletions

View file

@ -12,4 +12,5 @@ return array(
'api_reference' => 'Please check the <a href="https://snipe-it.readme.io/reference" target="_blank">API reference</a> 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',
);

View file

@ -32,14 +32,23 @@
@endif
@if ($clients->count() > 0)
<table class="table table-striped snipe-table">
<table data-cookie-id-table="OAuthClientsTable"
data-pagination="true"
data-id-table="OAuthClientsTable"
data-side-pagination="client"
data-sort-order="desc"
data-sort-name="created_at"
id="OAuthClientsTable"
class="table table-striped snipe-table">
<thead>
<tr>
<th>{{ trans('general.id') }}</th>
<th>{{ trans('general.name') }}</th>
<th>{{ trans('admin/settings/general.oauth_redirect_url') }}</th>
<th>{{ trans('admin/settings/general.oauth_secret') }}</th>
<th><span class="sr-only">{{ trans('general.actions') }}</span></th>
<th data-sortable="true">{{ trans('general.name') }}</th>
<th data-sortable="true">{{ trans('admin/settings/general.oauth_redirect_url') }}</th>
<th data-sortable="true">{{ trans('admin/settings/general.oauth_secret') }}</th>
<th data-sortable="true">{{ trans('general.created_at') }}</th>
<th data-sortable="true">{{ trans('general.updated_at') }}</th>
<th data-sortable="true"><span class="sr-only">{{ trans('general.actions') }}</span></th>
</tr>
</thead>
<tbody>
@ -57,7 +66,7 @@
<!-- Redirect -->
<td>
{{ $client->redirect }}
<code>{{ $client->redirect }}</code>
</td>
<!-- Secret -->
@ -65,6 +74,16 @@
<code>{{ $client->secret }}</code>
</td>
<td>
{{ $client->created_at ? Helper::getFormattedDateObject($client->created_at, 'datetime', false) : '' }}
</td>
<td>
@if ($client->created_at != $client->updated_at)
{{ $client->updated_at ? Helper::getFormattedDateObject($client->updated_at, 'datetime', false) : '' }}
@endif
</td>
<!-- Edit / Delete Button -->
<td class="text-right">
@ -77,8 +96,8 @@
<a class="action-link btn btn-danger btn-sm" wire:click="deleteClient('{{ $client->id }}')">
<i class="fas fa-trash" aria-hidden="true"></i>
<span class="sr-only">
{{ trans('general.delete') }}
</span>
{{ trans('general.delete') }}
</span>
</a>
</td>
</tr>
@ -96,18 +115,29 @@
<div>
<div class="box box-default">
<div class="box-header">
<h2>
<h2 class="box-title">
{{ trans('admin/settings/general.oauth_authorized_apps') }}
</h2>
</div>
<div class="box-body">
<!-- Authorized Tokens -->
<table class="table table-striped snipe-table">
<table data-cookie-id-table="AuthorizedAppsTale"
data-pagination="true"
data-id-table="AuthorizedAppsTale"
data-toolbar="#AuthorizedAppsToolbar"
data-side-pagination="client"
data-sort-order="desc"
data-sort-name="created_at"
id="AuthorizedAppsTale"
class="table table-striped snipe-table">
<thead>
<tr>
<th>{{ trans('general.name') }}</th>
<th>{{ trans('admin/settings/general.oauth_scopes') }}</th>
<th data-sortable="true">{{ trans('general.name') }}</th>
<th data-sortable="true"> {{ trans('account/general.personal_access_token') }}</th>
<th data-sortable="true">{{ trans('admin/settings/general.oauth_scopes') }}</th>
<th data-sortable="true">{{ trans('general.created_at') }}</th>
<th data-sortable="true">{{ trans('account/general.expires') }}</th>
<th></th>
</tr>
</thead>
@ -120,6 +150,10 @@
{{ $token->client->name }}
</td>
<td>
{{ $token->name }}
</td>
<!-- Scopes -->
<td>
@if(!$token->scopes)
@ -129,6 +163,13 @@
@endif
</td>
<td>
{{ $token->created_at ? Helper::getFormattedDateObject($token->created_at, 'datetime', false) : '' }}
</td>
<td>
{{ $token->expires_at ? Helper::getFormattedDateObject($token->expires_at, 'datetime', false) : '' }}
</td>
<!-- Revoke Button -->
<td>
<a class="btn btn-sm btn-danger pull-right"
@ -354,4 +395,8 @@
</script>
</div>
@section('moar_scripts')
@include ('partials.bootstrap-table')
@endsection