Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add warning icon for outdated merchants #135

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/map/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,9 @@ ${
? `<span title="Verified within the last year"><svg width='16px' height='16px' class='inline text-primary dark:text-white'>
<use width='16px' height='16px' href="/icons/popup/spritesheet.svg#verified"></use>
</svg></span>`
: ''
: `<span title="Outdated please re-verify"><svg width='16px' height='16px' class='inline text-primary dark:text-white'>
<use width='16px' height='16px' href="/icons/popup/spritesheet.svg#outdated"></use>
</svg></span>`
}`
: '<span title="Not verified">---</span>'
}
Expand Down
16 changes: 16 additions & 0 deletions src/routes/merchant/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
let lnTooltip: HTMLImageElement;
let nfcTooltip: HTMLImageElement;
let verifiedTooltip: HTMLSpanElement;
let outdatedTooltip: HTMLSpanElement;

$: thirdPartyTooltip &&
merchant &&
Expand Down Expand Up @@ -290,6 +291,11 @@
content: 'Verified within the last year'
});

$: outdatedTooltip &&
tippy([outdatedTooltip], {
content: 'Outdated please re-verify'
});

let lat: number | undefined;
let long: number | undefined;

Expand Down Expand Up @@ -701,6 +707,16 @@
type="popup"
/>
</span>
{:else}
<span bind:this={outdatedTooltip}>
<Icon
w="30"
h="30"
style="text-primary dark:text-white mr-2"
icon="outdated"
type="popup"
/>
</span>
{/if}
<strong>{verified[0]}</strong>
</div>
Expand Down
5 changes: 5 additions & 0 deletions static/icons/popup/spritesheet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.