UI: update community index view to point to the selfhosted server

This commit is contained in:
Pieter Vander Vennet 2025-01-27 03:47:50 +01:00
parent 7f5b797b7d
commit 3c6606c90b
7 changed files with 33 additions and 368 deletions

View file

@ -1,5 +1,5 @@
import Script from "./Script"
import { CommunityResource } from "../src/Logic/Web/CommunityIndex"
import { CommunityResource } from "../src/Logic/Web/CommunityIndex"downlaodComm
import { Utils } from "../src/Utils"
import { FeatureCollection, MultiPolygon, Polygon } from "geojson"
import { existsSync, mkdirSync, writeFileSync } from "fs"
@ -41,6 +41,10 @@ class DownloadCommunityIndex extends Script {
private static stripResourcesObj(resources: Readonly<Record<string, Readonly<CommunityResource>>>) {
const stripped: Record<string, CommunityResource> = {}
for (const k in resources) {
if(k === "twitter" || k === "facebook" || k === "x"){
// These channels are toxic nowadays - we simply omit them
continue
}
stripped[k] = DownloadCommunityIndex.stripResource(resources[k])
}
return stripped