Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ type CollectionObject = {
badge: string;
};

function isSystemCollection(coll: CollectionObject): boolean {
return coll.name.startsWith('system.') || coll.name.startsWith('enxcol_.');
}

export class ShowCollectionsOutput extends Component<ShowCollectionsOutputProps> {
static propTypes = {
value: PropTypes.array
Expand All @@ -25,7 +29,7 @@ export class ShowCollectionsOutput extends Component<ShowCollectionsOutputProps>
let maxCollectionNameLength = 0;
value.forEach(coll => {
maxCollectionNameLength = Math.max(maxCollectionNameLength, coll.name.length);
if (coll.name.startsWith('system.') || coll.name.startsWith('enxcol_.')) {
if (isSystemCollection(coll)) {
systemCollections.push(coll);
} else {
otherCollections.push(coll);
Expand All @@ -41,7 +45,7 @@ export class ShowCollectionsOutput extends Component<ShowCollectionsOutputProps>
const className = classNames(
styles['shell-collections-output-collection-name'],
{
[styles['shell-collections-output-system-collection']]: coll.name.startsWith('system.')
[styles['shell-collections-output-system-collection']]: isSystemCollection(coll)
}
);
tableEntries.push(<span key={`row-${i}`}>
Expand Down