Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix button and translations.
James Coleb4b67b075970
diff --git a/app/Http/Controllers/Profile/OAuthController.php b/app/Http/Controllers/Profile/OAuthController.phpindex 92dd6798c8..82fff226eb 100644--- a/app/Http/Controllers/Profile/OAuthController.php+++ b/app/Http/Controllers/Profile/OAuthController.php@@ -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(): JsonResponsediff --git a/config/translations.php b/config/translations.phpindex f58594f31a..4db6fbeb9e 100644--- a/config/translations.php+++ b/config/translations.php@@ -141,6 +141,7 @@ return ['firefly' => ['explain_pats','profile_oauth_clients_explain',+ 'regenerate_secret','administrations_page_title','administrations_index_menu','expires_at',diff --git a/public/v1/js/.gitkeep b/public/v1/js/.gitkeepold mode 100644new mode 100755diff --git a/resources/assets/v1/src/components/passport/Clients.vue b/resources/assets/v1/src/components/passport/Clients.vueindex ddb4fbf729..063ca0d50e 100644--- a/resources/assets/v1/src/components/passport/Clients.vue+++ b/resources/assets/v1/src/components/passport/Clients.vue@@ -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>