alpha v1.7 alpha.1

This commit is contained in:
carodej
2020-07-14 17:31:04 +02:00
parent c9d300769c
commit b1860eac21
33 changed files with 587 additions and 81 deletions

View File

@@ -173,6 +173,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>description</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>sk-SK</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>title</name>
<definition_loaded>false</definition_loaded>

View File

@@ -93,6 +93,7 @@
'ContactUs',
'AppSetup',
'Database',
'Upgrade',
'SignIn',
'SignUp',
], this.$route.name)
@@ -127,9 +128,10 @@
// Redirect to database verify code
if ( installation === 'setup-database') {
this.$router.push({name: 'PurchaseCode'})
}
// Redirect to starting installation process
} else if ( installation === 'setup-disclaimer' ) {
if ( installation === 'setup-disclaimer' ) {
this.$router.push({name: 'InstallationDisclaimer'})
}
},

View File

@@ -79,7 +79,7 @@
},
{
label: this.$t('admin_page_user.table.storage_used'),
field: 'data.attributes.storage.used',
field: 'relationships.storage.data.attributes.used',
sortable: true
},
{

View File

@@ -6,11 +6,11 @@
</router-link>
<div class="navigation">
<ul class="navigation-links">
<li>
<!--<li v-if="config.stripe_public_key">
<a href="/#pricing">
{{ $t('page_index.menu.pricing') }}
</a>
</li>
</li>-->
<li>
<router-link :to="{name: 'ContactUs'}">
{{ $t('page_index.menu.contact_us') }}
@@ -42,7 +42,7 @@
export default {
name: 'IndexNavigation',
computed: {
...mapGetters(['config']),
...mapGetters(['config', 'index']),
},
}
</script>

View File

@@ -10,6 +10,7 @@
"activation": {
"stripe": {
"button": "设置您的Stripe帐户",
"description": "To charge your users, please set up your Stripe account credentials.",
"title": "您的Stripe帐户尚未设置"
}
},

View File

@@ -10,6 +10,7 @@
"activation": {
"stripe": {
"button": "Set up your Stripe account",
"description": "To charge your users, please set up your Stripe account credentials.",
"title": "Your Stripe account is not set"
}
},
@@ -242,7 +243,7 @@
"appearance": "Appearance",
"billings": "Billings",
"email": "Email",
"others": "Others",
"others": "Application",
"payments": "Payments"
}
},

View File

@@ -10,6 +10,7 @@
"activation": {
"stripe": {
"button": "Nastaviť účet Stripe",
"description": "Pre spoplatňovanie Vaších uživateľov, prosím nastavte poverenia služby Stripe",
"title": "Váš účet Stripe nie je nastavený"
}
},
@@ -242,7 +243,7 @@
"appearance": "Vzhľad",
"billings": "Fakturácia",
"email": "E-mail",
"others": "Ostatné",
"others": "Aplikácia",
"payments": "Platby"
}
},

View File

@@ -63,6 +63,9 @@ import UserPassword from './views/Admin/Users/UserTabs/UserPassword'
import UserInvoices from './views/Admin/Users/UserTabs/UserInvoices'
import UserSubscription from './views/Admin/Users/UserTabs/UserSubscription'
// Upgrade
import Upgrade from './views/Upgrade'
// Setup Wizard
import SetupWizard from './views/SetupWizard'
import Database from './views/SetupWizard/Database'
@@ -515,6 +518,14 @@ const routesUser = [
},
]
const routesMaintenance = [
{
name: 'Upgrade',
path: '/upgrade',
component: Upgrade,
meta: {
requiresAuth: false
},
},
{
name: 'SetupWizard',
path: '/install',

View File

@@ -22,7 +22,7 @@
{{ $t('admin_menu.users') }}
</div>
</router-link>
<router-link :to="{name: 'AppAppearance'}" class="menu-list-item link">
<router-link :to="{name: 'AppOthers'}" class="menu-list-item link">
<div class="icon">
<settings-icon size="17"></settings-icon>
</div>

View File

@@ -8,6 +8,16 @@
<!--Page Tab links-->
<div class="menu-list-wrapper horizontal">
<router-link replace :to="{name: 'AppOthers'}"
class="menu-list-item link">
<div class="icon">
<settings-icon size="17"></settings-icon>
</div>
<div class="label">
{{ $t('admin_settings.tabs.others') }}
</div>
</router-link>
<router-link replace :to="{name: 'AppAppearance'}"
class="menu-list-item link">
<div class="icon">
@@ -18,15 +28,6 @@
</div>
</router-link>
<router-link v-if="config.isSaaS" replace :to="{name: 'AppIndex'}" class="menu-list-item link">
<div class="icon">
<book-icon size="17"></book-icon>
</div>
<div class="label">
Index
</div>
</router-link>
<router-link v-if="config.isSaaS" replace :to="{name: 'AppBillings'}"
class="menu-list-item link">
<div class="icon">
@@ -37,16 +38,6 @@
</div>
</router-link>
<router-link replace :to="{name: 'AppEmail'}"
class="menu-list-item link">
<div class="icon">
<mail-icon size="17"></mail-icon>
</div>
<div class="label">
{{ $t('admin_settings.tabs.email') }}
</div>
</router-link>
<router-link v-if="config.isSaaS" replace :to="{name: 'AppPayments'}"
class="menu-list-item link">
<div class="icon">
@@ -57,13 +48,22 @@
</div>
</router-link>
<router-link replace :to="{name: 'AppOthers'}"
class="menu-list-item link">
<router-link v-if="config.isSaaS" replace :to="{name: 'AppIndex'}" class="menu-list-item link">
<div class="icon">
<code-icon size="17"></code-icon>
<home-icon size="17"></home-icon>
</div>
<div class="label">
{{ $t('admin_settings.tabs.others') }}
Homepage
</div>
</router-link>
<router-link replace :to="{name: 'AppEmail'}"
class="menu-list-item link">
<div class="icon">
<mail-icon size="17"></mail-icon>
</div>
<div class="label">
{{ $t('admin_settings.tabs.email') }}
</div>
</router-link>
</div>
@@ -76,7 +76,7 @@
</template>
<script>
import {UsersIcon, SettingsIcon, Trash2Icon, EyeIcon, FileTextIcon, CodeIcon, MailIcon, CreditCardIcon, BookIcon} from 'vue-feather-icons'
import {UsersIcon, SettingsIcon, Trash2Icon, EyeIcon, FileTextIcon, CodeIcon, MailIcon, CreditCardIcon, HomeIcon} from 'vue-feather-icons'
import MobileHeader from '@/components/Mobile/MobileHeader'
import SectionTitle from '@/components/Others/SectionTitle'
import PageHeader from '@/components/Others/PageHeader'
@@ -85,7 +85,7 @@
export default {
name: 'AppSettings',
components: {
BookIcon,
HomeIcon,
CreditCardIcon,
CodeIcon,
MailIcon,

View File

@@ -396,6 +396,6 @@
margin: 0 auto;
display: block;
border-radius: 8px;
box-shadow: 0 7px 25px rgba(25, 54, 60, 0.1);
border: 1px solid #ececec;
}
</style>

View File

@@ -15,7 +15,7 @@
{{ data.app_version }}
</ColorLabel>
</a>
<a href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986" target="_blank" class="meta">
<a v-if="data.license" href="https://codecanyon.net/item/vue-file-manager-with-laravel-backend/25815986" target="_blank" class="meta">
<span class="meta-title">{{ $t('admin_page_dashboard.license') }}:</span>
<ColorLabel color="purple">
{{ data.license }}
@@ -33,7 +33,7 @@
</div>
<!--Stripe notice-->
<InfoBox v-if="! config.stripe_public_key" class="dashboard-notice">
<InfoBox v-if="config.isSaaS && ! config.stripe_public_key" class="dashboard-notice">
<i18n path="notice.stripe_activation">
<router-link :to="{name: 'AppPayments'}">{{ $t('notice.stripe_activation_button') }}</router-link>
</i18n>

View File

@@ -69,6 +69,7 @@
v-if="! config.stripe_public_key"
icon="settings"
:title="$t('activation.stripe.title')"
:description="$t('activation.stripe.description')"
>
<router-link :to="{name: 'AppPayments'}">
<ButtonBase button-style="theme">{{ $t('activation.stripe.button') }}</ButtonBase>

View File

@@ -81,6 +81,7 @@
v-if="! config.stripe_public_key"
icon="settings"
:title="$t('activation.stripe.title')"
:description="$t('activation.stripe.description')"
>
<router-link :to="{name: 'AppPayments'}">
<ButtonBase button-style="theme">{{ $t('activation.stripe.button') }}</ButtonBase>

View File

@@ -0,0 +1,287 @@
<template>
<AuthContentWrapper ref="auth">
<!--Database Credentials-->
<AuthContent name="database-credentials" :visible="true">
<div class="content-headline">
<settings-icon size="40" class="title-icon"></settings-icon>
<h1>Upgrade VueFileManager</h1>
<h2>Please fill form bellow to upgrade VueFileManager.</h2>
</div>
<ValidationObserver @submit.prevent="appSetupSubmit" ref="appSetup" v-slot="{ invalid }" tag="form"
class="form block-form">
<FormLabel>Set your License</FormLabel>
<div class="block-wrapper">
<label>Purchase Code:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Purchase code" rules="required" v-slot="{ errors }">
<input v-model="app.purchase_code" placeholder="Paste your purchase code" type="text" :class="{'is-error': errors[0]}"/>
<a class="input-help" href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-" target="_blank">
Where I can find purchase code?
</a>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<FormLabel class="mt-70">General Settings</FormLabel>
<div class="block-wrapper">
<label>App Title:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
<input v-model="app.title" placeholder="Type your app title" type="text" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>App Description:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
<input v-model="app.description" placeholder="Type your app description" type="text" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>App Logo (optional):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
<ImageInput v-model="app.logo" :error="errors[0]"/>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>App Logo Horizontal (optional):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
<ImageInput v-model="app.logo_horizontal" :error="errors[0]"/>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>App Favicon (optional):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Favicon" v-slot="{ errors }">
<ImageInput v-model="app.favicon" :error="errors[0]"/>
</ValidationProvider>
</div>
<FormLabel class="mt-70">Others Information</FormLabel>
<div class="block-wrapper">
<label>Contact Email:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Contact Email"
rules="required" v-slot="{ errors }">
<input v-model="app.contactMail" placeholder="Type your contact email" type="email" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<label>Google Analytics Code (optional):</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Google Analytics Code"
v-slot="{ errors }">
<input v-model="app.googleAnalytics" placeholder="Paste your Google Analytics Code"
type="text" :class="{'is-error': errors[0]}"/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<div class="input-wrapper">
<div class="inline-wrapper">
<div class="switch-label">
<label class="input-label">Storage Limitation:</label>
<small class="input-help">If this value is off, all users will have infinity storage capacity and you won't be <br/>able to charge your users for storage plan.</small>
</div>
<SwitchInput v-model="app.storageLimitation" class="switch" :state="app.storageLimitation"/>
</div>
</div>
</div>
<div class="block-wrapper" v-if="app.storageLimitation">
<label>Default Storage Space for Accounts:</label>
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Default Storage Space" rules="required" v-slot="{ errors }">
<input v-model="app.defaultStorage"
min="1"
max="999999999"
placeholder="Set default storage space in GB"
type="number"
:class="{'is-error': errors[0]}"
/>
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
</ValidationProvider>
</div>
<div class="block-wrapper">
<div class="input-wrapper">
<div class="inline-wrapper">
<div class="switch-label">
<label class="input-label">Allow User Registration:</label>
<small class="input-help">You can disable public registration for new users. You will still able to <br/>create new users in administration panel.</small>
</div>
<SwitchInput v-model="app.userRegistration" class="switch" :state="app.userRegistration"/>
</div>
</div>
</div>
<div class="submit-wrapper">
<AuthButton icon="chevron-right" text="Save and Upgrade" :loading="isLoading" :disabled="isLoading"/>
</div>
</ValidationObserver>
</AuthContent>
</AuthContentWrapper>
</template>
<script>
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
import AuthContentWrapper from '@/components/Auth/AuthContentWrapper'
import SelectInput from '@/components/Others/Forms/SelectInput'
import SwitchInput from '@/components/Others/Forms/SwitchInput'
import ImageInput from '@/components/Others/Forms/ImageInput'
import FormLabel from '@/components/Others/Forms/FormLabel'
import InfoBox from '@/components/Others/Forms/InfoBox'
import AuthContent from '@/components/Auth/AuthContent'
import AuthButton from '@/components/Auth/AuthButton'
import {SettingsIcon} from 'vue-feather-icons'
import {required} from 'vee-validate/dist/rules'
import {mapGetters} from 'vuex'
import axios from 'axios'
export default {
name: 'EnvironmentSetup',
components: {
AuthContentWrapper,
ValidationProvider,
ValidationObserver,
SettingsIcon,
SelectInput,
SwitchInput,
AuthContent,
ImageInput,
AuthButton,
FormLabel,
required,
InfoBox,
},
computed: {
...mapGetters([
'config'
]),
},
data() {
return {
isLoading: false,
app: {
license: undefined,
purchase_code: '8654194a-3156-4cd0-944e-3440fcecdabb',
title: 'VueFileManager',
description: 'The best app',
logo: undefined,
logo_horizontal: undefined,
favicon: undefined,
contactMail: 'howdy@hi5ve.digital',
googleAnalytics: '',
defaultStorage: '5',
userRegistration: 1,
storageLimitation: 1,
},
}
},
methods: {
storeAppSetup() {
// Create form
let formData = new FormData()
// Add image to form
formData.append('purchase_code', this.app.purchase_code)
formData.append('license', this.app.license)
formData.append('title', this.app.title)
formData.append('description', this.app.description)
formData.append('contactMail', this.app.contactMail)
formData.append('userRegistration', Boolean(this.app.userRegistration) ? 1 : 0)
formData.append('storageLimitation', Boolean(this.app.storageLimitation) ? 1 : 0)
if (this.app.googleAnalytics)
formData.append('googleAnalytics', this.app.googleAnalytics)
if (this.app.defaultStorage)
formData.append('defaultStorage', this.app.defaultStorage)
if (this.app.logo)
formData.append('logo', this.app.logo)
if (this.app.logo_horizontal)
formData.append('logo_horizontal', this.app.logo_horizontal)
if (this.app.favicon)
formData.append('favicon', this.app.favicon)
// Send request to get verify account
axios
.post('/api/upgrade/app', formData, {
headers: {
'Content-Type': 'multipart/form-data',
}
})
.then(response => {
// End loading
this.isLoading = false
// Redirect to next step
this.$router.push({name: 'SignIn'})
})
.catch(error => {
// End loading
this.isLoading = false
})
},
async appSetupSubmit() {
// Validate fields
const isValid = await this.$refs.appSetup.validate();
if (!isValid) return;
// Start loading
this.isLoading = true
// Send request to get verify account
axios
.post('/api/setup/purchase-code', {
purchaseCode: this.app.purchase_code
})
.then(response => {
if (response.data === 'b6896a44017217c36f4a6fdc56699728') {
this.app.license = 'Extended'
this.$store.commit('SET_SAAS', true)
} else {
this.app.license = 'Regular'
}
this.storeAppSetup()
})
.catch(error => {
if (error.response.status == 400) {
// TODO: error message
}
})
.finally(() => {
this.isLoading = false
})
},
},
created() {
if (this.config.latest_upgrade === '1.7')
this.$router.push({name: 'SignIn'})
}
}
</script>
<style scoped lang="scss">
@import '@assets/vue-file-manager/_forms';
@import '@assets/vue-file-manager/_auth';
@import '@assets/vue-file-manager/_setup_wizard';
</style>

View File

@@ -47,7 +47,7 @@
userRegistration: {{ isset($settings->registration) ? $settings->registration : 1 }},
storageLimit: {{ isset($settings->storage_limitation) ? $settings->storage_limitation : 1 }},
storageDefaultSpace: '{{ isset($settings->storage_default) ? format_gigabytes($settings->storage_default) : 5 }}',
storageDefaultSpace: {{ isset($settings->storage_default) ? $settings->storage_default : 5 }},
hasAuthCookie: {{ Cookie::has('token') ? 1 : 0 }},
isSaaS: {{ isset($settings->license) && $settings->license === 'Extended' ? 1 : 0 }},
@@ -56,6 +56,7 @@
legal: {!! isset($legal) ? $legal : 'undefined' !!},
installation: '{{ $installation }}',
latest_upgrade: '{{ isset($settings->latest_upgrade) && $settings->latest_upgrade ? $settings->latest_upgrade : null }}',
}
</script>