mirror of
https://github.com/PrimalHQ/primal-web-app.git
synced 2024-10-01 17:31:13 +00:00
Modify visibility for search users
This commit is contained in:
parent
6fa7d42262
commit
acd529b2f7
@ -83,6 +83,12 @@
|
||||
.searchSuggestions {
|
||||
margin-top: 8px;
|
||||
width: 316px;
|
||||
visibility: visible;
|
||||
|
||||
&.hidden {
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.loadingOverlay {
|
||||
|
@ -136,7 +136,7 @@ const Search: Component<{
|
||||
/>
|
||||
</form>
|
||||
|
||||
<Show when={isFocused()}>
|
||||
<div class={`${styles.searchSuggestions} ${!isFocused() ? styles.hidden : ''}`}>
|
||||
<Show
|
||||
when={!props.hideDefault}
|
||||
>
|
||||
@ -159,31 +159,31 @@ const Search: Component<{
|
||||
/>
|
||||
</Show>
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
<div class={styles.searchSuggestions}>
|
||||
<Show when={search?.isFetchingUsers && query().length > 0}>
|
||||
<div class={styles.loadingOverlay}>
|
||||
<div>
|
||||
<Loader />
|
||||
</div>
|
||||
<div class={`${styles.searchSuggestions} ${!isFocused() ? styles.hidden : ''}`}>
|
||||
<Show when={search?.isFetchingUsers && query().length > 0}>
|
||||
<div class={styles.loadingOverlay}>
|
||||
<div>
|
||||
<Loader />
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
</Show>
|
||||
|
||||
<For each={search?.users}>
|
||||
{(user) => (
|
||||
<SearchOption
|
||||
href={props.noLinks ? undefined : `/p/${user.npub}`}
|
||||
title={userName(user)}
|
||||
description={nip05Verification(user)}
|
||||
icon={<Avatar user={user} size="vvs" />}
|
||||
statNumber={profile?.profileHistory.stats[user.pubkey]?.followers_count || search?.scores[user.pubkey]}
|
||||
statLabel={intl.formatMessage(t.followers)}
|
||||
onClick={() => selectUser(user)}
|
||||
/>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</Show>
|
||||
<For each={search?.users}>
|
||||
{(user) => (
|
||||
<SearchOption
|
||||
href={props.noLinks ? undefined : `/p/${user.npub}`}
|
||||
title={userName(user)}
|
||||
description={nip05Verification(user)}
|
||||
icon={<Avatar user={user} size="vvs" />}
|
||||
statNumber={profile?.profileHistory.stats[user.pubkey]?.followers_count || search?.scores[user.pubkey]}
|
||||
statLabel={intl.formatMessage(t.followers)}
|
||||
onClick={() => selectUser(user)}
|
||||
/>
|
||||
)}
|
||||
</For>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user