Skip to content

Commit

Permalink
Merge pull request #7052 from kodadot/main
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwao authored Aug 30, 2023
2 parents 2e4d795 + ddf2ed4 commit edd57ab
Show file tree
Hide file tree
Showing 119 changed files with 2,556 additions and 2,306 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#### Community participation

- [ ] [Are you at KodaDot Discord?](https://discord.gg/35hzy2dXXh)
- [ ] [Are you at KodaDot Ecosystem Telegram?](https://t.me/kodadot_eco)

## Screenshot 📸

Expand Down
37 changes: 25 additions & 12 deletions ACTIVITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,36 +52,46 @@ flowchart TD
[![Top contributors](https://images.repography.com/23713223/kodadot/nft-gallery/top-contributors/1nMiB_aZjymZHZUDQ6R3hWGHqWUWahnU6VdRYYv2InU/ygTelP2NVzMzr-XPmCeXq2GzAIHSFlcUsZDXKY3Qrl4_table.svg)](https://github.com/kodadot/nft-gallery/graphs/contributors)


### RepoTracker
RepoTracker
---

[Peak on recent activity over KodaDot](https://repo-tracker.com/r/gh/kodadot/nft-gallery)

![image](https://user-images.githubusercontent.com/5887929/232563230-85fcda10-2cd8-46a2-b4aa-a0f1261a0660.png)
![image](https://github.com/kodadot/nft-gallery/assets/5887929/7c8db5f6-3c8b-40c1-a6e8-fa5e0155227c)

![image](https://github.com/kodadot/nft-gallery/assets/5887929/75a99f4c-54c0-4848-955a-828ba82ab401)

![image](https://user-images.githubusercontent.com/5887929/232563299-39e84aa1-19c8-4031-9488-6813f74f65f3.png)
![image](https://github.com/kodadot/nft-gallery/assets/5887929/1611f8f3-21aa-4f52-a9a8-f4166d8619ab)

### Axiom - Repobeats
![image](https://github.com/kodadot/nft-gallery/assets/5887929/1e7a6ffa-f938-4c08-97cf-98e89eee1e13)

Axiom - Repobeats
---

![Alt](https://repobeats.axiom.co/api/embed/0fb5819705db8bf2be040d140b66f04aaf529a30.svg "Repobeats analytics image")


### Crowd.dev - AnalyzeMyRepo
Crowd.dev - AnalyzeMyRepo
---

[Verbose version from AnalyzeMyRepo](https://analyzemyrepo.com/analyze/kodadot/nft-gallery)

## We're constantly growing!
We're constantly growing
---

[![Contributors Over Time](https://contributor-overtime-api.git-contributor.com/contributors-svg?chart=contributorOverTime&repo=kodadot/nft-gallery)](https://git-contributor.com?chart=contributorOverTime&repo=kodadot/nft-gallery)

[![Monthly Active Contributors](https://contributor-overtime-api.git-contributor.com/contributors-svg?chart=contributorMonthlyActivity&repo=kodadot/nft-gallery)](https://git-contributor.com?chart=contributorMonthlyActivity&repo=kodadot/nft-gallery)

## Recent Contributors ✨
Recent Contributors ✨
---

<img src="https://contrib.rocks/image?repo=kodadot/nft-gallery" />

Check out KodaDot's [monthly statistics](https://github.com/kodadot/nft-gallery/pulse/monthly) and each contributors [activity]((https://github.com/kodadot/nft-gallery/graphs/contributors))

## Brief code structure
Brief code structure
---

![Visualization of this repo](.github/diagram.svg)
[Interactive visualization](https://octo-repo-visualization.vercel.app/?repo=kodadot%2Fnft-gallery)
Expand All @@ -90,20 +100,23 @@ Check out KodaDot's [monthly statistics](https://github.com/kodadot/nft-gallery/
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/kodadot/nft-gallery.svg)](http://isitmaintained.com/project/kodadot/nft-gallery "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/kodadot/nft-gallery.svg)](http://isitmaintained.com/project/kodadot/nft-gallery "Percentage of issues still open") -->

## Open Bounties sorted by bounty size
Open Bounties sorted by bounty size
---

[![Rewards](https://flat.badgen.net/github/label-issues/kodadot/nft-gallery/$/open?scale=2)](https://github.com/kodadot/nft-gallery/issues?q=is%3Aopen+is%3Aissue+label%3A%24)
[![Rewards](https://flat.badgen.net/github/label-issues/kodadot/nft-gallery/$$/open?scale=2)](https://github.com/kodadot/nft-gallery/issues?q=is%3Aopen+is%3Aissue+label%3A%24%24+)
[![Rewards](https://flat.badgen.net/github/label-issues/kodadot/nft-gallery/$$$/open?scale=2)](https://github.com/kodadot/nft-gallery/issues?q=is%3Aopen+is%3Aissue+label%3A%24%24%24+)
[![Rewards](https://flat.badgen.net/github/label-issues/kodadot/nft-gallery/$$$$/open?scale=2)](https://github.com/kodadot/nft-gallery/issues?q=is%3Aopen+is%3Aissue+label%3A%24%24%24%24+)
[![Rewards](https://flat.badgen.net/github/label-issues/kodadot/nft-gallery/$$$$$/open?scale=2)](https://github.com/kodadot/nft-gallery/issues?q=is%3Aopen+is%3Aissue+label%3A%24%24%24%24%24+)

## Star history
Star history
---

[![Star History Chart](https://api.star-history.com/svg?repos=kodadot/nft-gallery&type=Date)](https://star-history.com/#kodadot/nft-gallery&Date)

### New Issues and pull requests
- https://www.repotrends.com/kodadot/nft-gallery
New Issues and pull requests in KodaDot
--
- [repotrends.com/kodadot/nft-gallery](https://www.repotrends.com/kodadot/nft-gallery)

![image](https://user-images.githubusercontent.com/5887929/232562963-f7f42c34-89ea-4783-8dad-a426dd91c262.png)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If everything goes well, chances that you will be **rewarded are high**.

We might give retro-active reward, where the bounty label wasn't present, **if we like your contribution.**

**For better coordination, please join our [Development channel (#coordination) on Discord](https://discord.gg/4CeHXamhqB)**
**For better coordination, please join our [Development channel (#coordination) on [KodaDot Ecosystem Telegram](https://t.me/kodadot_eco)**

## Getting started

Expand Down
4 changes: 2 additions & 2 deletions HIRING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can [check recent issues by labels **p1** or **p2**](https://github.com/koda

Once you've crossed **10-20 merged pull requests**, which were successfully merged to the upstream `main` branch, you will be **eligible to join our closer team**.

Feel free to reach out `yangwao` on our Discord.
Feel free to reach out `yangwao` on our [KodaDot Ecosystem Telegram](https://t.me/kodadot_eco).
We are happy to give you **one or two long-term tasks** to see how you can tackle more challenging and complex issues.

### Reasoning
Expand All @@ -57,4 +57,4 @@ Landing job at KodaDot could result getting payroll on range between **40k-160k$

#### Questions?

Head's up to our [Discord - channel #jobs](https://dsc.gg/kodadot)
Head's up to our [KodaDot Ecosystem Telegram](https://t.me/kodadot_eco) ~~[Discord - channel #jobs](https://dsc.gg/kodadot)~~
2 changes: 1 addition & 1 deletion QA.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ KodaDot offers paid interviews, valuing your time and contributions. You will be

## Next stage

After completing 10-20 merged pull requests, you may be eligible to join our core team. Contact yangwao on Discord to discuss the next steps and potential long-term tasks.
After completing 10-20 merged pull requests, you may be eligible to join our core team. Contact yangwao on [KodaDot Ecosystem Telegram](https://t.me/kodadot_eco) to discuss the next steps and potential long-term tasks.

Our hiring process prioritizes cultural fit and teamwork. We are interested in character traits, problem-solving abilities, and your willingness to help others with their PRs. This approach ensures a strong, long-term team dynamic as our codebase grows in complexity.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ You'll find our goals for KodaDot upcoming future!
# Stay Tuned for Updates!

- Follow us on [Twitter](https://twitter.com/KodaDot), [Youtube](https://www.youtube.com/channel/UCEULduld5NrqOL49k1KVjoA), [SubStack](https://kodadot.substack.com/) and [Medium](https://blog.kodadot.xyz), [Instagram](https://instagram.com/kodadot.xyz),
- Join our [Telegram KodaDot Ecosystem](https://t.me/kodadot_eco), [Discord](https://discord.gg/u6ymnbz4PR)
- Join our [Telegram KodaDot Ecosystem](https://t.me/kodadot_eco), ~~[Discord](https://discord.gg/u6ymnbz4PR)~~
- [Pick your T-shirt in KodaDot Swag Shop](https://shop.kodadot.xyz), use voucher `readme100` to get 100% OFF, first 10 redemptions only.

26 changes: 8 additions & 18 deletions components/balance/MultipleBalances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</div>

<div class="has-text-right is-flex-grow-2">
{{ token.details?.balance }}
{{ formatNumber(token.details?.balance) }}
</div>
<div class="has-text-right is-flex-grow-2">
${{ delimiter(token.details?.usd || '0') }}
${{ formatNumber(token.details?.usd || '0') }}
</div>
</div>
</div>
Expand All @@ -48,7 +48,9 @@
<hr class="my-2" />
<p class="is-flex is-justify-content-space-between is-align-items-flex-end">
<span class="is-size-7"> {{ $i18n.t('spotlight.total') }}: </span>
<span class="is-size-6">${{ delimiter(identityStore.getTotalUsd) }}</span>
<span class="is-size-6"
>${{ formatNumber(identityStore.getTotalUsd) }}</span
>
</p>
</div>
</template>
Expand All @@ -60,8 +62,7 @@ import { decodeAddress, encodeAddress } from '@polkadot/util-crypto'
import { CHAINS, ENDPOINT_MAP } from '@kodadot1/static'
import { NeoSkeleton } from '@kodadot1/brick'
import { balanceOf } from '@kodadot1/sub-api'

import format from '@/utils/format/balance'
import format, { formatNumber } from '@/utils/format/balance'
import { useFiatStore } from '@/stores/fiat'
import { calculateExactUsdFromToken } from '@/utils/calculation'
import { getAssetIdByAccount } from '@/utils/api/bsx/query'
Expand Down Expand Up @@ -115,16 +116,6 @@ const currentNetwork = computed(() =>
isTestnet.value ? 'test-network' : 'main-network'
)

function delimiter(amount: string | number) {
const formatAmount = typeof amount === 'number' ? amount.toString() : amount
const number = parseFloat(formatAmount.replace(/,/g, ''))

return number.toLocaleString('en-US', {
minimumFractionDigits: 0,
maximumFractionDigits: 2,
})
}

const fiatStore = useFiatStore()
function calculateUsd(amount: string, token = 'KSM') {
if (!amount) {
Expand Down Expand Up @@ -174,16 +165,15 @@ async function getBalance(chainName: string, token = 'KSM', tokenId = 0) {
selectedTokenId = await getAssetIdByAccount(api, prefixAddress)
}

const balance = delimiter(currentBalance)
const usd = calculateUsd(balance, token)
const usd = calculateUsd(currentBalance, token)

identityStore.setMultiBalances({
address: defaultAddress,
chains: {
[chainName]: {
[token.toLowerCase()]: {
address: prefixAddress,
balance,
balance: currentBalance,
nativeBalance,
usd,
selected: selectedTokenId === String(tokenId),
Expand Down
8 changes: 8 additions & 0 deletions components/base/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,11 @@ export interface CarouselNFT extends ItemResources {
collectionName?: string
chain?: Prefix
}

export interface BaseNFTMeta {
id: string
image?: string
animationUrl?: string
name?: string
description?: string
}
77 changes: 66 additions & 11 deletions components/blog/BlogPost.vue
Original file line number Diff line number Diff line change
@@ -1,36 +1,81 @@
<template>
<div class="article">
<div v-if="attributes.title" class="article">
<div class="is-flex is-align-items-center has-text-grey is-size-5 mb-1">
<nuxt-link class="has-text-grey" to="/blog">{{ $t('blog') }}</nuxt-link>
<NeoIcon icon="chevron-right" pack="far" class="mx-5" />
<span>{{ attributes.title?.slice(0, 15) }}...</span>
</div>
<h1>{{ attributes.title }}</h1>
<p v-if="attributes.subtitle" class="subtitle">{{ attributes.subtitle }}</p>

<div
class="is-flex is-justify-content-space-between has-text-grey is-size-5">
<div>{{ attributes.tags }}</div>
<div v-if="attributes.date">
class="is-flex is-justify-content-space-between is-align-items-center has-text-grey mt-5">
<div
v-if="attributes.date"
class="border border-k-shade fixed-border-radius px-4 py-1">
{{ format(new Date(attributes.date), 'dd.MM.yyyy') }}
</div>

<div>
<NeoButton
icon="x-twitter"
icon-pack="fab"
no-shadow
class="no-border is-text is-size-4 p-0 mr-4"
@click.native="openShareUrl('twitter')" />

<NeoButton
icon="linkedin"
icon-pack="fab"
no-shadow
class="no-border is-text is-size-4 p-0"
@click.native="openShareUrl('linkedin')" />
</div>
</div>
<h1>{{ attributes.title }}</h1>
<p v-if="attributes.subtitle" class="subtitle">{{ attributes.subtitle }}</p>
<img
v-if="attributes.image"
:src="attributes.image"
:alt="attributes.title"
class="mt-5"
width="100%" />
<component :is="singlePostComponent" />
</div>
</template>

<script setup>
<script lang="ts" setup>
import { format } from 'date-fns'
import { NeoButton, NeoIcon } from '@kodadot1/brick'
import { convertMarkdownToText } from '@/utils/markdown'
import { nextTick } from 'vue'
import hljs from 'highlight.js'
import { URLS } from '@/utils/constants'
const { $seoMeta } = useNuxtApp()
const route = useRoute()

const slug = route.params.slug
const attributes = ref({})
const attributes = ref<{
image?: string
title?: string
date?: string
subtitle?: string
}>({})
const singlePostComponent = ref('')

const openShareUrl = (platform: 'twitter' | 'linkedin') => {
let shareUrl = ''
switch (platform) {
case 'twitter':
shareUrl = 'https://twitter.com/intent/tweet?text='
break
case 'linkedin':
shareUrl = 'https://www.linkedin.com/shareArticle?mini=true&url='
break
}
const currentUrl = `${URLS.koda.baseUrl}${location.pathname}`

window.open(`${shareUrl}${encodeURIComponent(currentUrl)}`, '_blank')
}

onMounted(async () => {
const post = await import(`~/content/blog/${slug}.md`)

Expand Down Expand Up @@ -95,6 +140,10 @@ html.dark-mode {
}
}

.fixed-border-radius {
border-radius: 3rem;
}

h1,
h2,
h3,
Expand Down Expand Up @@ -129,11 +178,16 @@ html.dark-mode {
margin: 2.5rem 0;
}

p {
p,
li {
font-size: 20px;
line-height: 30px;
}

li {
margin: 0 1.5rem;
}

@include ktheme() {
.markdown-body {
color: theme('k-accentlight2-dark');
Expand Down Expand Up @@ -173,7 +227,8 @@ html.dark-mode {
}

h2,
p {
p,
li {
font-size: 1rem;
}

Expand Down
6 changes: 3 additions & 3 deletions components/bsx/Create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<template #footer>
<NeoField key="advanced">
<CollapseWrapper
v-if="base.edition > 1"
v-if="base.copies > 1"
visible="mint.expert.show"
hidden="mint.expert.hide"
class="mt-3">
Expand Down Expand Up @@ -147,7 +147,7 @@ const base = ref<BaseTokenType>({
file: null,
description: '',
selectedCollection: null,
edition: 1,
copies: 1,
secondFile: null,
})
const collections = ref<MintedCollection[]>([])
Expand All @@ -161,7 +161,7 @@ const hasRoyalty = ref(true)
const feesToken = ref<Token>('BSX')
const royalty = ref<Royalty>({
amount: 0.15,
address: '',
address: accountId.value,
})
const balanceNotEnough = ref(false)
Expand Down
5 changes: 4 additions & 1 deletion components/buy/Buy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const ShoppingCartItemToTokenToBuy = (item: ShoppingCartItem): TokenToBuy => {
}
watchEffect(() => {
if (isLoading.value === false && status.value === 'loader.finalized') {
if (
isLoading.value === false &&
status.value === TransactionStatus.Finalized
) {
preferencesStore.setTriggerBuySuccess(true)
shoppingCartStore.clear()
}
Expand Down
3 changes: 1 addition & 2 deletions components/carousel/module/CarouselMedia.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
:to="urlOf({ id: item.id, url, chain: item.chain })"
:aria-label="`slide ${index + 1} of ${length}`"
rel="nofollow">
<!-- :animation-src removed until this is fixed:
https://github.com/kodadot/nft-gallery/issues/6237 -->
<MediaItem
class="carousel-media-wrapper"
:src="imageSrc || ''"
:animation-src="item.animationUrl || ''"
:title="item.name" />
</nuxt-link>
</div>
Expand Down
Loading

0 comments on commit edd57ab

Please sign in to comment.