style(dashboard-v2): uncapitalize Skylinks

This commit is contained in:
Michał Leszczyk 2022-03-28 08:07:14 +02:00
parent 45dc78ed19
commit 34bb7d55d1
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
3 changed files with 14 additions and 8 deletions

View File

@ -54,6 +54,8 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
const skylinksNumber = skylinks?.length ?? 0;
const isNotConfigured = isPublic && skylinksNumber === 0;
const skylinksPhrasePrefix = skylinksNumber === 0 ? "No" : skylinksNumber;
const skylinksPhrase = `${skylinksPhrasePrefix} ${skylinksNumber === 1 ? "skylink" : "skylinks"} configured`;
return (
<li
@ -71,7 +73,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
"text-palette-400": !isNotConfigured,
})}
>
{skylinksNumber} {skylinksNumber === 1 ? "Skylink" : "Skylinks"} configured
{skylinksPhrase}
</button>
</span>
</span>
@ -80,7 +82,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
<span className="flex items-center justify-end">
{isPublic && (
<button
title="Add or remove Skylinks"
title="Add or remove skylinks"
className="p-1 transition-colors hover:text-primary"
onClick={promptEdit}
>
@ -111,7 +113,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
)}
{editInitiated && (
<Modal onClose={closeEditModal} className="flex flex-col gap-4 text-center sm:px-8 sm:py-6">
<h4>Covered Skylinks</h4>
<h4>Covered skylinks</h4>
{skylinks?.length > 0 ? (
<ul className="text-xs flex flex-col gap-2">
{skylinks.map((skylink) => (

View File

@ -132,7 +132,7 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
<TextField
type="text"
name={`skylinks.${index}`}
placeholder={`${index + 1}. Skylink`}
placeholder={`${index + 1}. skylink`}
error={skylinksErrors[index]}
touched={skylinksTouched[index]}
/>
@ -148,7 +148,7 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
<TextField
type="text"
name="nextSkylink"
placeholder={`${skylinks.length + 1}. Skylink`}
placeholder={`Paste next skylink here`}
error={errors.nextSkylink}
touched={touched.nextSkylink}
onKeyPress={(event) => {
@ -176,7 +176,11 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
</div>
<div className="flex mt-5 justify-center">
<Button type="submit" className={cn("px-2.5", { "cursor-wait": isSubmitting })} disabled={!isValid || isSubmitting}>
<Button
type="submit"
className={cn("px-2.5", { "cursor-wait": isSubmitting })}
disabled={!isValid || isSubmitting}
>
{isSubmitting ? "Generating" : "Generate"} your public key
</Button>
</div>

View File

@ -42,7 +42,7 @@ const APIKeysPage = () => {
<section className="flex flex-col gap-2">
<h5>Public keys</h5>
<p className="text-palette-500">
Give read access to a selected list of Skylinks. You can share them publicly.
Public keys provide read access to a selected list of skylinks. You can share them publicly.
</p>
<div className="mt-4">
@ -68,7 +68,7 @@ const APIKeysPage = () => {
<section className="flex flex-col gap-2">
<h5>General keys</h5>
<p className="text-palette-500">
Give full access to <b>Accounts</b> service and are equivalent to using a JWT token.
These keys provide full access to <b>Accounts</b> service and are equivalent to using a JWT token.
</p>
<p className="underline">This type of API keys need to be kept secret and never shared with anyone.</p>