Dont list instances with closed signups or few active users (#170)

* Dont list instances with closed signups

* Dont list instances with few active users
This commit is contained in:
Nutomic 2023-06-09 23:02:47 +02:00 committed by GitHub
parent 686c773534
commit acd202c590
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,8 @@ import { i18n } from "../i18next";
import { instance_stats } from "../instance_stats"; import { instance_stats } from "../instance_stats";
import { numToSI } from "../utils"; import { numToSI } from "../utils";
const min_monthly_users = 5;
export class Instances extends Component<any, any> { export class Instances extends Component<any, any> {
constructor(props: any, context: any) { constructor(props: any, context: any) {
super(props, context); super(props, context);
@ -86,7 +88,17 @@ export class Instances extends Component<any, any> {
<div> <div>
<h2>{header}</h2> <h2>{header}</h2>
<div class="row"> <div class="row">
{instances.map(instance => { {instances
.filter(
i =>
i.site_info.site_view.local_site.registration_mode != "closed"
)
.filter(
i =>
i.site_info.site_view.counts.users_active_month >
min_monthly_users
)
.map(instance => {
let domain = instance.domain; let domain = instance.domain;
let users_active_month = let users_active_month =
instance.site_info.site_view.counts.users_active_month; instance.site_info.site_view.counts.users_active_month;