Fix button and translations.

This commit is contained in:
James Cole
2026-04-18 06:24:13 +02:00
parent 0b02800a00
commit b4b67b0759
4 changed files with 11 additions and 3 deletions
@@ -120,8 +120,15 @@ final class OAuthController extends Controller
{
// Retrieving all the OAuth app clients that belong to the user...
$clients = auth()->user()->oauthApps()->where('revoked', false)->get();
$array = [];
/** @var Client $client */
foreach($clients as $client) {
$item = $client->toArray();
$item['confidential'] = $client->confidential();
$array[] = $item;
}
return response()->json($clients);
return response()->json($array);
}
public function listPersonalAccessTokens(): JsonResponse
+1
View File
@@ -141,6 +141,7 @@ return [
'firefly' => [
'explain_pats',
'profile_oauth_clients_explain',
'regenerate_secret',
'administrations_page_title',
'administrations_index_menu',
'expires_at',
Regular → Executable
View File
@@ -52,7 +52,7 @@
<tr>
<th class="width-30" scope="col">{{ $t('firefly.profile_oauth_client_id') }}</th>
<th class="width-30" scope="col">{{ $t('firefly.name') }}</th>
<th class="width-40" scope="col" style="text-align:right">{{ $t('form.buttons') }}</th>
<th class="width-40" scope="col" style="text-align:right">{{ $t('firefly.actions') }}</th>
</tr>
</thead>
@@ -71,7 +71,7 @@
<!-- Secret -->
<td style="vertical-align: middle;text-align:right">
<div class="btn-group">
<a :title="$t('firefly.regenerate_secret')" class="btn btn-default btn-sm" @click="regenerateSecret(client)">
<a v-if="client.confidential" :title="$t('firefly.regenerate_secret')" class="btn btn-default btn-sm" @click="regenerateSecret(client)">
<em :title="$t('firefly.regenerate_secret')" class="fa fa-retweet"></em>
{{ $t('firefly.regenerate_secret') }}
</a>