diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index e5bd8fd..cb93581 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -3,6 +3,7 @@ "buttonCancel": "Abbrechen", "buttonClose": "Schließen", "buttonSave": "Speichern", + "buttonDelete": "Löschen", "sideMenu.dashboard": "Dashboard", "sideMenu.groupTasks": "Gruppenaufgaben", "sideMenu.groupTasks.overview": "Übersicht", @@ -140,6 +141,9 @@ "userProfile.column.expiresAt": "Läuft ab am", "userProfile.column.action": "Maßnahme", "userProfile.column.action.signOut": "Abmelden", + "userProfile.column.deleteApiKey": "Löschen", + "userProfile.column.deleteApiKey.popconfirm.title": "Sind Sie sicher, dass Sie diesen API-Schlüssel löschen möchten?", + "userProfile.column.deleteApiKey.popconfirm.description": "Anfragen, die diesen API-Schlüssel noch verwenden, werden zukünftig abgelehnt", "userProfile.column.createdAt": "Erstellt am", "userProfile.column.usageCount": "Anzahl der Nutzungen", "userProfile.column.name": "Name", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index f8f4117..f8157c9 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -3,6 +3,7 @@ "buttonCancel": "Cancel", "buttonClose": "Close", "buttonSave": "Save", + "buttonDelete": "Delete", "sideMenu.dashboard": "Dashboard", "sideMenu.groupTasks": "Group Tasks", "sideMenu.groupTasks.overview": "Overview", @@ -140,6 +141,9 @@ "userProfile.column.expiresAt": "Expires at", "userProfile.column.action": "Action", "userProfile.column.action.signOut": "Sign out", + "userProfile.column.deleteApiKey": "Delete", + "userProfile.column.deleteApiKey.popconfirm.title": "Are you sure you want to delete this API key?", + "userProfile.column.deleteApiKey.popconfirm.description": "Requests that still use this API key will be irejected in the future", "userProfile.column.createdAt": "Created at", "userProfile.column.usageCount": "Usage count", "userProfile.column.name": "Name", diff --git a/src/Pages/UserProfile/index.js b/src/Pages/UserProfile/index.js index 251c49f..2b4a036 100644 --- a/src/Pages/UserProfile/index.js +++ b/src/Pages/UserProfile/index.js @@ -154,6 +154,32 @@ export default function UserProfile() { dataIndex: "createdAt", key: "createdAt", }, + { + title: t("scanners.column.action"), + dataIndex: "action", + key: "action", + render: (_, record) => ( + + + webSocketContext.SendSocketMessage( + SentMessagesCommands.DeleteUserApiKey, + { Id: record.key } + ) + } + > + {t("userProfile.column.deleteApiKey")} + + + ), + }, ]; }; diff --git a/src/utils.js b/src/utils.js index e74b6e2..e30f54e 100644 --- a/src/utils.js +++ b/src/utils.js @@ -216,6 +216,7 @@ export const SentMessagesCommands = { GroupTasksCheckingForCategoryGroupChanges: 17, HandleUserActionTaskStep: 18, CreateNewUserApiKey: 19, + DeleteUserApiKey: 20, }; export function WebSocketProvider({