This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,511 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# neccessary Algolia envs for searching to work properly | ||
ALGOLIA_APPLICATION_ID=YOUR_ALGOLIA_APPLICATION_ID | ||
ALGOLIA_API_KEY=YOUR_ALGOLIA_API_KEY | ||
|
||
# dev envs not needed in production | ||
YATA_API_TOKEN=YOUR_YATA_API_TOKEN # yata api token for fetching translations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
# It can also be set to "author" | ||
addAssignees: false | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- dzbo | ||
- richtera | ||
- Hugoo | ||
- doubleppereira | ||
|
||
# A number of reviewers added to the pull request | ||
# Set 0 to add all the reviewers (default: 0) | ||
numberOfReviewers: 0 | ||
|
||
skipKeywords: | ||
- chore( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'Auto Assign' | ||
on: | ||
pull_request: | ||
types: [opened, ready_for_review] | ||
|
||
jobs: | ||
add-reviews: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kentaro-m/[email protected] | ||
with: | ||
configuration-path: '.github/auto_assign.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,54 @@ | ||
<script setup lang="ts"></script> | ||
<script setup lang="ts"> | ||
import { ProviderName } from '@lukso/web-components/dist/components/lukso-share' | ||
const providers: ProviderName[] = ['twitter', 'discord', 'github'] | ||
</script> | ||
|
||
<template> | ||
<lukso-footer> | ||
<lukso-footer :providers="providers"> | ||
<div | ||
slot="top" | ||
class="grid gap-6 items-center sm:gap-10 sm:grid-cols-[repeat(2,max-content)]" | ||
slot="links" | ||
class="grid gap-4 items-center grid-cols-1 grid-rows-2 xl:grid-cols-[repeat(3,max-content)] xl:gap-10 xl:grid-rows-1" | ||
> | ||
<a | ||
href="https://lukso.network/faq" | ||
class="nav-apax-12-medium-uppercase text-purple-41 hover:underline hover:text-purple-31" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_faq_text') }} | ||
</a> | ||
<a | ||
:href="$formatMessage('footer_need_help_url')" | ||
class="nav-apax-12-medium-uppercase text-purple-41 hover:underline hover:text-purple-31" | ||
> | ||
{{ $formatMessage('footer_need_help_text') }} | ||
</a> | ||
</div> | ||
|
||
<div slot="bottom" class="gap-8 flex items-center"> | ||
<a | ||
href="https://new-creative-economies.foundation/privacy" | ||
class="paragraph-inter-12-medium hover:underline" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_privacy_policy_text') }} | ||
</a> | ||
<a | ||
href="https://lukso.network/terms" | ||
class="paragraph-inter-12-medium hover:underline cursor-pointer" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_terms_text') }} | ||
</a> | ||
<div class="flex gap-10"> | ||
<a | ||
href="https://docs.lukso.tech/" | ||
class="nav-apax-12-medium-uppercase text-purple-41 hover:underline hover:text-purple-31" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_docs_text') }} | ||
</a> | ||
<a | ||
href="https://lukso.network/faq" | ||
class="nav-apax-12-medium-uppercase text-purple-41 hover:underline hover:text-purple-31" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_faq_text') }} | ||
</a> | ||
<a | ||
:href="$formatMessage('footer_need_help_url')" | ||
class="nav-apax-12-medium-uppercase text-purple-41 hover:underline hover:text-purple-31" | ||
> | ||
{{ $formatMessage('footer_need_help_text') }} | ||
</a> | ||
</div> | ||
<div class="hidden w-0.5 h-4 bg-purple-63 xl:block"></div> | ||
<div class="flex gap-10"> | ||
<a | ||
href="https://new-creative-economies.foundation/privacy" | ||
class="nav-apax-12-medium-uppercase text-purple-41/70 hover:underline hover:text-purple-31/70" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_privacy_policy_text') }} | ||
</a> | ||
<a | ||
href="https://lukso.network/terms" | ||
class="nav-apax-12-medium-uppercase text-purple-41/70 hover:underline hover:text-purple-31/70" | ||
target="_blank" | ||
> | ||
{{ $formatMessage('footer_terms_text') }} | ||
</a> | ||
</div> | ||
</div> | ||
</lukso-footer> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script setup lang="ts"> | ||
type Props = { | ||
supply: string | ||
symbol: string | ||
} | ||
defineProps<Props>() | ||
</script> | ||
|
||
<template> | ||
<div class="heading-inter-14-bold pb-2"> | ||
{{ $formatMessage('asset_supply_title') }} | ||
</div> | ||
<div | ||
class="bg-neutral-100 border border-neutral-90 py-3 px-4 rounded-12 mb-8" | ||
> | ||
<div class="flex items-center justify-between paragraph-inter-14-regular"> | ||
{{ $formatNumber(supply, { maximumFractionDigits: 20 }) }} | ||
<div | ||
class="paragraph-inter-12-regular text-neutral-60 border-l border-l-neutral-90 pl-3 ml-3" | ||
> | ||
{{ symbol }} | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<script setup lang="ts"> | ||
import { fromWei } from 'web3-utils' | ||
import BigNumber from 'bignumber.js' | ||
import { storeToRefs } from 'pinia' | ||
const { asset, receiverError, amount } = storeToRefs(useSendStore()) | ||
const handleKeyDown = (customEvent: CustomEvent) => { | ||
const numberRegex = /^[0-9]*\.?[0-9]*$/ | ||
const event = customEvent.detail.event | ||
const input = event.target as HTMLInputElement | ||
const key = event.key | ||
const allowedKeys = ['Backspace', 'ArrowLeft', 'ArrowRight', 'Tab'] | ||
const realValueBN = new BigNumber(`${input.value}${key}`) | ||
const assetBalanceBN = new BigNumber(`${fromWei(asset.value?.amount || '0')}`) | ||
const maxDecimalPlaces = 6 | ||
// check for allowed keys or if user press CMD+A | ||
if (allowedKeys.includes(key) || (event.metaKey && key === 'a')) { | ||
return | ||
} | ||
// allow only numbers | ||
if (!numberRegex.test(key)) { | ||
event.preventDefault() | ||
} else { | ||
// Did it like this otherwise, if a user presses Esc or any non digit key, it would reset the error message | ||
receiverError.value = '' | ||
} | ||
// when value is more then balance we set to max value | ||
if (realValueBN.gt(assetBalanceBN)) { | ||
input.value = fromWei(asset.value?.amount?.toString() || '0') | ||
event.preventDefault() | ||
} | ||
// allow only one dot in the value, but not as first character | ||
if (key === '.' && (input.value.includes('.') || input.value === '')) { | ||
event.preventDefault() | ||
} | ||
// check for max decimal places | ||
if (input.value.toString().split('.')[1]?.length >= maxDecimalPlaces) { | ||
event.preventDefault() | ||
} | ||
} | ||
const handleKeyUp = (event: CustomEvent) => { | ||
const input = event.detail.event.target | ||
amount.value = input.value | ||
} | ||
const handleUnitClick = (event: CustomEvent) => { | ||
const input = event.detail.input | ||
const total = fromWei(asset.value?.amount?.toString() || '0') | ||
input.value = total | ||
amount.value = total | ||
} | ||
</script> | ||
|
||
<template> | ||
<lukso-input | ||
placeholder="0" | ||
:value="amount" | ||
:unit=" | ||
$formatMessage('profile_balance_of', { | ||
balance: $formatNumber(fromWei(asset?.amount || '0', 'ether')), | ||
symbol: asset?.symbol || '', | ||
}) | ||
" | ||
borderless | ||
is-full-width | ||
@on-key-down="handleKeyDown" | ||
@on-key-up="handleKeyUp" | ||
@on-unit-click="handleUnitClick" | ||
></lukso-input> | ||
</template> |
Oops, something went wrong.