Minor fixes

This commit is contained in:
Bojan Mojsilovic 2023-10-13 19:57:58 +02:00
parent f4c86454b8
commit fe90f42e78
7 changed files with 14 additions and 16 deletions

View File

@ -90,7 +90,7 @@ const CreatePinModal: Component<{
value={pin()}
onKeyUp={onKeyUp}
onChange={(val: string) => setPin(val)}
validationState={isValidPin() ? 'valid' : 'invalid'}
validationState={pin().length === 0 || isValidPin() ? 'valid' : 'invalid'}
errorMessage={intl.formatMessage(tPin.invalidPin)}
/>
<TextInput

View File

@ -64,6 +64,7 @@
.inputs {
margin-bottom: 4px;
}
.actions {

View File

@ -22,7 +22,7 @@
border: 1px solid var(--subtile-devider);
background: var(--background-input);
width: calc(100% - 16px);
width: 100%;
height: 40px;
margin-top: 8px;

View File

@ -513,13 +513,7 @@ export const SettingsProvider = (props: { children: ContextChildren }) => {
// Add trendingFeed if it's missing
// @ts-ignore
if (initFeeds && !initFeeds.find((f) => f.hex === trendingFeed.hex)) {
addAvailableFeed(trendingFeed, true, true);
}
// 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);
addAvailableFeed(trendingFeed, true, false);
}
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
// @ts-ignore
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(() => {
loadSettings(publicKey);
}, 100);

View File

@ -20,6 +20,7 @@
position: relative;
width: 100%;
height: 214px;
background-color: var(--background-card);
.uploadingOverlay {
position: absolute;

View File

@ -244,6 +244,7 @@ const CreateAccount: Component = () => { const intl = useIntl();
const { success } = await sendProfile({ ...metadata }, account.relays, relaySettings);
if (success) {
await (new Promise((res) => setTimeout(() => res(true), 100)));
toast?.sendSuccess(intl.formatMessage(tToast.updateProfileSuccess));
pubkey && getUserProfiles([pubkey], `user_profile_${APP_ID}`);
@ -508,7 +509,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
ref={nameInput}
class={styles.inputWithPrefix}
placeholder={intl.formatMessage(tSettings.profile.name.placeholder)}
value={profile?.userProfile?.name || ''}
onInput={onNameInput}
/>
</div>
@ -525,7 +525,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
name='displayName'
type='text'
placeholder={intl.formatMessage(tSettings.profile.displayName.placeholder)}
value={profile?.userProfile?.displayName || profile?.userProfile?.display_name || ''}
/>
<div class={`${styles.moreInputs} ${isMoreVisible() ? styles.show : styles.hide}`}>
@ -567,7 +566,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
name='website'
type='text'
placeholder={intl.formatMessage(tSettings.profile.website.placeholder)}
value={profile?.userProfile?.website || ''}
/>
<div class={styles.inputLabel}>
@ -576,7 +574,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
<textarea
name='about'
placeholder={intl.formatMessage(tSettings.profile.about.placeholder)}
value={profile?.userProfile?.about || ''}
ref={textArea}
rows={1}
data-min-rows={1}
@ -590,7 +587,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
name='lud16'
type='text'
placeholder={intl.formatMessage(tSettings.profile.lud16.placeholder)}
value={profile?.userProfile?.lud16 || ''}
/>
<div class={styles.inputLabel}>
@ -600,7 +596,6 @@ const CreateAccount: Component = () => { const intl = useIntl();
name='nip05'
type='text'
placeholder={intl.formatMessage(tSettings.profile.nip05.placeholder)}
value={profile?.userProfile?.nip05 || ''}
/>
</div>

View File

@ -190,6 +190,7 @@ export type NostrUserZaps = {
export type NostrSuggestedUsers = {
kind: Kind.SuggestedUsersByCategory,
content: string,
created_at?: number,
};
export type NostrEventContent =