This commit is contained in:
Nadar
2026-03-17 13:24:22 +03:00
commit 82e5ac9d81
554 changed files with 29637 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
<template>
<div :class="cn.m('expired')">
<div class="p-16">
<img
src="/expired.svg"
alt="Expired"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-grey-600">
Payment has expired
</h2>
<h4 class="text-clr-grey-400 mt-16">
Your invoice has expired. If you want to make a payment, <br> please return to the site and create the invoice again.
</h4>
</div>
<InvoiceFormSeparator />
<InvoiceFormAmount />
<UiButton
:class="cn.e('back-to-store')"
size="large"
:href="invoice.redirectUrl"
>
Back to store
</UiButton>
</div>
</template>
<script setup>
const { invoice } = inject('public-invoice')
const cn = useClassname('invoice-form')
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--expired {
#{$self}__back-to-store {
width: 100%;
margin-top: 32px;
}
}
}
</style>

View File

@@ -0,0 +1,95 @@
<template>
<div :class="cn.m('success')">
<img
src="/partially.svg"
alt="Success"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-green-500">
Invoice has been over paid
</h2>
<div class="mt-16">
<UiCoin :code="invoice.currencyCode" />
<MoneyAmount
:class="cn.e('amount')"
:value="invoice.amount"
:currency="invoice.currencyCode"
/>
</div>
<InvoiceFormDetails :class="cn.e('details')" accordion />
<UiButton
:class="cn.e('back-to-store')"
size="large"
:href="invoice.redirectUrl"
>
Back to store
</UiButton>
<UiButton
:class="cn.e('explorer')"
type="link"
color="secondary"
:href="explorerLink"
target="_blank"
>
Просмотреть в обозревателе блоков
</UiButton>
<InvoiceFormSeparator />
</div>
</template>
<script setup>
const { invoice } = inject('public-invoice')
const cn = useClassname('invoice-form')
const explorerLink = computed(() => {
return `https://nile.tronscan.org/#/address/${invoice.value.walletAddress}`
})
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--success {
#{$self}__amount {
@include h2('money-amount-value', true);
margin-left: 8px;
}
#{$self}__transaction-id {
text-align: center;
color: $clr-grey-400;
margin-top: 16px;
strong {
font-weight: 600;
color: $clr-grey-500;
}
}
#{$self}__details {
margin-top: 32px;
}
#{$self}__back-to-store {
width: 100%;
margin-top: 32px;
}
#{$self}__explorer {
width: 100%;
margin-top: 24px;
}
}
}
</style>

View File

@@ -0,0 +1,49 @@
<template>
<div :class="cn.m('pending')">
<div class="p-16">
<img
src="/pending.svg"
alt="Pending"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-grey-600">
Waiting
</h2>
<h4 class="text-clr-grey-400 mt-16">
Searching for transaction in the Blockchain network
</h4>
</div>
<InvoiceFormSeparator />
<InvoiceFormAmount />
<UiButton
:class="cn.e('action')"
size="large"
disabled
>
I have paid
</UiButton>
</div>
</template>
<script setup>
const cn = useClassname('invoice-form')
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--pending {
#{$self}__action {
width: 100%;
margin-top: 32px;
}
}
}
</style>

View File

@@ -0,0 +1,67 @@
<template>
<div :class="cn.m('requisites')">
<div
class="d-flex"
style="gap: 16px"
>
<InvoiceFormInstructions />
<UiQrCode
:class="cn.e('qr')"
:value="invoice.walletAddress"
:size="139"
/>
</div>
<UiInput
id="address"
:class="cn.e('address')"
label="Адрес кошелька для оплаты"
:model-value="invoice.walletAddress"
readonly
copyable
/>
<InvoiceFormSeparator />
<InvoiceFormAmount />
<UiButton
class="action"
size="large"
:class="cn.e('action')"
:disabled="payedFlag"
@click="payedFlag = true"
>
I have paid
</UiButton>
</div>
</template>
<script setup>
const { invoice, payedFlag } = inject('public-invoice')
const cn = useClassname('invoice-form')
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--requisites {
#{$self}__qr {
width: 139px;
height: 139px;
}
#{$self}__address {
margin-top: 8px;
}
#{$self}__action {
width: 100%;
margin-top: 32px;
}
}
}
</style>

View File

@@ -0,0 +1,84 @@
<template>
<div :class="cn.m('success')">
<img
src="/success.svg"
alt="Success"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-green-500">
Payment success
</h2>
<div class="mt-16">
<UiCoin :code="invoice.currencyCode" />
<MoneyAmount
:class="cn.e('amount')"
:value="invoice.amount"
:currency="invoice.currencyCode"
/>
</div>
<InvoiceFormDetails :class="cn.e('details')" />
<UiButton
:class="cn.e('back-to-store')"
size="large"
:href="invoice.redirectUrl"
>
Back to store
</UiButton>
<UiButton
:class="cn.e('explorer')"
type="link"
color="secondary"
:href="explorerLink"
target="_blank"
>
Просмотреть в обозревателе блоков
</UiButton>
<InvoiceFormSeparator />
</div>
</template>
<script setup>
const { invoice } = inject('public-invoice')
const cn = useClassname('invoice-form')
const explorerLink = computed(() => {
return `https://nile.tronscan.org/#/address/${invoice.value.walletAddress}`
})
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--success {
#{$self}__amount {
@include h2('money-amount-value', true);
margin-left: 8px;
}
#{$self}__details {
margin-top: 32px;
}
#{$self}__back-to-store {
width: 100%;
margin-top: 32px;
}
#{$self}__explorer {
width: 100%;
margin-top: 24px;
}
}
}
</style>

View File

@@ -0,0 +1,126 @@
<template>
<div :class="cn.m('underpaid')">
<img
src="/partially.svg"
alt="Success"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-grey-600">
Invoice has been partially paid
</h2>
<p :class="cn.e('total')">
Total amount to be paid - <strong>{{ total }}</strong>
</p>
<div class="mt-32">
<UiCoin :code="invoice.currencyCode" />
<div :class="cn.e('collected-amount')">
<span>Funds received</span>
<MoneyAmount
:value="invoice.collectedAmount"
:currency="invoice.currencyCode"
/>
</div>
</div>
<UiAlert type="warning" :class="cn.e('alert')">
You need to deposit the missing part of the funds - <span style="white-space: nowrap">{{ missingAmount }}</span>, otherwise the bill will not be paid
</UiAlert>
<InvoiceFormDetails :class="cn.e('details')" accordion />
<UiButton
:class="cn.e('pay-additional')"
size="large"
@click="notify({ type: 'warning', id: 'wip', text: 'Work in progress' })"
>
Pay in addition
</UiButton>
<UiButton
:class="cn.e('explorer')"
type="link"
color="secondary"
:href="explorerLink"
target="_blank"
>
Просмотреть в обозревателе блоков
</UiButton>
<InvoiceFormSeparator />
</div>
</template>
<script setup>
import Decimal from 'decimal.js'
const { invoice } = inject('public-invoice')
const cn = useClassname('invoice-form')
const notify = useNotify()
const total = computed(() => $money.fullFormat(invoice.value.amount, invoice.value.currencyCode))
const missingAmount = computed(() => $money.fullFormat(Decimal.sub(invoice.value.amount, invoice.value.collectedAmount), invoice.value.currencyCode))
const explorerLink = computed(() => {
return `https://nile.tronscan.org/#/address/${invoice.value.walletAddress}`
})
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--underpaid {
#{$self}__total {
@include h4;
color: $clr-grey-400;
margin-top: 4px;
strong {
color: $clr-grey-500;
}
}
#{$self}__collected-amount {
@include h3('money-amount-value', true);
display: inline-flex;
flex-direction: column;
text-align: left;
margin-left: 8px;
vertical-align: middle;
> span {
@include txt-r-m;
color: $clr-grey-500;
}
}
#{$self}__alert {
margin-top: 32px;
padding-block: 16px;
}
#{$self}__details {
margin-top: 32px;
}
#{$self}__pay-additional {
width: 100%;
margin-top: 32px;
}
#{$self}__explorer {
width: 100%;
margin-top: 24px;
}
}
}
</style>

View File

@@ -0,0 +1,49 @@
<template>
<div :class="cn.m('waiting-requisites')">
<div class="p-16">
<img
src="/pending.svg"
alt="Waiting requisites"
class="mb-16"
data-status-illustration
>
<h2 class="text-clr-grey-600">
Waiting
</h2>
<h4 class="text-clr-grey-400 mt-16">
It may take several minutes to receive payment details
</h4>
</div>
<InvoiceFormSeparator />
<InvoiceFormAmount />
<UiButton
:class="cn.e('action')"
size="large"
disabled
>
I have paid
</UiButton>
</div>
</template>
<script setup>
const cn = useClassname('invoice-form')
</script>
<style lang="scss">
.invoice-form {
$self: &;
&--waiting-requisites {
#{$self}__action {
width: 100%;
margin-top: 32px;
}
}
}
</style>