Chore: fix linting errors, obsolete console.logs and typos
This commit is contained in:
parent
e2aaa7d435
commit
0a73b28ee1
4 changed files with 6 additions and 13 deletions
|
@ -84,7 +84,7 @@ export class ReferencingWaysMetaTagger extends SimpleMetaTagger {
|
|||
super({
|
||||
keys: ["_referencing_ways"],
|
||||
isLazy: true,
|
||||
doc: "_referencing_ways contains - for a node - which ways use this this node as point in their geometry. ",
|
||||
doc: "_referencing_ways contains - for a node - which ways use this node as point in their geometry. ",
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
id = $tags.id
|
||||
}
|
||||
|
||||
let txt = new UIEventSource(undefined)
|
||||
let txt: UIEventSource<string> = new UIEventSource(undefined)
|
||||
let _txt: string = undefined
|
||||
txt.addCallbackD((t) => {
|
||||
_txt = t
|
||||
|
|
|
@ -49,13 +49,13 @@ export default class NoteCommentElement extends Combine {
|
|||
user = new Link(comment.user, comment.user_url ?? "", true)
|
||||
}
|
||||
|
||||
let userinfo = Stores.FromPromise(
|
||||
const userinfo = Stores.FromPromise(
|
||||
Utils.downloadJsonCached(
|
||||
"https://api.openstreetmap.org/api/0.6/user/" + comment.uid,
|
||||
24 * 60 * 60 * 1000
|
||||
)
|
||||
)
|
||||
let userImg = new VariableUiElement(
|
||||
const userImg = new VariableUiElement(
|
||||
userinfo.map((userinfo) => {
|
||||
const href = userinfo?.user?.img?.href
|
||||
if (href !== undefined) {
|
||||
|
@ -123,7 +123,7 @@ export default class NoteCommentElement extends Combine {
|
|||
const comments: any[] = JSON.parse(tags.data["comments"])
|
||||
const username = state.osmConnection.userDetails.data.name
|
||||
|
||||
var urlRegex = /(https?:\/\/[^\s]+)/g
|
||||
const urlRegex = /(https?:\/\/[^\s]+)/g
|
||||
const html = txt.replace(urlRegex, function (url) {
|
||||
return '<a href="' + url + '">' + url + "</a>"
|
||||
})
|
||||
|
|
|
@ -11,16 +11,11 @@ import { And } from "../../Logic/Tags/And"
|
|||
import Toggle from "../Input/Toggle"
|
||||
import { Utils } from "../../Utils"
|
||||
import { Tag } from "../../Logic/Tags/Tag"
|
||||
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig"
|
||||
import { Changes } from "../../Logic/Osm/Changes"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { IndexedFeatureSource } from "../../Logic/FeatureSource/FeatureSource"
|
||||
import { Feature } from "geojson"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import Maproulette from "../../Logic/Maproulette"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import Icon from "../Map/Icon.svelte"
|
||||
import { Map } from "maplibre-gl"
|
||||
|
||||
export default class TagApplyButton implements AutoAction, SpecialVisualization {
|
||||
public readonly funcName = "tag_apply"
|
||||
|
@ -177,7 +172,6 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
|||
tags: UIEventSource<Record<string, string>>,
|
||||
args: string[],
|
||||
feature: Feature,
|
||||
_: LayerConfig
|
||||
): BaseUIElement {
|
||||
const tagsToApply = TagApplyButton.generateTagsToApply(args[0], tags)
|
||||
const msg = args[1]
|
||||
|
@ -200,7 +194,6 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
|||
return el
|
||||
})
|
||||
).SetClass("subtle")
|
||||
const self = this
|
||||
const applied = new UIEventSource(
|
||||
tags?.data?.["mr_taskStatus"] !== undefined &&
|
||||
tags?.data?.["mr_taskStatus"] !== "Created"
|
||||
|
@ -210,7 +203,7 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
|||
new Combine([msg, tagsExplanation]).SetClass("flex flex-col")
|
||||
).onClick(async () => {
|
||||
applied.setData(true)
|
||||
await self.applyActionOn(feature, state, tags, args)
|
||||
await this.applyActionOn(feature, state, tags, args)
|
||||
})
|
||||
|
||||
return new Toggle(
|
||||
|
|
Loading…
Reference in a new issue