Feature(inspector): allow to load multiple contributors at once

This commit is contained in:
Pieter Vander Vennet 2024-12-04 18:48:05 +01:00
parent 7c6224fd3e
commit 063a912c82
8 changed files with 69 additions and 41 deletions

View file

@ -33,10 +33,10 @@ export class HistoryUtils {
}).filter(ch => ch.oldValue !== ch.value)
}
public static fullHistoryDiff(histories: OsmObject[][], onlyShowUsername?: string){
public static fullHistoryDiff(histories: OsmObject[][], onlyShowUsername?: Set<string>){
const allDiffs: {key: string, oldValue?: string, value?: string}[] = [].concat(...histories.map(
history => {
const filtered = history.filter(step => !onlyShowUsername || step.tags["_last_edit:contributor"] === onlyShowUsername)
const filtered = history.filter(step => !onlyShowUsername || onlyShowUsername?.has(step.tags["_last_edit:contributor"] ))
const diffs: {
key: string;
value?: string;