1
0
Fork 0

feat(shared): Set IDs on new inputs

This commit is contained in:
joostdecock 2023-08-26 09:27:27 +02:00
parent 9551ab3630
commit 62f6cc6ac4
18 changed files with 29 additions and 0 deletions

View file

@ -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) => ({

View file

@ -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}

View file

@ -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}

View file

@ -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,

View file

@ -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,

View file

@ -51,6 +51,7 @@ export const EmailSettings = () => {
) : (
<>
<EmailInput
id="account-email"
label={t('account:email')}
placeholder={t('account:email')}
update={setEmail}

View file

@ -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}

View file

@ -45,6 +45,7 @@ export const ImgSettings = ({ welcome = false }) => {
/>
) : null}
<PassiveImageInput
id="account-img"
label={t('image')}
placeholder={'image'}
update={setImg}

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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}

View file

@ -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,
})}

View file

@ -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}

View file

@ -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}

View file

@ -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]}

View file

@ -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}

View file

@ -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}