diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d7e1f9fd5..94af24ddd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add tooltips to short links on repository overview ([#1441](https://github.com/scm-manager/scm-manager/pull/1441)) - Show the date of the last commit for branches in the frontend ([#1439](https://github.com/scm-manager/scm-manager/pull/1439)) +- Unify and add description to key view across user settings ([#1440](https://github.com/scm-manager/scm-manager/pull/1440)) ## [2.10.1] - 2020-11-24 ### Fixed diff --git a/docs/de/user/profile/assets/api-key-overview.png b/docs/de/user/profile/assets/api-key-overview.png index d150b8fb1b..d1fbe8f606 100644 Binary files a/docs/de/user/profile/assets/api-key-overview.png and b/docs/de/user/profile/assets/api-key-overview.png differ diff --git a/docs/de/user/profile/index.md b/docs/de/user/profile/index.md index 6e399bfa13..29018292d1 100644 --- a/docs/de/user/profile/index.md +++ b/docs/de/user/profile/index.md @@ -13,7 +13,7 @@ eingegeben werden. Danach muss das neue Passwort zweimal eingegeben werden. ## Öffentliche Schlüssel -Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen Schlüssel hinterlegt werden. +Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG Schlüssel hinterlegt werden. Zudem können hier die vom SCM-Manager erstellten Signaturschlüssel heruntergeladen werden. ## API Schlüssel diff --git a/docs/de/user/user/assets/user-information.png b/docs/de/user/user/assets/user-information.png index f5573c10e8..b79a4076c7 100644 Binary files a/docs/de/user/user/assets/user-information.png and b/docs/de/user/user/assets/user-information.png differ diff --git a/docs/de/user/user/assets/user-settings-general.png b/docs/de/user/user/assets/user-settings-general.png index 9fe75a3a89..9f63014b71 100644 Binary files a/docs/de/user/user/assets/user-settings-general.png and b/docs/de/user/user/assets/user-settings-general.png differ diff --git a/docs/de/user/user/assets/user-settings-publickeys.png b/docs/de/user/user/assets/user-settings-publickeys.png index 9761a3b044..b40d52e2a8 100644 Binary files a/docs/de/user/user/assets/user-settings-publickeys.png and b/docs/de/user/user/assets/user-settings-publickeys.png differ diff --git a/docs/en/user/profile/assets/api-key-overview.png b/docs/en/user/profile/assets/api-key-overview.png index d150b8fb1b..d052188103 100644 Binary files a/docs/en/user/profile/assets/api-key-overview.png and b/docs/en/user/profile/assets/api-key-overview.png differ diff --git a/docs/en/user/profile/index.md b/docs/en/user/profile/index.md index 50746c2f56..5895b89700 100644 --- a/docs/en/user/profile/index.md +++ b/docs/en/user/profile/index.md @@ -11,9 +11,9 @@ Here the password for the current account can be changed when it is a local acco external system). To authorize the change, the current password has to be put first. Then the new password has to be entered twice. -## Öffentliche Schlüssel +## Public Keys -To check signatures for example for commits, public keys can be stored here. Additionally the keys created by +To check signatures (for example for commits), gpg public keys can be stored here. Additionally the keys created by SCM-Manager can be accessed here, too. ## API keys diff --git a/docs/en/user/user/assets/user-information.png b/docs/en/user/user/assets/user-information.png index f5573c10e8..666f05f7f8 100644 Binary files a/docs/en/user/user/assets/user-information.png and b/docs/en/user/user/assets/user-information.png differ diff --git a/docs/en/user/user/assets/user-settings-general.png b/docs/en/user/user/assets/user-settings-general.png index 4312fa0e8e..10d3688e47 100644 Binary files a/docs/en/user/user/assets/user-settings-general.png and b/docs/en/user/user/assets/user-settings-general.png differ diff --git a/docs/en/user/user/assets/user-settings-publickeys.png b/docs/en/user/user/assets/user-settings-publickeys.png index b2eae78e8b..286f46d8f2 100644 Binary files a/docs/en/user/user/assets/user-settings-publickeys.png and b/docs/en/user/user/assets/user-settings-publickeys.png differ diff --git a/scm-ui/ui-webapp/public/locales/de/users.json b/scm-ui/ui-webapp/public/locales/de/users.json index 271caff650..cb2a599aac 100644 --- a/scm-ui/ui-webapp/public/locales/de/users.json +++ b/scm-ui/ui-webapp/public/locales/de/users.json @@ -79,15 +79,22 @@ } }, "publicKey": { + "subtitle": "Öffentliche Schlüssel", + "description": "Zum Prüfen von Signaturen für z. B. Commits können hier die entsprechenden öffentlichen GPG Schlüssel hinterlegt werden. Zudem können hier die vom SCM-Manager erstellten Signaturschlüssel heruntergeladen werden.", "noStoredKeys": "Es wurden keine Schlüssel gefunden.", "displayName": "Anzeigename", - "raw": "Schlüssel", "created": "Eingetragen an", - "addKey": "Schlüssel hinzufügen", + "raw": "Schlüssel", + "download": "Herunterladen", "delete": "Löschen", - "download": "Herunterladen" + "addSubtitle": "Neuen Schlüssel hinzufügen", + "addKey": "Schlüssel hinzufügen" }, "apiKey": { + "subtitle": "API Schlüssel", + "text1": "Erstelle und verwalte Personal Access Token um auf die REST API zuzugreifen oder diese als Passwort für SCM-Clients zu nutzen. Die Rechte der Token sind auf Repositories und die gewählte Rolle beschränkt.", + "manageRoles": "Sie können die Rollenberechtigungen in der Administration unter „Berechtigungsrollen“ einsehen und neue Rollen anlegen.", + "text2": "Um den Token in REST-Abfragen zu nutzen, übergeben Sie diesen als Cookie mit dem Namen „X-Bearer-Token“. Sie können den Token auch anstelle Ihres Passworts nutzen, um sich mit SCM-Clients anzumelden.", "noStoredKeys": "Es wurden keine Schlüssel gefunden.", "displayName": "Anzeigename", "permissionRole": { @@ -95,12 +102,10 @@ "help": "Mit der Rolle können Sie die Berechtigung für diesen Schlüssel einschränken" }, "created": "Eingetragen an", + "addSubtitle": "Neuen Schlüssel hinzufügen", "addKey": "Schlüssel hinzufügen", "delete": "Löschen", "download": "Herunterladen", - "text1": "Erstelle und verwalte Personal Access Token um auf die REST API zuzugreifen oder diese als Passwort für SCM-Clients zu nutzen. Die Rechte der Token sind auf Repositories und die gewählte Rolle beschränkt.", - "manageRoles": "Sie können die Rollenberechtigungen in der Administration unter „Berechtigungsrollen“ einsehen und neue Rollen anlegen.", - "text2": "Um den Token in REST-Abfragen zu nutzen, übergeben Sie diesen als Cookie mit dem Namen „X-Bearer-Token“. Sie können den Token auch anstelle Ihres Passworts nutzen, um sich mit SCM-Clients anzumelden.", "modal": { "title": "Schlüssel erzeugt", "text1": "Ihr neuer API-Schlüssel ist bereit. Sie können diesen als Token für Zugriffe auf die REST-Schnittstelle nutzen oder anstelle Ihres Passworts zum Login mit SCM-Clients nutzen.", diff --git a/scm-ui/ui-webapp/public/locales/en/users.json b/scm-ui/ui-webapp/public/locales/en/users.json index 877675bc85..eb145f440e 100644 --- a/scm-ui/ui-webapp/public/locales/en/users.json +++ b/scm-ui/ui-webapp/public/locales/en/users.json @@ -79,15 +79,22 @@ } }, "publicKey": { + "subtitle": "Public Keys", + "description": "To check signatures (for example for commits), gpg public keys can be stored here. Additionally the keys created by SCM-Manager can be accessed here, too.", "noStoredKeys": "No keys found.", "displayName": "Display Name", - "raw": "Key", "created": "Created on", - "addKey": "Add key", + "raw": "Key", + "download": "Download", "delete": "Delete", - "download": "Download" + "addSubtitle": "Add new key", + "addKey": "Add key" }, "apiKey": { + "subtitle": "API Keys", + "text1": "Create and manage personal access tokens to access the REST API or use as a password for SCM clients. The privileges of these tokens are limited to repositories and the selected role.", + "manageRoles": "You may view and create roles in the administration view “Permission Roles”.", + "text2": "To use the token in a REST request, pass it as a cookie named “X-Bearer-Token”. You may use the token as your password for SCM clients, too.", "noStoredKeys": "No keys found.", "displayName": "Display Name", "permissionRole": { @@ -95,12 +102,10 @@ "help": "The api key will be restricted to permissions of this role" }, "created": "Created on", + "addSubtitle": "Add new key", "addKey": "Add key", "delete": "Delete", "download": "Download", - "text1": "Create and manage personal access tokens to access the REST API or use as a password for SCM clients. The privileges of these tokens are limited to repositories and the selected role.", - "manageRoles": "You may view and create roles in the administration view “Permission Roles”.", - "text2": "To use the token in a REST request, pass it as a cookie named “X-Bearer-Token”. You may use the token as your password for SCM clients, too.", "modal": { "title": "Key created", "text1": "Your new API key is ready. You can use it as a bearer token for REST calls or as a password for SCM clients.", diff --git a/scm-ui/ui-webapp/src/users/components/apiKeys/AddApiKey.tsx b/scm-ui/ui-webapp/src/users/components/apiKeys/AddApiKey.tsx index 216f33d425..fdbda0903b 100644 --- a/scm-ui/ui-webapp/src/users/components/apiKeys/AddApiKey.tsx +++ b/scm-ui/ui-webapp/src/users/components/apiKeys/AddApiKey.tsx @@ -23,7 +23,7 @@ */ import React, { FC, useEffect, useState } from "react"; -import { apiClient, ErrorNotification, InputField, Level, Loading, SubmitButton } from "@scm-manager/ui-components"; +import { apiClient, ErrorNotification, InputField, Level, Loading, SubmitButton, Subtitle } from "@scm-manager/ui-components"; import { useTranslation } from "react-i18next"; import { CONTENT_TYPE_API_KEY } from "./SetApiKeys"; import { connect } from "react-redux"; @@ -105,6 +105,8 @@ const AddApiKey: FC = ({ return ( <> +
+ {newKeyModal} = ({ apiKey, onDelete }) => { if (apiKey?._links?.delete) { deleteButton = ( onDelete((apiKey._links.delete as Link).href)}> - - + + ); @@ -52,7 +52,7 @@ export const ApiKeyEntry: FC = ({ apiKey, onDelete }) => { {apiKey.displayName} {apiKey.permissionRole} - + {deleteButton} diff --git a/scm-ui/ui-webapp/src/users/components/apiKeys/SetApiKeys.tsx b/scm-ui/ui-webapp/src/users/components/apiKeys/SetApiKeys.tsx index 8d80add477..7b9af8a415 100644 --- a/scm-ui/ui-webapp/src/users/components/apiKeys/SetApiKeys.tsx +++ b/scm-ui/ui-webapp/src/users/components/apiKeys/SetApiKeys.tsx @@ -25,11 +25,10 @@ import { Collection, Links, User, Me } from "@scm-manager/ui-types"; import React, { FC, useEffect, useState } from "react"; import { Link } from "react-router-dom"; -import { apiClient, ErrorNotification, Loading } from "@scm-manager/ui-components"; +import { apiClient, ErrorNotification, Loading, Subtitle } from "@scm-manager/ui-components"; import ApiKeyTable from "./ApiKeyTable"; import AddApiKey from "./AddApiKey"; import { useTranslation } from "react-i18next"; -import styled from "styled-components"; export type ApiKeysCollection = Collection & { _embedded: { @@ -51,10 +50,6 @@ type Props = { user: User | Me; }; -const Subtitle = styled.div` - margin-bottom: 1rem; -`; - const SetApiKeys: FC = ({ user }) => { const [t] = useTranslation("users"); const [error, setError] = useState(); @@ -94,14 +89,13 @@ const SetApiKeys: FC = ({ user }) => { return ( <> -
-

{t("apiKey.text1")} {t("apiKey.manageRoles")}

-

{t("apiKey.text2")}

-
-
+ +

+ {t("apiKey.text1")} {t("apiKey.manageRoles")} +

+

{t("apiKey.text2")}

+
-
-

Create new key

{createLink && } ); diff --git a/scm-ui/ui-webapp/src/users/components/publicKeys/AddPublicKey.tsx b/scm-ui/ui-webapp/src/users/components/publicKeys/AddPublicKey.tsx index e0129e8245..c693d89130 100644 --- a/scm-ui/ui-webapp/src/users/components/publicKeys/AddPublicKey.tsx +++ b/scm-ui/ui-webapp/src/users/components/publicKeys/AddPublicKey.tsx @@ -23,7 +23,6 @@ */ import React, { FC, useState } from "react"; -import { User, Link, Links, Collection } from "@scm-manager/ui-types/src"; import { ErrorNotification, InputField, @@ -31,7 +30,8 @@ import { Textarea, SubmitButton, apiClient, - Loading + Loading, + Subtitle } from "@scm-manager/ui-components"; import { useTranslation } from "react-i18next"; import { CONTENT_TYPE_PUBLIC_KEY } from "./SetPublicKeys"; @@ -77,6 +77,8 @@ const AddPublicKey: FC = ({ createLink, refresh }) => { return ( <> +
+