fields
This commit is contained in:
parent
c5906a2762
commit
39b0160cf4
|
@ -70,35 +70,36 @@ export const ProfileSettingsPage = (props: PageProps) => {
|
||||||
onChange={(event) => updateFormField('name', event.currentTarget.value)}
|
onChange={(event) => updateFormField('name', event.currentTarget.value)}
|
||||||
value={form.name}
|
value={form.name}
|
||||||
/>
|
/>
|
||||||
<label for="username">Имя</label>
|
<label for="username">{t('Name')}</label>
|
||||||
</div>
|
</div>
|
||||||
{/*Не готов бекенд*/}
|
|
||||||
{/*<h4>{t('Address on Discourse')}</h4>*/}
|
|
||||||
{/*<div class="pretty-form__item">*/}
|
|
||||||
{/* <div class={styles.discoursName}>*/}
|
|
||||||
{/* <label for="user-address">https://discours.io/user/</label>*/}
|
|
||||||
{/* <div class={styles.discoursNameField}>*/}
|
|
||||||
{/* <input*/}
|
|
||||||
{/* type="text"*/}
|
|
||||||
{/* name="user-address"*/}
|
|
||||||
{/* id="user-address"*/}
|
|
||||||
{/* onChange={(event) => updateFormField('slug', event.currentTarget.value)}*/}
|
|
||||||
{/* value={form.slug}*/}
|
|
||||||
{/* class="nolabel"*/}
|
|
||||||
{/* />*/}
|
|
||||||
{/* <p class="form-message form-message--error">*/}
|
|
||||||
{/* {t('Sorry, this address is already taken, please choose another one.')}*/}
|
|
||||||
{/* </p>*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/* </div>*/}
|
|
||||||
{/*</div>*/}
|
|
||||||
|
|
||||||
{/*Нет реализации полей на бэке*/}
|
<h4>{t('Address on Discourse')}</h4>
|
||||||
{/*<h4>{t('Introduce')}</h4>*/}
|
<div class="pretty-form__item">
|
||||||
{/*<div class="pretty-form__item">*/}
|
<div class={styles.discoursName}>
|
||||||
{/* <textarea name="presentation" id="presentation" placeholder={t('Introduce')} />*/}
|
<label for="user-address">https://new.discours.io/author/</label>
|
||||||
{/* <label for="presentation">{t('Introduce')}</label>*/}
|
<div class={styles.discoursNameField}>
|
||||||
{/*</div>*/}
|
<input
|
||||||
|
type="text"
|
||||||
|
name="user-address"
|
||||||
|
id="user-address"
|
||||||
|
onChange={(event) => updateFormField('slug', event.currentTarget.value)}
|
||||||
|
value={form.slug}
|
||||||
|
class="nolabel"
|
||||||
|
/>
|
||||||
|
<p class="form-message form-message--error">
|
||||||
|
{t('Sorry, this address is already taken, please choose another one.')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4>{t('Introduce')}</h4>
|
||||||
|
<div class="pretty-form__item">
|
||||||
|
<textarea name="presentation" id="presentation" placeholder={t('Introduce')}>
|
||||||
|
{form.bio}
|
||||||
|
</textarea>
|
||||||
|
<label for="presentation">{t('Introduce')}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4>{t('About myself')}</h4>
|
<h4>{t('About myself')}</h4>
|
||||||
<div class="pretty-form__item">
|
<div class="pretty-form__item">
|
||||||
|
@ -106,8 +107,8 @@ export const ProfileSettingsPage = (props: PageProps) => {
|
||||||
name="about"
|
name="about"
|
||||||
id="about"
|
id="about"
|
||||||
placeholder={t('About myself')}
|
placeholder={t('About myself')}
|
||||||
value={form.bio}
|
value={form.about}
|
||||||
onChange={(event) => updateFormField('bio', event.currentTarget.value)}
|
onChange={(event) => updateFormField('about', event.currentTarget.value)}
|
||||||
/>
|
/>
|
||||||
<label for="about">{t('About myself')}</label>
|
<label for="about">{t('About myself')}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,6 +22,8 @@ const useProfileForm = () => {
|
||||||
const [form, setForm] = createStore<ProfileInput>({
|
const [form, setForm] = createStore<ProfileInput>({
|
||||||
name: '',
|
name: '',
|
||||||
bio: '',
|
bio: '',
|
||||||
|
about: '',
|
||||||
|
slug: '',
|
||||||
userpic: '',
|
userpic: '',
|
||||||
links: []
|
links: []
|
||||||
})
|
})
|
||||||
|
@ -34,6 +36,7 @@ const useProfileForm = () => {
|
||||||
setForm({
|
setForm({
|
||||||
name: currentAuthor()?.name,
|
name: currentAuthor()?.name,
|
||||||
bio: currentAuthor()?.bio,
|
bio: currentAuthor()?.bio,
|
||||||
|
about: currentAuthor()?.about,
|
||||||
userpic: currentAuthor()?.userpic,
|
userpic: currentAuthor()?.userpic,
|
||||||
links: currentAuthor()?.links
|
links: currentAuthor()?.links
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,6 +23,7 @@ export type AuthResult = {
|
||||||
|
|
||||||
export type Author = {
|
export type Author = {
|
||||||
bio?: Maybe<Scalars['String']>
|
bio?: Maybe<Scalars['String']>
|
||||||
|
about?: Maybe<Scalars['String']>
|
||||||
caption?: Maybe<Scalars['String']>
|
caption?: Maybe<Scalars['String']>
|
||||||
id: Scalars['Int']
|
id: Scalars['Int']
|
||||||
lastSeen?: Maybe<Scalars['DateTime']>
|
lastSeen?: Maybe<Scalars['DateTime']>
|
||||||
|
@ -327,6 +328,8 @@ export type Permission = {
|
||||||
|
|
||||||
export type ProfileInput = {
|
export type ProfileInput = {
|
||||||
bio?: InputMaybe<Scalars['String']>
|
bio?: InputMaybe<Scalars['String']>
|
||||||
|
slug?: InputMaybe<Scalars['String']>
|
||||||
|
about?: InputMaybe<Scalars['String']>
|
||||||
links?: InputMaybe<Array<InputMaybe<Scalars['String']>>>
|
links?: InputMaybe<Array<InputMaybe<Scalars['String']>>>
|
||||||
name?: InputMaybe<Scalars['String']>
|
name?: InputMaybe<Scalars['String']>
|
||||||
userpic?: InputMaybe<Scalars['String']>
|
userpic?: InputMaybe<Scalars['String']>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user