Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed Apr 1, 2024
1 parent 4fe91e2 commit 1307a06
Show file tree
Hide file tree
Showing 11 changed files with 391 additions and 391 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/CopyTextIcon.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="cursor-pointer" @click="copyText">
<div class="cursor-pointer flex items-center" @click="copyText">
<slot />
<ClipboardIcon class="inline-block ml-1 my-auto w-4 h-4 hover:text-primary flex-shrink-0" />
</div>
Expand Down
2 changes: 0 additions & 2 deletions resources/js/components/FormInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
:type="type"
:min="min"
:disabled="disabled"
:value="props.value"
:class="[
{
'rounded-none rounded-r-md': prefix,
Expand Down Expand Up @@ -68,7 +67,6 @@ const props = withDefaults(
type?: string;
min?: number;
modelValue?: number | string | null;
value?: number | string;
disabled?: boolean;
prefix?: string;
name: string;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/SupportButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a
href="https://docs.enjin.io/discuss"
target="_blank"
class="fixed bottom-4 right-6 text-white bg-light-surface-brand text-lg font-medium py-2 px-5 rounded-full flex items-center z-50"
class="fixed bottom-4 right-6 text-white bg-light-surface-brand text-lg font-medium py-2 px-5 rounded-full flex items-center z-30"
>
<QuestionMarkCircleIcon class="mr-1 w-5 h-5 cursor-pointer" stroke-width="36" />
<span>Support</span>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/TokenIdInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
>
<template #input>
<TranslateTransition>
<div class="block w-24" v-if="localTokenType === TokenIdSelectType.Erc1155">
<div class="block w-16" v-if="localTokenType === TokenIdSelectType.Erc1155">
<FormInput name="index" v-model="localIndex" placeholder="Index" input-class="!rounded-none" />
</div>
</TranslateTransition>
Expand Down
393 changes: 200 additions & 193 deletions resources/js/components/fueltank/DispatchRuleForm.vue

Large diffs are not rendered by default.

65 changes: 34 additions & 31 deletions resources/js/components/pages/create/CreateCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>
</div>
<div v-if="isAdvanced" class="bg-light-surface-primary p-4 md:p-6 shadow rounded-lg">
<div class="">
<div class="space-y-4">
<div class="flex items-center">
<h3 class="text-base font-semibold leading-6 text-gray-900">Mint Policy</h3>
<Tooltip
Expand Down Expand Up @@ -241,29 +241,25 @@
v-if="isAdvanced"
class="bg-light-surface-primary px-4 py-5 shadow rounded-lg transition-all sm:p-6"
>
<div class="md:grid md:grid-cols-3 md:gap-6">
<div class="md:col-span-1">
<div class="space-y-6">
<div class="">
<h3 class="text-base font-semibold leading-6 text-gray-900">Other Options</h3>
</div>
<div class="mt-5 md:col-span-2 md:mt-0">
<div class="flex flex-col gap-6">
<FormInput
v-model="idempotencyKey"
name="idempotencyKey"
label="Idempotency Key"
description="The idempotency key to set. It is recommended to use a UUID for this."
tooltip="In mathematical and computer science terms, idempotency is a property of certain operations that can be applied repeated times without changing the initial result of the application."
readmore="Idempotency Key"
/>
<FormInput
v-model="idempotencyKey"
name="idempotencyKey"
label="Idempotency Key"
description="The idempotency key to set. It is recommended to use a UUID for this."
tooltip="In mathematical and computer science terms, idempotency is a property of certain operations that can be applied repeated times without changing the initial result of the application."
readmore="Idempotency Key"
/>

<FormCheckbox
v-model="skipValidation"
name="skipValidation"
label="Skip validation"
description="Skip all validation rules, use with caution. Defaults to false."
/>
</div>
</div>
<FormCheckbox
v-model="skipValidation"
name="skipValidation"
label="Skip validation"
description="Skip all validation rules, use with caution. Defaults to false."
/>
</div>
</div>

Expand Down Expand Up @@ -370,6 +366,22 @@ const validation = yup.object({
});
const simpleAttributes = () => {
const media = [
{
url: imageUrl.value,
type: imageType.value,
},
];
if (bannerUrl.value) {
media.push({
url: bannerUrl.value,
type: bannerType.value,
});
}
console.log(description.value);
return [
{
key: 'name',
Expand All @@ -381,16 +393,7 @@ const simpleAttributes = () => {
},
{
key: 'media',
value: JSON.stringify([
{
url: imageUrl.value,
type: imageType.value,
},
{
url: bannerUrl.value,
type: bannerType.value,
},
]),
value: JSON.stringify(media),
},
].filter((a) => a.value !== '');
};
Expand Down
222 changes: 109 additions & 113 deletions resources/js/components/pages/create/CreateListing.vue
Original file line number Diff line number Diff line change
@@ -1,138 +1,134 @@
<template>
<div class="px-4 sm:px-6 lg:px-8 py-4 pb-20 overflow-y-auto transition-all">
<div class="flow-root">
<div class="flow-root space-y-4 pb-4 max-w-3xl mx-auto">
<div class="mb-4">
<h1 class="text-xl md:text-2xl">Create Listing</h1>
</div>
<Form ref="formRef" class="space-y-6" :validation-schema="validation" @submit="createListing">
<div class="bg-white px-4 py-5 shadow rounded-lg sm:p-6">
<div class="md:grid md:grid-cols-3 md:gap-6">
<div class="md:col-span-1">
<div class="space-y-6">
<div class="">
<h3 class="text-base font-semibold leading-6 text-gray-900">Parameters</h3>
<p class="mt-1 text-sm text-gray-500">Places a sell order.</p>
</div>
<div class="mt-5 md:col-span-2 md:mt-0">
<div class="flex flex-col gap-6">
<FormInput
v-model="account"
name="account"
label="Account"
description="The seller account."
required
tooltip="Wallet Address"
/>
<FormInput
v-model="account"
name="account"
label="Account"
description="The seller account."
required
tooltip="Wallet Address"
/>

<div class="space-y-2">
<div>
<h3 class="text-sm leading-6 text-gray-900">
Make Asset ID
<span class="text-red-500">&nbsp;*</span>
</h3>
<p class="mt-1 text-sm text-gray-500">
The collection and token ID of the asset being sold.
</p>
</div>
<div class="grid grid-cols-2 gap-4">
<FormSelect
v-model="makeCollectionId"
name="makeCollectionId"
placeholder="Select a collection ID"
:options="collectionIds"
/>
<TokenIdInput
class="col-span-1"
v-model="makeTokenId"
placeholder="Token ID"
name="makeTokenId"
/>
</div>
</div>

<FormCheckbox
v-model="enableTakeCollectionId"
name="enableTakeCollection"
label="Enable offer"
description="Use this option to enable offering a different asset in exchange for the asset being sold."
<div class="space-y-2">
<div>
<h3 class="text-sm leading-6 text-gray-900">
Make Asset ID
<span class="text-red-500">&nbsp;*</span>
</h3>
<p class="mt-1 text-sm text-gray-500">
The collection and token ID of the asset being sold.
</p>
</div>
<div class="grid grid-cols-2 gap-4">
<FormSelect
v-model="makeCollectionId"
name="makeCollectionId"
placeholder="Select a collection ID"
:options="collectionIds"
/>
<TokenIdInput
class="col-span-1"
v-model="makeTokenId"
placeholder="Token ID"
name="makeTokenId"
/>
</div>
</div>

<div v-if="enableTakeCollectionId" class="space-y-2 animate-fade-in">
<div>
<h3 class="text-sm leading-6 text-gray-900">
Take Asset ID
<span class="text-red-500">&nbsp;*</span>
</h3>
<p class="mt-1 text-sm text-gray-500">
The collection and token ID of the asset being requested.
</p>
</div>
<div class="grid grid-cols-2 gap-4">
<FormInput
class="col-span-1"
v-model="takeCollectionId"
name="takeCollectionId"
placeholder="Collection ID"
type="number"
/>
<TokenIdInput
class="col-span-1"
v-model="takeTokenId"
placeholder="Token ID"
name="takeTokenId"
/>
</div>
</div>
<FormCheckbox
v-model="enableTakeCollectionId"
name="enableTakeCollection"
label="Enable offer"
description="Use this option to enable offering a different asset in exchange for the asset being sold."
/>

<div v-if="enableTakeCollectionId" class="space-y-2 animate-fade-in">
<div>
<h3 class="text-sm leading-6 text-gray-900">
Take Asset ID
<span class="text-red-500">&nbsp;*</span>
</h3>
<p class="mt-1 text-sm text-gray-500">
The collection and token ID of the asset being requested.
</p>
</div>
<div class="grid grid-cols-2 gap-4">
<FormInput
v-model="amount"
name="amount"
label="Amount"
description="The number of units being sold."
class="col-span-1"
v-model="takeCollectionId"
name="takeCollectionId"
placeholder="Collection ID"
type="number"
required
/>

<FormInput
v-model="price"
name="price"
label="Price"
description="The requested price for each unit. If it’s an auction, this is the minimum bid."
type="number"
required
:prefix="currencySymbol"
<TokenIdInput
class="col-span-1"
v-model="takeTokenId"
placeholder="Token ID"
name="takeTokenId"
/>
</div>
</div>

<FormInput
v-model="salt"
name="salt"
label="Salt"
description="Can be used to differentiate listings."
/>
<FormInput
v-model="amount"
name="amount"
label="Amount"
description="The number of units being sold."
type="number"
required
/>

<FormInput
v-model="auctionDataStart"
name="auctionDataStart"
label="Auction Data Start Block"
description="The block number the auction starts at."
/>
<FormInput
v-model="price"
name="price"
label="Price"
description="The requested price for each unit. If it’s an auction, this is the minimum bid."
type="number"
required
:prefix="currencySymbol"
/>

<FormInput
v-model="auctionDataEnd"
name="auctionDataEnd"
label="Auction Data End Block"
description="The block number the auction ends at."
/>
<FormInput
v-model="salt"
name="salt"
label="Salt"
description="Can be used to differentiate listings."
/>

<FormInput
v-if="appStore.advanced"
v-model="idempotencyKey"
name="idempotencyKey"
label="Idempotency Key"
description="The idempotency key to set. It is recommended to use a UUID for this."
tooltip="In mathematical and computer science terms, idempotency is a property of certain operations that can be applied repeated times without changing the initial result of the application."
readmore="Idempotency Key"
/>
</div>
</div>
<FormInput
v-model="auctionDataStart"
name="auctionDataStart"
label="Auction Data Start Block"
description="The block number the auction starts at."
/>

<FormInput
v-model="auctionDataEnd"
name="auctionDataEnd"
label="Auction Data End Block"
description="The block number the auction ends at."
/>

<FormInput
v-if="appStore.advanced"
v-model="idempotencyKey"
name="idempotencyKey"
label="Idempotency Key"
description="The idempotency key to set. It is recommended to use a UUID for this."
tooltip="In mathematical and computer science terms, idempotency is a property of certain operations that can be applied repeated times without changing the initial result of the application."
readmore="Idempotency Key"
/>
</div>
</div>

Expand Down
Loading

0 comments on commit 1307a06

Please sign in to comment.