style(dashboard-v2): uncapitalize Skylinks
This commit is contained in:
parent
45dc78ed19
commit
34bb7d55d1
|
@ -54,6 +54,8 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
|
||||||
|
|
||||||
const skylinksNumber = skylinks?.length ?? 0;
|
const skylinksNumber = skylinks?.length ?? 0;
|
||||||
const isNotConfigured = isPublic && skylinksNumber === 0;
|
const isNotConfigured = isPublic && skylinksNumber === 0;
|
||||||
|
const skylinksPhrasePrefix = skylinksNumber === 0 ? "No" : skylinksNumber;
|
||||||
|
const skylinksPhrase = `${skylinksPhrasePrefix} ${skylinksNumber === 1 ? "skylink" : "skylinks"} configured`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
|
@ -71,7 +73,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
|
||||||
"text-palette-400": !isNotConfigured,
|
"text-palette-400": !isNotConfigured,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{skylinksNumber} {skylinksNumber === 1 ? "Skylink" : "Skylinks"} configured
|
{skylinksPhrase}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -80,7 +82,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
|
||||||
<span className="flex items-center justify-end">
|
<span className="flex items-center justify-end">
|
||||||
{isPublic && (
|
{isPublic && (
|
||||||
<button
|
<button
|
||||||
title="Add or remove Skylinks"
|
title="Add or remove skylinks"
|
||||||
className="p-1 transition-colors hover:text-primary"
|
className="p-1 transition-colors hover:text-primary"
|
||||||
onClick={promptEdit}
|
onClick={promptEdit}
|
||||||
>
|
>
|
||||||
|
@ -111,7 +113,7 @@ export const APIKey = ({ apiKey, onRemoved, onEdited, onRemovalError }) => {
|
||||||
)}
|
)}
|
||||||
{editInitiated && (
|
{editInitiated && (
|
||||||
<Modal onClose={closeEditModal} className="flex flex-col gap-4 text-center sm:px-8 sm:py-6">
|
<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 ? (
|
{skylinks?.length > 0 ? (
|
||||||
<ul className="text-xs flex flex-col gap-2">
|
<ul className="text-xs flex flex-col gap-2">
|
||||||
{skylinks.map((skylink) => (
|
{skylinks.map((skylink) => (
|
||||||
|
|
|
@ -132,7 +132,7 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
|
||||||
<TextField
|
<TextField
|
||||||
type="text"
|
type="text"
|
||||||
name={`skylinks.${index}`}
|
name={`skylinks.${index}`}
|
||||||
placeholder={`${index + 1}. Skylink`}
|
placeholder={`${index + 1}. skylink`}
|
||||||
error={skylinksErrors[index]}
|
error={skylinksErrors[index]}
|
||||||
touched={skylinksTouched[index]}
|
touched={skylinksTouched[index]}
|
||||||
/>
|
/>
|
||||||
|
@ -148,7 +148,7 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
|
||||||
<TextField
|
<TextField
|
||||||
type="text"
|
type="text"
|
||||||
name="nextSkylink"
|
name="nextSkylink"
|
||||||
placeholder={`${skylinks.length + 1}. Skylink`}
|
placeholder={`Paste next skylink here`}
|
||||||
error={errors.nextSkylink}
|
error={errors.nextSkylink}
|
||||||
touched={touched.nextSkylink}
|
touched={touched.nextSkylink}
|
||||||
onKeyPress={(event) => {
|
onKeyPress={(event) => {
|
||||||
|
@ -176,7 +176,11 @@ export const AddPublicAPIKeyForm = forwardRef(({ onSuccess }, ref) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex mt-5 justify-center">
|
<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
|
{isSubmitting ? "Generating" : "Generate"} your public key
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,7 +42,7 @@ const APIKeysPage = () => {
|
||||||
<section className="flex flex-col gap-2">
|
<section className="flex flex-col gap-2">
|
||||||
<h5>Public keys</h5>
|
<h5>Public keys</h5>
|
||||||
<p className="text-palette-500">
|
<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>
|
</p>
|
||||||
|
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
|
@ -68,7 +68,7 @@ const APIKeysPage = () => {
|
||||||
<section className="flex flex-col gap-2">
|
<section className="flex flex-col gap-2">
|
||||||
<h5>General keys</h5>
|
<h5>General keys</h5>
|
||||||
<p className="text-palette-500">
|
<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>
|
||||||
<p className="underline">This type of API keys need to be kept secret and never shared with anyone.</p>
|
<p className="underline">This type of API keys need to be kept secret and never shared with anyone.</p>
|
||||||
|
|
||||||
|
|
Reference in New Issue