Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Dec 14, 2023
1 parent 4d58632 commit 59f0b9b
Show file tree
Hide file tree
Showing 19 changed files with 159 additions and 159 deletions.
8 changes: 4 additions & 4 deletions src/components/DashboardStat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
class="{percent === '+0'
? 'text-primary dark:text-white'
: percent.startsWith('+')
? 'text-statPositive'
: 'text-statNegative'} ml-1 text-lg font-semibold"
? 'text-statPositive'
: 'text-statNegative'} ml-1 text-lg font-semibold"
>{percent === '+0' ? percent.slice(1) : percent}%</span
>
{:else if change}
<span
class="{change === '+0'
? 'text-primary dark:text-white'
: change.startsWith('+')
? 'text-statPositive'
: 'text-statNegative'} ml-1 text-lg font-semibold">{change}</span
? 'text-statPositive'
: 'text-statNegative'} ml-1 text-lg font-semibold">{change}</span
>
{/if}
{:else}
Expand Down
8 changes: 4 additions & 4 deletions src/components/LatestTagger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
: ''} absolute inline-flex h-full w-full rounded-full {action === 'create'
? 'bg-created'
: action === 'delete'
? 'bg-deleted'
: 'bg-link'} opacity-75"
? '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'}"
? 'bg-deleted'
: 'bg-link'}"
/>
</span>

Expand Down
4 changes: 2 additions & 2 deletions src/components/LeaderboardItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
class="mr-1 inline-block h-3 w-3 rounded-full {stat.title === 'C'
? 'bg-created'
: stat.title === 'U'
? 'bg-link'
: 'bg-deleted'} lg:hidden"
? 'bg-link'
: 'bg-deleted'} lg:hidden"
/>{stat.stat}
</span>
{/each}
Expand Down
8 changes: 4 additions & 4 deletions src/components/MerchantEvent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
: ''} absolute inline-flex h-full w-full rounded-full {action === 'create'
? 'bg-created'
: action === 'delete'
? 'bg-deleted'
: 'bg-link'} opacity-75"
? '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'}"
? 'bg-deleted'
: 'bg-link'}"
/>
</span>

Expand Down
4 changes: 2 additions & 2 deletions src/components/NavDropdownDesktop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
top
? 'rounded-t-2xl'
: link.icon === bottom
? 'rounded-b-2xl'
: ''} transition-colors"
? 'rounded-b-2xl'
: ''} transition-colors"
>
{link.title}
{#if link.external}
Expand Down
8 changes: 4 additions & 4 deletions src/components/ProfileActivity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
: ''} absolute inline-flex h-full w-full rounded-full {action === 'create'
? 'bg-created'
: action === 'delete'
? 'bg-deleted'
: 'bg-link'} opacity-75"
? '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'}"
? 'bg-deleted'
: 'bg-link'}"
/>
</span>

Expand Down
62 changes: 31 additions & 31 deletions src/lib/map/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ export const generateMarker = (
element.tags && element.tags.name
? `<a href='/merchant/${element.type}:${
element.id
}' class='inline-block font-bold text-lg leading-snug max-w-[300px]' title='Merchant name'><span class='!text-link hover:!text-hover transition-colors'>${
}' class='inline-block font-bold text-lg leading-snug max-w-[300px]' title='Merchant name'><span class='!text-link hover:!text-hover transition-colors'>${
element.tags.name
}</span> ${description || note ? `<span id='info' title='Information'></span>` : ''}</a>`
}</span> ${description || note ? `<span id='info' title='Information'></span>` : ''}</a>`
: ''
}
Expand Down Expand Up @@ -747,11 +747,11 @@ export const generateMarker = (
payment.type === 'uri'
? payment.url
: payment.type === 'pouch'
? `https://app.pouch.ph/${payment.username}`
: payment.type === 'coinos'
? `https://coinos.io/${payment.username}`
: '#'
}" target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
? `https://app.pouch.ph/${payment.username}`
: payment.type === 'coinos'
? `https://coinos.io/${payment.username}`
: '#'
}" target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
<svg width='24px' height='24px' class='mr-2'>
<use width='24px' height='24px' href="/icons/popup/spritesheet.svg#bolt"></use>
</svg>
Expand Down Expand Up @@ -786,7 +786,7 @@ export const generateMarker = (
website
? `<a href=${
website.startsWith('http') ? website : `https://${website}`
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
<svg width='24px' height='24px' class='mr-2'>
<use width='24px' height='24px' href="/icons/popup/spritesheet.svg#globe"></use>
</svg>
Expand All @@ -799,7 +799,7 @@ export const generateMarker = (
twitter
? `<a href=${
twitter.startsWith('http') ? twitter : `https://twitter.com/${twitter}`
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
<svg width='24px' height='24px' class='mr-2'>
<use width='24px' height='24px' href="/icons/popup/spritesheet.svg#twitter"></use>
</svg>
Expand All @@ -814,7 +814,7 @@ export const generateMarker = (
instagram.startsWith('http')
? instagram
: `https://instagram.com/${instagram}`
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
<svg width='24px' height='24px' class='mr-2'>
<use width='24px' height='24px' href="/icons/popup/spritesheet.svg#instagram"></use>
</svg>
Expand All @@ -827,7 +827,7 @@ export const generateMarker = (
facebook
? `<a href=${
facebook.startsWith('http') ? facebook : `https://facebook.com/${facebook}`
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
} target="_blank" rel="noreferrer" class='flex items-center !text-primary dark:!text-white hover:!text-link dark:hover:!text-link text-xs transition-colors'>
<svg width='24px' height='24px' class='mr-2'>
<use width='24px' height='24px' href="/icons/popup/spritesheet.svg#facebook"></use>
</svg>
Expand Down Expand Up @@ -889,18 +889,18 @@ ${
? '/icons/btc-highlight-dark.svg'
: '/icons/btc-highlight.svg'
: element.tags && element.tags['payment:onchain'] === 'no'
? theme === 'dark'
? theme === 'dark'
? '/icons/btc-no-dark.svg'
: '/icons/btc-no.svg'
: theme === 'dark'
? '/icons/btc-dark.svg'
: '/icons/btc.svg'
: theme === 'dark'
? '/icons/btc-dark.svg'
: '/icons/btc.svg'
} alt="bitcoin" class="w-6 h-6" title="${
element.tags && element.tags['payment:onchain'] === 'yes'
? 'On-chain accepted'
: element.tags && element.tags['payment:onchain'] === 'no'
? 'On-chain not accepted'
: 'On-chain unknown'
? 'On-chain not accepted'
: 'On-chain unknown'
}"/>
<img src=${
Expand All @@ -909,18 +909,18 @@ ${
? '/icons/ln-highlight-dark.svg'
: '/icons/ln-highlight.svg'
: element.tags && element.tags['payment:lightning'] === 'no'
? theme === 'dark'
? theme === 'dark'
? '/icons/ln-no-dark.svg'
: '/icons/ln-no.svg'
: theme === 'dark'
? '/icons/ln-dark.svg'
: '/icons/ln.svg'
: theme === 'dark'
? '/icons/ln-dark.svg'
: '/icons/ln.svg'
} alt="lightning" class="w-6 h-6" title="${
element.tags && element.tags['payment:lightning'] === 'yes'
? 'Lightning accepted'
: element.tags && element.tags['payment:lightning'] === 'no'
? 'Lightning not accepted'
: 'Lightning unknown'
? 'Lightning not accepted'
: 'Lightning unknown'
}"/>
<img src=${
Expand All @@ -929,18 +929,18 @@ ${
? '/icons/nfc-highlight-dark.svg'
: '/icons/nfc-highlight.svg'
: element.tags && element.tags['payment:lightning_contactless'] === 'no'
? theme === 'dark'
? theme === 'dark'
? '/icons/nfc-no-dark.svg'
: '/icons/nfc-no.svg'
: theme === 'dark'
? '/icons/nfc-dark.svg'
: '/icons/nfc.svg'
: theme === 'dark'
? '/icons/nfc-dark.svg'
: '/icons/nfc.svg'
} alt="nfc" class="w-6 h-6" title="${
element.tags && element.tags['payment:lightning_contactless'] === 'yes'
? 'Lightning Contactless accepted'
: element.tags && element.tags['payment:lightning_contactless'] === 'no'
? 'Lightning contactless not accepted'
: 'Lightning Contactless unknown'
? 'Lightning contactless not accepted'
: 'Lightning Contactless unknown'
}"/>
</div>
</div>`
Expand All @@ -958,15 +958,15 @@ ${
<use width='16px' height='16px' href="/icons/popup/spritesheet.svg#verified"></use>
</svg></span>`
: ''
}`
}`
: '<span title="Not verified">---</span>'
}
</span>
${
verify
? `<a href="/verify-location?id=${
element.type + ':' + element.id
}" class='!text-link hover:!text-hover text-xs transition-colors' title="Help improve the data for everyone">Verify Location</a>`
}" class='!text-link hover:!text-hover text-xs transition-colors' title="Help improve the data for everyone">Verify Location</a>`
: ''
}
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/routes/add-location/endpoint/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ If you are a new contributor please read our Tagging Instructions [here](https:/
country && communities.length
? [...standardLabels, country, ...communities]
: country
? [...standardLabels, country]
: communities.length
? [...standardLabels, ...communities]
: [...standardLabels]
? [...standardLabels, country]
: communities.length
? [...standardLabels, ...communities]
: [...standardLabels]
},
{ headers }
)
Expand Down
2 changes: 1 addition & 1 deletion src/routes/communities/leaderboard/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
area.tags.continent &&
Object.keys(area.tags).find((key) => key.includes('contact')) &&
$reports.find((report) => report.area_id === area.id)
)
)
: [];
$: communityReports =
communities && communities.length
Expand Down
38 changes: 19 additions & 19 deletions src/routes/community/[area]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,10 @@
let payment = element.tags['payment:uri']
? { type: 'uri', url: element.tags['payment:uri'] }
: element.tags['payment:pouch']
? { type: 'pouch', username: element.tags['payment:pouch'] }
: element.tags['payment:coinos']
? { type: 'coinos', username: element.tags['payment:coinos'] }
: undefined;
? { type: 'pouch', username: element.tags['payment:pouch'] }
: element.tags['payment:coinos']
? { type: 'coinos', username: element.tags['payment:coinos'] }
: undefined;
let boosted =
element.tags['boost:expires'] && Date.parse(element.tags['boost:expires']) > Date.now()
? element.tags['boost:expires']
Expand Down Expand Up @@ -627,7 +627,7 @@
: [
[community['box:south'], community['box:west']],
[community['box:north'], community['box:east']]
]
]
);
mapLoaded = true;
Expand Down Expand Up @@ -664,13 +664,13 @@
tickets && tickets.length && !ticketError
? tickets.filter((issue: any) =>
issue.labels.find((label: any) => label.name === 'location-submission')
)
)
: [];
const verify =
tickets && tickets.length && !ticketError
? tickets.filter((issue: any) =>
issue.labels.find((label: any) => label.name === 'verify-submission')
)
)
: [];
const totalTickets = add.length + verify.length;
Expand Down Expand Up @@ -891,16 +891,16 @@
class="fa-solid fa-earth-{continent === 'africa'
? 'africa'
: continent === 'asia'
? 'asia'
: continent === 'europe'
? 'europe'
: continent === 'north-america'
? 'americas'
: continent === 'oceania'
? 'oceania'
: continent === 'south-america'
? 'americas'
: ''}"
? 'asia'
: continent === 'europe'
? 'europe'
: continent === 'north-america'
? 'americas'
: continent === 'oceania'
? 'oceania'
: continent === 'south-america'
? 'americas'
: ''}"
/>
</h2>
{:else}
Expand Down Expand Up @@ -1197,8 +1197,8 @@
'Add'
? 'rounded-t md:rounded-l md:rounded-tr-none'
: type === 'Verify'
? 'rounded-b md:rounded-r md:rounded-bl-none'
: ''} {showType === type ? 'bg-link text-white' : ''} transition-colors"
? 'rounded-b md:rounded-r md:rounded-bl-none'
: ''} {showType === type ? 'bg-link text-white' : ''} transition-colors"
on:click={() => (showType = type)}>{type}</button
>
{/each}
Expand Down
Loading

0 comments on commit 59f0b9b

Please sign in to comment.