mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Handle hideCollections
This commit is contained in:
parent
9934daeb4d
commit
b0a53b7fa1
2 changed files with 9 additions and 1 deletions
|
@ -186,6 +186,7 @@ function AccountInfo({
|
||||||
memorial,
|
memorial,
|
||||||
moved,
|
moved,
|
||||||
roles,
|
roles,
|
||||||
|
hideCollections,
|
||||||
} = info || {};
|
} = info || {};
|
||||||
let headerIsAvatar = false;
|
let headerIsAvatar = false;
|
||||||
let { header, headerStatic } = info || {};
|
let { header, headerStatic } = info || {};
|
||||||
|
@ -677,6 +678,9 @@ function AccountInfo({
|
||||||
excludeRelationshipAttrs: isSelf
|
excludeRelationshipAttrs: isSelf
|
||||||
? ['followedBy']
|
? ['followedBy']
|
||||||
: [],
|
: [],
|
||||||
|
blankCopy: hideCollections
|
||||||
|
? 'This user has chosen to not make this information available.'
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}, 0);
|
}, 0);
|
||||||
}}
|
}}
|
||||||
|
@ -712,6 +716,9 @@ function AccountInfo({
|
||||||
fetchAccounts: fetchFollowing,
|
fetchAccounts: fetchFollowing,
|
||||||
instance,
|
instance,
|
||||||
excludeRelationshipAttrs: isSelf ? ['following'] : [],
|
excludeRelationshipAttrs: isSelf ? ['following'] : [],
|
||||||
|
blankCopy: hideCollections
|
||||||
|
? 'This user has chosen to not make this information available.'
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
}, 0);
|
}, 0);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -20,6 +20,7 @@ export default function GenericAccounts({
|
||||||
excludeRelationshipAttrs = [],
|
excludeRelationshipAttrs = [],
|
||||||
postID,
|
postID,
|
||||||
onClose = () => {},
|
onClose = () => {},
|
||||||
|
blankCopy = 'Nothing to show',
|
||||||
}) {
|
}) {
|
||||||
const { masto, instance: currentInstance } = api();
|
const { masto, instance: currentInstance } = api();
|
||||||
const isCurrentInstance = instance ? instance === currentInstance : true;
|
const isCurrentInstance = instance ? instance === currentInstance : true;
|
||||||
|
@ -221,7 +222,7 @@ export default function GenericAccounts({
|
||||||
) : uiState === 'error' ? (
|
) : uiState === 'error' ? (
|
||||||
<p class="ui-state">Error loading accounts</p>
|
<p class="ui-state">Error loading accounts</p>
|
||||||
) : (
|
) : (
|
||||||
<p class="ui-state insignificant">Nothing to show</p>
|
<p class="ui-state insignificant">{blankCopy}</p>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue