diff --git a/src/lib/map/setup.ts b/src/lib/map/setup.ts index 3665ad3..a8f156e 100644 --- a/src/lib/map/setup.ts +++ b/src/lib/map/setup.ts @@ -676,11 +676,16 @@ export const generateMarker = ( const verified = verifiedArr(element); + const thirdParty = + element.tags?.['payment:lightning:requires_companion_app'] === 'yes' && + element.tags['payment:lightning:companion_app_url']; + const paymentMethod = element.tags && (element.tags['payment:onchain'] || element.tags['payment:lightning'] || - element.tags['payment:lightning_contactless']); + element.tags['payment:lightning_contactless'] || + thirdParty); const popupContainer = L.DomUtil.create('div'); @@ -886,6 +891,12 @@ ${ Payment Methods
+ ${ + thirdParty + ? ` + + ` + : ` + : 'Lightning contactless unknown' + }"/>` + }
` : '' diff --git a/src/routes/merchant/[id]/+page.svelte b/src/routes/merchant/[id]/+page.svelte index 39a5d1b..f29da4d 100644 --- a/src/routes/merchant/[id]/+page.svelte +++ b/src/routes/merchant/[id]/+page.svelte @@ -119,11 +119,16 @@ instagram = merchant.osm_json.tags?.instagram || merchant.osm_json.tags?.['contact:instagram']; facebook = merchant.osm_json.tags?.facebook || merchant.osm_json.tags?.['contact:facebook']; + thirdParty = + merchant.osm_json.tags?.['payment:lightning:requires_companion_app'] === 'yes' && + merchant.osm_json.tags['payment:lightning:companion_app_url']; + paymentMethod = merchant.osm_json.tags && (merchant.osm_json.tags['payment:onchain'] || merchant.osm_json.tags['payment:lightning'] || - merchant.osm_json.tags['payment:lightning_contactless']); + merchant.osm_json.tags['payment:lightning_contactless'] || + thirdParty); lat = latCalc(merchant['osm_json']); long = longCalc(merchant['osm_json']); @@ -230,13 +235,21 @@ let instagram: string | undefined; let facebook: string | undefined; + let thirdParty: boolean | undefined; let paymentMethod: string | undefined; + let thirdPartyTooltip: HTMLAnchorElement; let onchainTooltip: HTMLImageElement; let lnTooltip: HTMLImageElement; let nfcTooltip: HTMLImageElement; let verifiedTooltip: HTMLSpanElement; + $: thirdPartyTooltip && + merchant && + tippy([thirdPartyTooltip], { + content: 'Third party app required' + }); + $: onchainTooltip && merchant && tippy([onchainTooltip], { @@ -267,7 +280,7 @@ ? 'Lightning Contactless accepted' : merchant.osm_json.tags?.['payment:lightning_contactless'] === 'no' ? 'Lightning contactless not accepted' - : 'Lightning Contactless unknown' + : 'Lightning contactless unknown' }); $: verifiedTooltip && @@ -551,7 +564,19 @@

Accepted Payments

- {#if typeof window !== 'undefined'} + {#if thirdParty} + + + + + {:else if typeof window !== 'undefined'}