feat(shared): Set IDs on new inputs
This commit is contained in:
parent
9551ab3630
commit
62f6cc6ac4
18 changed files with 29 additions and 0 deletions
|
@ -185,6 +185,7 @@ const NewKey = ({ account, setGenerate, backend }) => {
|
|||
) : (
|
||||
<>
|
||||
<StringInput
|
||||
id="apikey-name"
|
||||
label={t('keyName')}
|
||||
docs={docs.name}
|
||||
current={name}
|
||||
|
@ -196,6 +197,7 @@ const NewKey = ({ account, setGenerate, backend }) => {
|
|||
<ExpiryPicker {...{ t, expires, setExpires }} />
|
||||
</FormControl>
|
||||
<ListInput
|
||||
id="apikey-level"
|
||||
label={t('keyLevel')}
|
||||
docs={docs.level}
|
||||
list={levels.map((l) => ({
|
||||
|
|
|
@ -55,6 +55,7 @@ export const BioSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl xl:pl-4">
|
||||
<LoadingStatus />
|
||||
<MarkdownInput
|
||||
id="account-bio"
|
||||
label={t('bioTitle')}
|
||||
update={setBio}
|
||||
current={bio}
|
||||
|
|
|
@ -72,6 +72,7 @@ export const NewBookmark = () => {
|
|||
<div className="max-w-2xl xl:pl-4">
|
||||
<LoadingStatus />
|
||||
<StringInput
|
||||
id="bookmark-title"
|
||||
label={t('title')}
|
||||
docs={docs.title}
|
||||
update={setTitle}
|
||||
|
@ -80,6 +81,7 @@ export const NewBookmark = () => {
|
|||
placeholder={t('account')}
|
||||
/>
|
||||
<StringInput
|
||||
id="bookmark-url"
|
||||
label={t('location')}
|
||||
docs={docs.location}
|
||||
update={setUrl}
|
||||
|
|
|
@ -49,6 +49,7 @@ export const CompareSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<ListInput
|
||||
id="account-compare"
|
||||
label={t('compareTitle')}
|
||||
list={['yes', 'no'].map((val) => ({
|
||||
val,
|
||||
|
|
|
@ -63,6 +63,7 @@ export const ControlSettings = ({ welcome = false, noBack = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<ListInput
|
||||
id="account-control"
|
||||
label={t('controlTitle')}
|
||||
list={[1, 2, 3, 4, 5].map((val) => ({
|
||||
val,
|
||||
|
|
|
@ -51,6 +51,7 @@ export const EmailSettings = () => {
|
|||
) : (
|
||||
<>
|
||||
<EmailInput
|
||||
id="account-email"
|
||||
label={t('account:email')}
|
||||
placeholder={t('account:email')}
|
||||
update={setEmail}
|
||||
|
|
|
@ -39,6 +39,7 @@ export const GithubSettings = () => {
|
|||
<LoadingStatus />
|
||||
<h2 className="text-4xl">{t('githubTitle')}</h2>
|
||||
<StringInput
|
||||
id="account-github-email"
|
||||
label={t('email')}
|
||||
current={githubEmail}
|
||||
update={setGithubEmail}
|
||||
|
@ -47,6 +48,7 @@ export const GithubSettings = () => {
|
|||
docs={<DynamicOrgDocs language={i18n.language} path={`site/account/github`} />}
|
||||
/>
|
||||
<StringInput
|
||||
id="account-github-username"
|
||||
label={t('username')}
|
||||
current={githubUsername}
|
||||
update={setGithubUsername}
|
||||
|
|
|
@ -45,6 +45,7 @@ export const ImgSettings = ({ welcome = false }) => {
|
|||
/>
|
||||
) : null}
|
||||
<PassiveImageInput
|
||||
id="account-img"
|
||||
label={t('image')}
|
||||
placeholder={'image'}
|
||||
update={setImg}
|
||||
|
|
|
@ -46,6 +46,7 @@ export const ImperialSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<ListInput
|
||||
id="account-units"
|
||||
label={t('unitsTitle')}
|
||||
list={['metric', 'imperial'].map((val) => ({
|
||||
val,
|
||||
|
|
|
@ -41,6 +41,7 @@ export const LanguageSettings = () => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<ListInput
|
||||
id="account-language"
|
||||
label={t('languageTitle')}
|
||||
list={conf.languages.map((val) => ({
|
||||
val,
|
||||
|
|
|
@ -46,6 +46,7 @@ export const NewsletterSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<ListInput
|
||||
id="account-newsletter"
|
||||
label={t('newsletterTitle')}
|
||||
list={['yes', 'no'].map((val) => ({
|
||||
val,
|
||||
|
|
|
@ -40,6 +40,7 @@ export const PasswordSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<PasswordInput
|
||||
id="account-password"
|
||||
label={t('passwordTitle')}
|
||||
current={password}
|
||||
update={setPassword}
|
||||
|
|
|
@ -39,6 +39,7 @@ export const PlatformSettings = ({ platform }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<StringInput
|
||||
id={`account-${platform}`}
|
||||
label={t(platform === 'website' ? 'account:websiteTitle' : 'account:platformTitle', {
|
||||
platform: platform,
|
||||
})}
|
||||
|
|
|
@ -430,6 +430,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
|
||||
return (
|
||||
<MeasieInput
|
||||
id={`measie-${m}`}
|
||||
key={m}
|
||||
m={m}
|
||||
docs={measieDocs[m]}
|
||||
|
@ -447,6 +448,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
{/* Name is always shown */}
|
||||
<span id="name"></span>
|
||||
<StringInput
|
||||
id="set-name"
|
||||
label={t('name')}
|
||||
update={setName}
|
||||
current={name}
|
||||
|
@ -460,6 +462,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
<span id="image"></span>
|
||||
{account.control >= conf.account.sets.img ? (
|
||||
<PassiveImageInput
|
||||
id="set-img"
|
||||
label={t('image')}
|
||||
update={setImage}
|
||||
current={image}
|
||||
|
@ -472,6 +475,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
<span id="public"></span>
|
||||
{account.control >= conf.account.sets.public ? (
|
||||
<ListInput
|
||||
id="set-public"
|
||||
label={t('public')}
|
||||
update={setIsPublic}
|
||||
docs={docs.public}
|
||||
|
@ -508,6 +512,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
<span id="units"></span>
|
||||
{account.control >= conf.account.sets.units ? (
|
||||
<ListInput
|
||||
id="set-units"
|
||||
label={t('units')}
|
||||
docs={docs.units}
|
||||
update={setImperial}
|
||||
|
@ -541,6 +546,7 @@ export const Mset = ({ id, publicOnly = false }) => {
|
|||
<span id="notes"></span>
|
||||
{account.control >= conf.account.sets.notes ? (
|
||||
<MarkdownInput
|
||||
id="set-notes"
|
||||
label={t('notes')}
|
||||
update={setNotes}
|
||||
docs={docs.notes}
|
||||
|
|
|
@ -54,6 +54,7 @@ export const UsernameSettings = ({ welcome = false }) => {
|
|||
<div className="max-w-xl">
|
||||
<LoadingStatus />
|
||||
<StringInput
|
||||
id="account-username"
|
||||
label={t('usernameTitle')}
|
||||
current={username}
|
||||
update={update}
|
||||
|
|
|
@ -215,6 +215,7 @@ export const SupportForm = () => {
|
|||
<LoadingStatus />
|
||||
<SupportType type={type} active={true} update={() => setType(false)} t={t} />
|
||||
<StringInput
|
||||
id="support-title"
|
||||
label={t('title')}
|
||||
update={setTitle}
|
||||
current={title}
|
||||
|
@ -243,6 +244,7 @@ export const SupportForm = () => {
|
|||
/>
|
||||
)}
|
||||
<MarkdownInput
|
||||
id="support-body"
|
||||
label={t('description')}
|
||||
update={setBody}
|
||||
current={body}
|
||||
|
@ -261,6 +263,7 @@ export const SupportForm = () => {
|
|||
return (
|
||||
<Fragment key={key}>
|
||||
<ActiveImageInput
|
||||
id={`support-img-${key}`}
|
||||
label={`${t('image')} ${key}`}
|
||||
update={(val) => setSingleImage(key, val)}
|
||||
current={images[key]}
|
||||
|
|
|
@ -111,6 +111,7 @@ export const Migrate = () => {
|
|||
<p className="text-inherit">{t('migrateV2Desc')}</p>
|
||||
<div className="text-base-content">
|
||||
<StringInput
|
||||
id="migrate-username"
|
||||
label={t('account:username')}
|
||||
placeholder={t('account:username')}
|
||||
current={username}
|
||||
|
@ -119,6 +120,7 @@ export const Migrate = () => {
|
|||
docs={<DynamicOrgDocs language={i18n.language} path={`site/account/username`} />}
|
||||
/>
|
||||
<PasswordInput
|
||||
id="migrate-password"
|
||||
label={t('account:password')}
|
||||
placeholder={t('password')}
|
||||
current={password}
|
||||
|
|
|
@ -134,6 +134,7 @@ export const SignUp = () => {
|
|||
<p className={`text-inherit ${loadingClasses}`}>{t('toReceiveSignupLink')}:</p>
|
||||
<form onSubmit={signupHandler} className="text-accent-content">
|
||||
<EmailInput
|
||||
id="signup-email"
|
||||
label={t('emailAddress')}
|
||||
placeholder={t('emailAddress')}
|
||||
update={updateEmail}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue