Skip to content

Commit

Permalink
πŸ”§ Add enableCustomMessagePage config for book (#142)
Browse files Browse the repository at this point in the history
* πŸ”§ Add enableCustomMessagePage config for book

* πŸ”§ Default enableCustomMessagePage to false
  • Loading branch information
williamchong authored May 24, 2024
1 parent a6e0259 commit 7858b79
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pages/nft-book-store/new.vue
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,17 @@
label="Disable Download"
/>
</UFormGroup>

<UFormGroup
label="Insert cutomized message page in eBook"
:ui="{ label: { base: 'font-mono font-bold' } }"
>
<UCheckbox
v-model="enableCustomMessagePage"
name="enableCustomMessagePage"
label="Enable custom message page"
/>
</UFormGroup>
</div>
</UCard>
</div>
Expand Down Expand Up @@ -532,6 +543,7 @@ const classIdInput = ref(classId || '')
const nextPriceIndex = ref(1)
const defaultPaymentCurrency = ref<string>(SUPPORT_CURRENCY.USD)
const mustClaimToView = ref(true)
const enableCustomMessagePage = ref(false)
const hideDownload = ref(false)
const prices = ref<any[]>([
{
Expand Down Expand Up @@ -831,6 +843,7 @@ async function submitNewClass () {
prices: p,
shippingRates: s,
mustClaimToView,
enableCustomMessagePage,
hideDownload,
autoDeliverNFTsTxHash
})
Expand Down
15 changes: 15 additions & 0 deletions pages/nft-book-store/status/[classId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,17 @@
label="Disable Download"
/>
</UFormGroup>

<UFormGroup
label="Insert cutomized message page in eBook"
:ui="{ label: { base: 'font-mono font-bold' } }"
>
<UCheckbox
v-model="enableCustomMessagePage"
name="enableCustomMessagePage"
label="Enable custom message page"
/>
</UFormGroup>
</div>
</UCard>

Expand Down Expand Up @@ -667,6 +678,7 @@ const isStripeConnectChecked = ref(false)
const stripeConnectWallet = ref('')
const mustClaimToView = ref(true)
const hideDownload = ref(false)
const enableCustomMessagePage = ref(true)
const useLikerLandPurchaseLink = ref(true)
const isShowNewCouponModal = ref(false)
const shouldDisableStripeConnectSetting = ref(false)
Expand Down Expand Up @@ -981,6 +993,7 @@ onMounted(async () => {
notificationEmails: classNotificationEmails,
connectedWallets: classConnectedWallets,
mustClaimToView: classMustClaimToView,
enableCustomMessagePage: classEnableCustomMessagePage,
hideDownload: classHideDownload,
coupons: classCoupons,
defaultPaymentCurrency: classDefaultPaymentCurrency
Expand All @@ -1001,6 +1014,7 @@ onMounted(async () => {
}
mustClaimToView.value = classMustClaimToView
hideDownload.value = classHideDownload
enableCustomMessagePage.value = classEnableCustomMessagePage
coupons.value = classCoupons || {}
const { data: orders, error: fetchOrdersError } = await useFetch(`${LIKE_CO_API}/likernft/book/purchase/${classId.value}/orders`,
{
Expand Down Expand Up @@ -1156,6 +1170,7 @@ async function updateSettings () {
connectedWallets,
hideDownload,
mustClaimToView,
enableCustomMessagePage,
coupons
})
router.push({
Expand Down

0 comments on commit 7858b79

Please sign in to comment.