Add link from admin API keys page to manage personal API keys.

This commit is contained in:
Buster Neece 2023-01-02 15:33:17 -06:00
parent 24ef1c4d8a
commit fb5dba9c22
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 26 additions and 0 deletions

View File

@ -9,6 +9,25 @@
</h2>
</b-card-header>
<info-card>
<p class="card-text">
{{
$gettext('This page lists all API keys assigned to all users across the system.')
}}
</p>
</info-card>
<b-card-body body-class="card-padding-sm">
<b-button
variant="outline-primary"
:href="myApiKeysUrl"
target="_blank"
>
<icon icon="vpn_key"/>
{{ $gettext('Manage My API Keys') }}
</b-button>
</b-card-body>
<data-table
id="api_keys"
ref="$dataTable"
@ -40,11 +59,17 @@ import {useSweetAlert} from "~/vendor/sweetalert";
import {useNotify} from "~/vendor/bootstrapVue";
import {useAxios} from "~/vendor/axios";
import {useTranslate} from "~/vendor/gettext";
import InfoCard from "~/components/Common/InfoCard.vue";
import Icon from "~/components/Common/Icon.vue";
defineProps({
apiUrl: {
type: String,
required: true
},
myApiKeysUrl: {
type: String,
required: true
}
});

View File

@ -23,6 +23,7 @@ final class ApiKeysAction
title: __('API Keys'),
props: [
'apiUrl' => $router->named('api:admin:api-keys'),
'myApiKeysUrl' => $router->named('profile:index'),
],
);
}