Skip to content

Commit

Permalink
Revert "Revert "Merge branch 'main' of https://github.com/teambtcmap/…
Browse files Browse the repository at this point in the history
…btcmap.org""

This reverts commit 3b1252f.
  • Loading branch information
dadofsambonzuki committed Apr 24, 2023
1 parent 3b1252f commit fc738ab
Show file tree
Hide file tree
Showing 68 changed files with 1,669 additions and 431 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Tagger profile badges by [AndrejCibik](https://twitter.com/AndrejCibik)

<a href="https://www.flaticon.com/free-icons/satoshi-nakamoto" title="satoshi nakamoto icons">Satoshi nakamoto icons created by Vitaly Gorbachev - Flaticon</a>

Treasure Chest icon by [Bonsaiheldin](https://opengameart.org/content/treasure-chests-32x32)

---

![Untitled](https://user-images.githubusercontent.com/85003930/194117128-2f96bafd-2379-407a-a584-6c03396a42cc.png)
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,39 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "1.12.0",
"@sveltejs/kit": "1.15.7",
"autoprefixer": "^10.4.14",
"eslint": "^8.37.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-svelte3": "^4.0.0",
"postcss": "^8.4.21",
"prettier": "^2.8.4",
"prettier-plugin-svelte": "^2.9.0",
"svelte": "^3.57.0",
"postcss": "^8.4.23",
"prettier": "^2.8.7",
"prettier-plugin-svelte": "^2.10.0",
"svelte": "^3.58.0",
"svelte-preprocess": "^5.0.3",
"tailwindcss": "^3.2.7",
"vite": "^4.2.0"
"tailwindcss": "^3.3.1",
"vite": "^4.3.1"
},
"type": "module",
"dependencies": {
"@fortawesome/fontawesome-free": "^6.3.0",
"@fortawesome/fontawesome-free": "^6.4.0",
"@lottiefiles/svelte-lottie-player": "^0.3.0",
"@mapbox/geojson-rewind": "^0.5.2",
"@zerodevx/svelte-toast": "^0.9.2",
"axios": "1.3.4",
"@zerodevx/svelte-toast": "^0.9.3",
"axios": "1.3.6",
"axios-retry": "^3.4.0",
"chart.js": "^4.2.1",
"d3-geo": "^3.1.0",
"dompurify": "^3.0.1",
"dompurify": "^3.0.2",
"js-confetti": "^0.11.0",
"leaflet": "^1.9.3",
"leaflet.featuregroup.subgroup": "^1.0.2",
"leaflet.locatecontrol": "^0.79.0",
"leaflet.markercluster": "^1.5.3",
"localforage": "^1.10.0",
"marked": "^4.2.12",
"prettier-plugin-tailwindcss": "^0.2.5",
"qrcode": "^1.5.1",
"marked": "^4.3.0",
"prettier-plugin-tailwindcss": "^0.2.7",
"qrcode": "^1.5.3",
"svelte-outclick": "^3.5.0",
"svelte-time": "^0.7.1",
"svg-captcha": "^1.4.0",
Expand Down
13 changes: 13 additions & 0 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ html {
background-image: url('/icons/boosted-icon-pin.svg');
}

.treasure-icon {
background-image: url('/icons/treasure-icon.png');
}

.center {
position: absolute;
top: 50%;
Expand All @@ -54,3 +58,12 @@ html {
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}

.center-fixed {
position: fixed;
top: 50%;
left: 50%;
-moz-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
5 changes: 2 additions & 3 deletions src/components/AboutMerchant.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import { Icon } from '$comp';
import tippy from 'tippy.js';
export let lat;
export let long;
export let id;
export let icon;
export let tooltip;
Expand All @@ -19,7 +18,7 @@

<a
bind:this={merchantTooltip}
href="/map?lat={lat}&long={long}"
href="/merchant/{id}"
class="flex h-24 w-24 items-center justify-center rounded-full bg-bitcoin hover:animate-wiggle"
>
<Icon
Expand Down
2 changes: 1 addition & 1 deletion src/components/BadgeCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
>
{#if type === 'contribution'}
<div
class="absolute top-5 -right-2 w-20 rounded-full bg-white py-2 font-semibold text-link shadow-lg dark:bg-white/[0.15]"
class="absolute -right-2 top-5 w-20 rounded-full bg-white py-2 font-semibold text-link shadow-lg dark:bg-white/[0.15]"
>
+{desc}
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Boost.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
<OutClick excludeQuerySelectorAll={['#boost-button']} on:outclick={closeModal}>
<div
transition:fly={{ y: 200, duration: 300 }}
class="center z-[2000] max-h-[90vh] w-[90vw] overflow-auto rounded-xl border border-mapBorder bg-white p-6 shadow-2xl dark:bg-dark md:w-[430px]"
class="center-fixed z-[2000] max-h-[90vh] w-[90vw] overflow-auto rounded-xl border border-mapBorder bg-white p-6 text-left shadow-2xl dark:bg-dark md:w-[430px]"
>
<CloseButton
position="flex justify-end"
Expand Down Expand Up @@ -171,7 +171,7 @@
</button>
</div>

<div class="space-y-2 md:flex md:space-y-0 md:space-x-2">
<div class="space-y-2 md:flex md:space-x-2 md:space-y-0">
{#each values as value}
<button
on:click={() => {
Expand All @@ -195,7 +195,7 @@
: 'border-mapBorder text-primary dark:text-white'} text-center transition-colors hover:border-link hover:text-link dark:hover:text-link"
>
{#if value.time === 3}
<img src="/icons/star.svg" alt="star" class="absolute top-1 right-1" />
<img src="/icons/star.svg" alt="star" class="absolute right-1 top-1" />
{/if}

<p>${value.fiat}</p>
Expand Down Expand Up @@ -299,7 +299,7 @@
<a
href="https://twitter.com/share?text=I just boosted {$boost.name
? $boost.name.replaceAll('&', '%26')
: 'this location'} on @btcmap. Check them out!&url=https://btcmap.org/map?lat={$boost.lat}%26long={$boost.long}&hashtags=bitcoin"
: 'this location'} on @btcmap. Check them out!&url=https://btcmap.org/merchant/{$boost.id}&hashtags=bitcoin"
target="_blank"
rel="noreferrer"
class="mx-auto flex w-[200px] items-center justify-center rounded-xl bg-twitter py-3 text-white"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CommunityLeaderboardSkeleton.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="animate-pulse grid-cols-6 border-b border-link/50 py-5 text-center lg:grid">
<!-- position placeholder -->
<span class="my-auto mx-auto block h-5 w-5 animate-pulse rounded-full bg-link/50 lg:inline" />
<span class="mx-auto my-auto block h-5 w-5 animate-pulse rounded-full bg-link/50 lg:inline" />

<!-- avatar and name placeholder -->
<div class="my-5 lg:my-0">
Expand Down
2 changes: 1 addition & 1 deletion src/components/DonationOption.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/>
</h3>
<div
class="mx-auto flex w-full items-center justify-between rounded-xl bg-lightBlue py-4 px-4 text-body dark:bg-white/[0.15] dark:text-white md:w-[475px] md:justify-center md:space-x-4 md:py-3 md:px-0"
class="mx-auto flex w-full items-center justify-between rounded-xl bg-lightBlue px-4 py-4 text-body dark:bg-white/[0.15] dark:text-white md:w-[475px] md:justify-center md:space-x-4 md:px-0 md:py-3"
>
<!-- value -->
<span class="hidden lowercase md:block"
Expand Down
5 changes: 3 additions & 2 deletions src/components/LatestTagger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export let latest;
export let lat;
export let long;
export let merchantId;
$: profile = user['osm_json'] && user['osm_json'];
$: regexMatch = profile && profile.description.match('(lightning:[^)]+)');
Expand All @@ -18,7 +19,7 @@
</script>

<div
class="items-center space-y-2 p-5 text-center text-xl lg:flex lg:space-y-0 lg:space-x-5 lg:text-left"
class="items-center space-y-2 p-5 text-center text-xl lg:flex lg:space-x-5 lg:space-y-0 lg:text-left"
>
<!-- dot -->
<span class="relative mx-auto mb-2 flex h-3 w-3 lg:mx-0 lg:mb-0">
Expand Down Expand Up @@ -48,7 +49,7 @@
<a
href={action === 'delete'
? `https://www.openstreetmap.org/#map=21/${lat}/${long}`
: `/map?lat=${lat}&long=${long}`}
: `/merchant/${merchantId}`}
target={action === 'delete' ? '_blank' : '_self'}
rel="noreferrer"
class="break-all text-link transition-colors hover:text-hover"
Expand Down
2 changes: 1 addition & 1 deletion src/components/LeaderboardItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</script>

<div
class="grid-cols-6 space-y-5 border-t border-b border-statBorder py-5 text-center text-lg font-semibold lg:grid lg:space-y-0 lg:border-none lg:py-0"
class="grid-cols-6 space-y-5 border-b border-t border-statBorder py-5 text-center text-lg font-semibold lg:grid lg:space-y-0 lg:border-none lg:py-0"
>
<span
class="my-auto text-link {position > 3
Expand Down
6 changes: 3 additions & 3 deletions src/components/LeaderboardSkeleton.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div
class="animate-pulse grid-cols-6 space-y-5 border-t border-b border-link/50 py-5 text-center lg:grid lg:space-y-0 lg:border-none lg:py-0"
class="animate-pulse grid-cols-6 space-y-5 border-b border-t border-link/50 py-5 text-center lg:grid lg:space-y-0 lg:border-none lg:py-0"
>
<!-- position placeholder -->
<span class="my-auto mx-auto block h-5 w-5 animate-pulse rounded-full bg-link/50 lg:inline" />
<span class="mx-auto my-auto block h-5 w-5 animate-pulse rounded-full bg-link/50 lg:inline" />

<!-- avatar and username placeholder -->
<div class="items-center space-y-2 lg:flex lg:space-y-0 lg:space-x-2">
<div class="items-center space-y-2 lg:flex lg:space-x-2 lg:space-y-0">
<!-- avatar -->
<span
class="mx-auto block h-20 w-20 animate-pulse rounded-full bg-link/50 lg:mx-0 lg:inline lg:h-14 lg:w-14"
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapLoading.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
{:else if type === 'embed'}
<div
class="w-full {style} absolute top-0 left-0 z-[10000] flex items-center justify-center bg-teal dark:bg-dark"
class="w-full {style} absolute left-0 top-0 z-[10000] flex items-center justify-center bg-teal dark:bg-dark"
>
<div class="space-y-6">
<LoadingSpinner color="text-link" />
Expand Down
17 changes: 17 additions & 0 deletions src/components/MerchantButton.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script>
export let click;
export let icon;
export let text;
</script>

<button
on:click={click}
class="flex h-20 w-24 items-center justify-center rounded-lg border border-primary py-1 !text-primary transition-colors hover:border-link hover:!text-link dark:border-mapBorder dark:!text-white dark:hover:border-link dark:hover:!text-link"
>
<div>
<svg width="30px" height="30px" class="mx-auto">
<use width="30px" height="30px" href="/icons/popup/spritesheet.svg#{icon}" />
</svg>
<span class="mt-1 block text-center text-xs font-semibold">{text}</span>
</div>
</button>
72 changes: 72 additions & 0 deletions src/components/MerchantEvent.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<script>
import Time from 'svelte-time';
import { Tip } from '$comp';
export let action;
export let user;
export let time;
export let latest;
$: profile = user['osm_json'] && user['osm_json'];
$: regexMatch = profile && profile.description.match('(lightning:[^)]+)');
$: lightning = regexMatch && regexMatch[0].slice(10);
$: username = profile ? profile['display_name'] : user;
</script>

<div
class="items-center space-y-2 p-5 text-center text-xl lg:flex lg:space-x-5 lg:space-y-0 lg:text-left"
>
<!-- dot -->
<span class="relative mx-auto mb-2 flex h-3 w-3 lg:mx-0 lg:mb-0">
<span
class="{latest
? 'animate-ping'
: ''} absolute inline-flex h-full w-full rounded-full {action === 'create'
? 'bg-created'
: action === 'delete'
? 'bg-deleted'
: 'bg-link'} opacity-75"
/>
<span
class="relative inline-flex h-3 w-3 rounded-full {action === 'create'
? 'bg-created'
: action === 'delete'
? 'bg-deleted'
: 'bg-link'}"
/>
</span>

<div class="w-full flex-wrap items-center justify-between space-y-2 lg:flex lg:space-y-0">
<!-- event information -->
<div class="space-y-2 lg:space-y-0">
<span class="text-primary dark:text-white lg:mr-5">
<!-- action -->
<strong>{action.charAt(0).toUpperCase() + action.slice(1, action.length)}d</strong>

<!-- user -->
{#if username.length}
by <a
href="/tagger/{user.id}"
class="block break-all text-link transition-colors hover:text-hover lg:inline"
>{username}
</a>
{/if}
</span>

<!-- time ago -->
<span
class="block text-center font-semibold text-taggerTime lg:inline {lightning
? 'lg:mr-5'
: ''}"
>
<Time live={3000} relative timestamp={time} />
</span>
</div>

<!-- lightning tip button -->
{#if lightning}
<Tip destination={lightning} style="block lg:inline mx-auto lg:mx-0" />
{/if}
</div>
</div>
19 changes: 19 additions & 0 deletions src/components/MerchantLink.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script>
export let link;
export let icon;
export let text;
</script>

<a
href={link}
target="_blank"
rel="noreferrer"
class="flex h-20 w-24 items-center justify-center rounded-lg border border-primary py-1 !text-primary transition-colors hover:border-link hover:!text-link dark:border-mapBorder dark:!text-white dark:hover:border-link dark:hover:!text-link"
>
<div>
<svg width="30px" height="30px" class="mx-auto">
<use width="30px" height="30px" href="/icons/popup/spritesheet.svg#{icon}" />
</svg>
<span class="mt-1 block text-center text-xs font-semibold">{text}</span>
</div>
</a>
2 changes: 1 addition & 1 deletion src/components/NavDropdownDesktop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
excludeQuerySelectorAll={[`#dropdown-${title.toLowerCase()}`]}
on:outclick={() => (show = false)}
>
<div class="absolute top-8 right-0 w-[185px] rounded-2xl shadow-lg">
<div class="absolute right-0 top-8 w-[185px] rounded-2xl shadow-lg">
{#each links as link}
<a
href={link.url}
Expand Down
6 changes: 3 additions & 3 deletions src/components/OpenTicket.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div
class="w-full items-center justify-between space-y-1 border-t border-t-statBorder p-5 text-center md:flex md:space-y-0 md:text-left"
>
<div class="items-center space-y-1 md:flex md:space-y-0 md:space-x-2">
<div class="items-center space-y-1 md:flex md:space-x-2 md:space-y-0">
<i class="fa-solid fa-ticket text-xl text-link" />

<div>
Expand Down Expand Up @@ -50,10 +50,10 @@
</div>
</div>

<div class="space-y-1 md:flex md:space-y-0 md:space-x-2">
<div class="space-y-1 md:flex md:space-x-2 md:space-y-0">
<div class="flex flex-wrap justify-center md:justify-start">
{#each assignees as assignee}
<a href={assignee.html_url} target="_blank" rel="noreferrer" class="mr-1 mb-1">
<a href={assignee.html_url} target="_blank" rel="noreferrer" class="mb-1 mr-1">
<img
src={assignee.avatar_url}
alt="avatar"
Expand Down
4 changes: 2 additions & 2 deletions src/components/OpenTicketSkeleton.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div
class="w-full items-center justify-between space-y-1 border-t border-t-statBorder p-5 text-center md:flex md:space-y-0 md:text-left"
>
<div class="items-center space-y-1 md:flex md:space-y-0 md:space-x-2">
<div class="items-center space-y-1 md:flex md:space-x-2 md:space-y-0">
<i class="fa-solid fa-ticket animate-pulse text-xl text-link/50" />

<div>
<span class="mr-1 inline-block h-6 w-32 animate-pulse rounded bg-link/50" />

<span class="block items-center md:inline-flex">
<span
class="mr-1 mb-1 inline-block h-7 w-20 animate-pulse rounded-full border border-link bg-link/25 p-1"
class="mb-1 mr-1 inline-block h-7 w-20 animate-pulse rounded-full border border-link bg-link/25 p-1"
/>
</span>

Expand Down

0 comments on commit fc738ab

Please sign in to comment.