mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
upload request prototype UI
This commit is contained in:
@@ -1,22 +1,63 @@
|
||||
<template>
|
||||
<AuthContentWrapper ref="auth" class="h-screen dark:bg-dark-background bg-white">
|
||||
<AuthContentWrapper ref="auth" class="h-screen bg-white dark:bg-dark-background">
|
||||
<!--Licence Verify-->
|
||||
<AuthContent name="licence-verify" :visible="true">
|
||||
<Headline title="Setup Wizard" description="Please set your purchase code before continue to set up your application.">
|
||||
<settings-icon size="40" class="vue-feather text-theme mx-auto animate-[spin_5s_linear_infinite] mb-3" />
|
||||
<Headline
|
||||
title="Setup Wizard"
|
||||
description="Please set your purchase code before continue to set up your application."
|
||||
>
|
||||
<settings-icon
|
||||
size="40"
|
||||
class="vue-feather text-theme mx-auto mb-3 animate-[spin_5s_linear_infinite]"
|
||||
/>
|
||||
</Headline>
|
||||
|
||||
<ValidationObserver @submit.prevent="verifyPurchaseCode" ref="verifyPurchaseCode" v-slot="{ invalid }" tag="form" class="mb-12 items-start space-y-4 md:flex md:space-x-4 md:space-y-0">
|
||||
<ValidationProvider tag="div" mode="passive" class="w-full text-left" name="Purchase Code" rules="required" v-slot="{ errors }">
|
||||
<input v-model="purchaseCode" placeholder="Paste your purchase code" type="text" class="focus-border-theme w-full appearance-none rounded-lg border border-transparent bg-light-background px-5 py-3.5 font-bold dark:bg-2x-dark-foreground" :class="{ 'border-red': errors[0] }" />
|
||||
<ValidationObserver
|
||||
@submit.prevent="verifyPurchaseCode"
|
||||
ref="verifyPurchaseCode"
|
||||
v-slot="{ invalid }"
|
||||
tag="form"
|
||||
class="mb-12 items-start space-y-4 md:flex md:space-x-4 md:space-y-0"
|
||||
>
|
||||
<ValidationProvider
|
||||
tag="div"
|
||||
mode="passive"
|
||||
class="w-full text-left"
|
||||
name="Purchase Code"
|
||||
rules="required"
|
||||
v-slot="{ errors }"
|
||||
>
|
||||
<input
|
||||
v-model="purchaseCode"
|
||||
placeholder="Paste your purchase code"
|
||||
type="text"
|
||||
class="focus-border-theme w-full appearance-none rounded-lg border border-transparent bg-light-background px-5 py-3.5 font-bold dark:bg-2x-dark-foreground"
|
||||
:class="{ 'border-red': errors[0] }"
|
||||
/>
|
||||
<span class="text-left text-xs text-red-600" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
<AuthButton icon="chevron-right" text="Verify" class="w-full justify-center md:w-min" :loading="isLoading" :disabled="isLoading" />
|
||||
<AuthButton
|
||||
icon="chevron-right"
|
||||
text="Verify"
|
||||
class="w-full justify-center md:w-min"
|
||||
:loading="isLoading"
|
||||
:disabled="isLoading"
|
||||
/>
|
||||
</ValidationObserver>
|
||||
|
||||
<p class="block">
|
||||
<a href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-" target="_blank" class="text-theme font-bold">Where I can find purchase code? </a>
|
||||
<a class="black-link" href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986" target="_blank">Don’t have purchase code? </a>
|
||||
<a
|
||||
href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-"
|
||||
target="_blank"
|
||||
class="text-theme font-bold"
|
||||
>Where I can find purchase code?
|
||||
</a>
|
||||
<a
|
||||
class="black-link"
|
||||
href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986"
|
||||
target="_blank"
|
||||
>Don’t have purchase code?
|
||||
</a>
|
||||
</p>
|
||||
</AuthContent>
|
||||
</AuthContentWrapper>
|
||||
@@ -55,9 +96,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async verifyPurchaseCode() {
|
||||
if (this.$root.$data.config.isSetupWizardDemo) {
|
||||
this.$router.push({name: 'Database'})
|
||||
}
|
||||
if (this.$root.$data.config.isSetupWizardDemo) {
|
||||
this.$router.push({ name: 'Database' })
|
||||
}
|
||||
|
||||
// Validate fields
|
||||
const isValid = await this.$refs.verifyPurchaseCode.validate()
|
||||
@@ -76,15 +117,15 @@ export default {
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
|
||||
console.log(response);
|
||||
console.log(response)
|
||||
|
||||
if (response.data === 'b6896a44017217c36f4a6fdc56699728') {
|
||||
this.isExtended = true
|
||||
localStorage.setItem('license', 'Extended')
|
||||
} else {
|
||||
this.isExtended = false
|
||||
localStorage.setItem('license', 'Regular')
|
||||
}
|
||||
if (response.data === 'b6896a44017217c36f4a6fdc56699728') {
|
||||
this.isExtended = true
|
||||
localStorage.setItem('license', 'Extended')
|
||||
} else {
|
||||
this.isExtended = false
|
||||
localStorage.setItem('license', 'Regular')
|
||||
}
|
||||
|
||||
localStorage.setItem('purchase_code', this.purchaseCode)
|
||||
|
||||
@@ -101,7 +142,9 @@ export default {
|
||||
})
|
||||
} else if (error.response.status === 404) {
|
||||
this.$refs.verifyPurchaseCode.setErrors({
|
||||
'Purchase Code': ['You may have misconfigured the app, please read the readme file and try it again.'],
|
||||
'Purchase Code': [
|
||||
'You may have misconfigured the app, please read the readme file and try it again.',
|
||||
],
|
||||
})
|
||||
} else {
|
||||
this.$refs.verifyPurchaseCode.setErrors({
|
||||
|
||||
Reference in New Issue
Block a user