mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 23:02:55 +01:00
chore: Update "Used in x places" text (#84)
We cannot guarantee that this is always correct since there is repeaters and dynamic repeaters etc, but this can give a hint to how many times a component is used.
This commit is contained in:
@@ -991,7 +991,7 @@ export class ComponentsPanelView extends View {
|
|||||||
|
|
||||||
// Find references
|
// Find references
|
||||||
const nodeReference = HACK_findNodeReference(scope.comp.name);
|
const nodeReference = HACK_findNodeReference(scope.comp.name);
|
||||||
const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`;
|
const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`;
|
||||||
|
|
||||||
items = items.concat([
|
items = items.concat([
|
||||||
{
|
{
|
||||||
@@ -1122,7 +1122,7 @@ export class ComponentsPanelView extends View {
|
|||||||
if (scope.canBecomeRoot) {
|
if (scope.canBecomeRoot) {
|
||||||
// Find references
|
// Find references
|
||||||
const nodeReference = HACK_findNodeReference(scope.folder.component.name);
|
const nodeReference = HACK_findNodeReference(scope.folder.component.name);
|
||||||
const nodeReferencesText = `Used in ${nodeReference?.referenaces?.length || 0} places`;
|
const nodeReferencesText = `Used in ~${nodeReference?.referenaces?.length || 0} places`;
|
||||||
|
|
||||||
items = items.concat([{
|
items = items.concat([{
|
||||||
label: nodeReferencesText
|
label: nodeReferencesText
|
||||||
|
|||||||
Reference in New Issue
Block a user