Fix accounts not visible in collection editor in advanced web interface (#39586)
This commit is contained in:
parent
b5e771b89e
commit
5c7492c5e4
@ -24,7 +24,6 @@ import {
|
||||
import {
|
||||
Article,
|
||||
ItemList,
|
||||
Scrollable,
|
||||
} from 'mastodon/components/scrollable_list/components';
|
||||
import { useAccount } from 'mastodon/hooks/useAccount';
|
||||
import { useSearchAccounts } from 'mastodon/hooks/useSearchAccounts';
|
||||
@ -417,43 +416,42 @@ export const CollectionAccounts: React.FC<{
|
||||
</AccountsHeadingElement>
|
||||
)}
|
||||
|
||||
<Scrollable className={classes.scrollableWrapper}>
|
||||
<ItemList
|
||||
emptyMessage={
|
||||
<EmptyState
|
||||
title={
|
||||
<FormattedMessage
|
||||
id='collections.accounts.empty_editor_title'
|
||||
defaultMessage='No one is in this collection yet'
|
||||
/>
|
||||
}
|
||||
message={
|
||||
<FormattedMessage
|
||||
id='collections.accounts.empty_description'
|
||||
defaultMessage='Add up to {count} accounts'
|
||||
values={{
|
||||
count: MAX_COLLECTION_ACCOUNT_COUNT,
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{editorItems.map(({ account_id, state }, index) => (
|
||||
<Article
|
||||
key={account_id}
|
||||
aria-posinset={index}
|
||||
aria-setsize={editorItems.length}
|
||||
>
|
||||
<AddedAccountItem
|
||||
accountId={account_id}
|
||||
pending={state === 'pending'}
|
||||
onRemove={handleRemoveAccountItem}
|
||||
<ItemList
|
||||
className={classes.accountList}
|
||||
emptyMessage={
|
||||
<EmptyState
|
||||
title={
|
||||
<FormattedMessage
|
||||
id='collections.accounts.empty_editor_title'
|
||||
defaultMessage='No one is in this collection yet'
|
||||
/>
|
||||
</Article>
|
||||
))}
|
||||
</ItemList>
|
||||
</Scrollable>
|
||||
}
|
||||
message={
|
||||
<FormattedMessage
|
||||
id='collections.accounts.empty_description'
|
||||
defaultMessage='Add up to {count} accounts'
|
||||
values={{
|
||||
count: MAX_COLLECTION_ACCOUNT_COUNT,
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{editorItems.map(({ account_id, state }, index) => (
|
||||
<Article
|
||||
key={account_id}
|
||||
aria-posinset={index}
|
||||
aria-setsize={editorItems.length}
|
||||
>
|
||||
<AddedAccountItem
|
||||
accountId={account_id}
|
||||
pending={state === 'pending'}
|
||||
onRemove={handleRemoveAccountItem}
|
||||
/>
|
||||
</Article>
|
||||
))}
|
||||
</ItemList>
|
||||
</div>
|
||||
</FormStack>
|
||||
{!isEditMode && hasItems && (
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.scrollableWrapper {
|
||||
.accountList {
|
||||
margin-inline: -16px;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user