mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-09-30 08:50:48 +00:00
Minor fixes
This commit is contained in:
parent
f4c86454b8
commit
fe90f42e78
@ -90,7 +90,7 @@ const CreatePinModal: Component<{
|
|||||||
value={pin()}
|
value={pin()}
|
||||||
onKeyUp={onKeyUp}
|
onKeyUp={onKeyUp}
|
||||||
onChange={(val: string) => setPin(val)}
|
onChange={(val: string) => setPin(val)}
|
||||||
validationState={isValidPin() ? 'valid' : 'invalid'}
|
validationState={pin().length === 0 || isValidPin() ? 'valid' : 'invalid'}
|
||||||
errorMessage={intl.formatMessage(tPin.invalidPin)}
|
errorMessage={intl.formatMessage(tPin.invalidPin)}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
.inputs {
|
.inputs {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
border: 1px solid var(--subtile-devider);
|
border: 1px solid var(--subtile-devider);
|
||||||
background: var(--background-input);
|
background: var(--background-input);
|
||||||
|
|
||||||
width: calc(100% - 16px);
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
@ -513,13 +513,7 @@ export const SettingsProvider = (props: { children: ContextChildren }) => {
|
|||||||
// Add trendingFeed if it's missing
|
// Add trendingFeed if it's missing
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (initFeeds && !initFeeds.find((f) => f.hex === trendingFeed.hex)) {
|
if (initFeeds && !initFeeds.find((f) => f.hex === trendingFeed.hex)) {
|
||||||
addAvailableFeed(trendingFeed, true, true);
|
addAvailableFeed(trendingFeed, true, false);
|
||||||
}
|
|
||||||
|
|
||||||
// Add active user's feed if it's missing
|
|
||||||
// @ts-ignore
|
|
||||||
if (initFeeds && !initFeeds.find(f => f.hex === feedLatest.hex && f.includeReplies === feedLatest.includeReplies)) {
|
|
||||||
addAvailableFeed(feedLatest, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const fwr = initFeeds?.find(f => f.hex === feedLatestWithReplies.hex && f.includeReplies === feedLatestWithReplies.includeReplies);
|
const fwr = initFeeds?.find(f => f.hex === feedLatestWithReplies.hex && f.includeReplies === feedLatestWithReplies.includeReplies);
|
||||||
@ -527,9 +521,15 @@ export const SettingsProvider = (props: { children: ContextChildren }) => {
|
|||||||
// Add active user's feed if it's missing
|
// Add active user's feed if it's missing
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (!fwr) {
|
if (!fwr) {
|
||||||
addAvailableFeed(feedLatestWithReplies, true, true);
|
addAvailableFeed(feedLatestWithReplies, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Add active user's feed if it's missing
|
||||||
|
// @ts-ignore
|
||||||
|
if (initFeeds && !initFeeds.find(f => f.hex === feedLatest.hex && f.includeReplies === feedLatest.includeReplies)) {
|
||||||
|
addAvailableFeed(feedLatest, true, false);
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loadSettings(publicKey);
|
loadSettings(publicKey);
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 214px;
|
height: 214px;
|
||||||
|
background-color: var(--background-card);
|
||||||
|
|
||||||
.uploadingOverlay {
|
.uploadingOverlay {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -244,6 +244,7 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
const { success } = await sendProfile({ ...metadata }, account.relays, relaySettings);
|
const { success } = await sendProfile({ ...metadata }, account.relays, relaySettings);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
await (new Promise((res) => setTimeout(() => res(true), 100)));
|
||||||
toast?.sendSuccess(intl.formatMessage(tToast.updateProfileSuccess));
|
toast?.sendSuccess(intl.formatMessage(tToast.updateProfileSuccess));
|
||||||
pubkey && getUserProfiles([pubkey], `user_profile_${APP_ID}`);
|
pubkey && getUserProfiles([pubkey], `user_profile_${APP_ID}`);
|
||||||
|
|
||||||
@ -508,7 +509,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
ref={nameInput}
|
ref={nameInput}
|
||||||
class={styles.inputWithPrefix}
|
class={styles.inputWithPrefix}
|
||||||
placeholder={intl.formatMessage(tSettings.profile.name.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.name.placeholder)}
|
||||||
value={profile?.userProfile?.name || ''}
|
|
||||||
onInput={onNameInput}
|
onInput={onNameInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -525,7 +525,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
name='displayName'
|
name='displayName'
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={intl.formatMessage(tSettings.profile.displayName.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.displayName.placeholder)}
|
||||||
value={profile?.userProfile?.displayName || profile?.userProfile?.display_name || ''}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class={`${styles.moreInputs} ${isMoreVisible() ? styles.show : styles.hide}`}>
|
<div class={`${styles.moreInputs} ${isMoreVisible() ? styles.show : styles.hide}`}>
|
||||||
@ -567,7 +566,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
name='website'
|
name='website'
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={intl.formatMessage(tSettings.profile.website.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.website.placeholder)}
|
||||||
value={profile?.userProfile?.website || ''}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class={styles.inputLabel}>
|
<div class={styles.inputLabel}>
|
||||||
@ -576,7 +574,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
<textarea
|
<textarea
|
||||||
name='about'
|
name='about'
|
||||||
placeholder={intl.formatMessage(tSettings.profile.about.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.about.placeholder)}
|
||||||
value={profile?.userProfile?.about || ''}
|
|
||||||
ref={textArea}
|
ref={textArea}
|
||||||
rows={1}
|
rows={1}
|
||||||
data-min-rows={1}
|
data-min-rows={1}
|
||||||
@ -590,7 +587,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
name='lud16'
|
name='lud16'
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={intl.formatMessage(tSettings.profile.lud16.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.lud16.placeholder)}
|
||||||
value={profile?.userProfile?.lud16 || ''}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class={styles.inputLabel}>
|
<div class={styles.inputLabel}>
|
||||||
@ -600,7 +596,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
|
|||||||
name='nip05'
|
name='nip05'
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={intl.formatMessage(tSettings.profile.nip05.placeholder)}
|
placeholder={intl.formatMessage(tSettings.profile.nip05.placeholder)}
|
||||||
value={profile?.userProfile?.nip05 || ''}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
1
src/types/primal.d.ts
vendored
1
src/types/primal.d.ts
vendored
@ -190,6 +190,7 @@ export type NostrUserZaps = {
|
|||||||
export type NostrSuggestedUsers = {
|
export type NostrSuggestedUsers = {
|
||||||
kind: Kind.SuggestedUsersByCategory,
|
kind: Kind.SuggestedUsersByCategory,
|
||||||
content: string,
|
content: string,
|
||||||
|
created_at?: number,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NostrEventContent =
|
export type NostrEventContent =
|
||||||
|
Loading…
Reference in New Issue
Block a user