+
{{ user.data.meta.usages.costEstimate }}
diff --git a/resources/js/store/modules/app.js b/resources/js/store/modules/app.js
index 1ae39806..07933ab5 100644
--- a/resources/js/store/modules/app.js
+++ b/resources/js/store/modules/app.js
@@ -4,185 +4,191 @@ import Vue from 'vue'
import router from "../../router";
const defaultState = {
- isVisibleNavigationBars: localStorage.getItem('is_navigation_bars') !== 'false',
- isDarkMode: false,
- isVisibleSidebar: localStorage.getItem('file_info_visibility') === 'true' || false,
- itemViewType: localStorage.getItem('preview_type') || 'list',
- config: undefined,
- index: undefined,
- requestedPlan: undefined,
- emojis: undefined,
- sorting: {
- sort: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).sort : 'DESC',
- field: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).field : 'created_at',
- },
+ isVisibleNavigationBars: localStorage.getItem('is_navigation_bars') !== 'false',
+ isDarkMode: false,
+ isVisibleSidebar: localStorage.getItem('file_info_visibility') === 'true' || false,
+ itemViewType: localStorage.getItem('preview_type') || 'list',
+ config: undefined,
+ index: undefined,
+ requestedPlan: undefined,
+ emojis: undefined,
+ sorting: {
+ sort: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).sort : 'DESC',
+ field: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).field : 'created_at',
+ },
}
const actions = {
- toggleThemeMode: ({ commit }, mode = undefined) => {
- const app = document.getElementsByTagName('html')[0]
+ toggleThemeMode: ({commit}, mode = undefined) => {
+ const app = document.getElementsByTagName('html')[0]
- if (!mode) {
- mode = app.classList.contains('dark') ? 'light' : 'dark'
- }
+ if (!mode) {
+ mode = app.classList.contains('dark') ? 'light' : 'dark'
+ }
- commit('REPLACE_CONFIG_VALUE', {
- key: 'defaultThemeMode',
- value: mode,
- })
+ commit('REPLACE_CONFIG_VALUE', {
+ key: 'defaultThemeMode',
+ value: mode,
+ })
- // Update user settings
- if (! Vue.prototype.$isThisRoute(router.currentRoute, ['Public'])) {
- Vue.prototype.$updateText('/user/settings', 'theme_mode', mode)
- }
- },
- toggleNavigationBars: ({ commit, state }) => {
- // Store dark mode into localStorage
- localStorage.setItem('is_navigation_bars', !state.isVisibleNavigationBars)
+ // Update user settings
+ if (!Vue.prototype.$isThisRoute(router.currentRoute, ['Public'])) {
+ Vue.prototype.$updateText('/user/settings', 'theme_mode', mode)
+ }
+ },
+ toggleNavigationBars: ({commit, state}) => {
+ // Store dark mode into localStorage
+ localStorage.setItem('is_navigation_bars', !state.isVisibleNavigationBars)
- // Change preview
- commit('TOGGLE_NAVIGATION_BARS')
- },
- togglePreviewType: ({ commit, state }, preview) => {
- // Get preview type
- let previewType = preview ? preview : state.itemViewType === 'list' ? 'grid' : 'list'
+ // Change preview
+ commit('TOGGLE_NAVIGATION_BARS')
+ },
+ togglePreviewType: ({commit, state}, preview) => {
+ // Get preview type
+ let previewType = preview ? preview : state.itemViewType === 'list' ? 'grid' : 'list'
- // Store preview type to localStorage
- localStorage.setItem('preview_type', previewType)
+ // Store preview type to localStorage
+ localStorage.setItem('preview_type', previewType)
- // Change preview
- commit('CHANGE_PREVIEW', previewType)
- },
- toggleEmojiType: ({ commit, getters }, type = undefined) => {
- let newType = type ? type : getters.config.defaultEmoji === 'twemoji' ? 'applemoji' : 'twemoji'
+ // Change preview
+ commit('CHANGE_PREVIEW', previewType)
+ },
+ toggleEmojiType: ({commit, getters}, type = undefined) => {
+ let newType = type ? type : getters.config.defaultEmoji === 'twemoji' ? 'applemoji' : 'twemoji'
- // Update config
- commit('REPLACE_CONFIG_VALUE', {
- key: 'defaultEmoji',
- value: newType,
- })
+ // Update config
+ commit('REPLACE_CONFIG_VALUE', {
+ key: 'defaultEmoji',
+ value: newType,
+ })
- // Update user settings
- Vue.prototype.$updateText('/user/settings', 'emoji_type', newType)
- },
- fileInfoToggle: (context, visibility = undefined) => {
- if (!visibility) {
- if (context.state.isVisibleSidebar) {
- context.commit('FILE_INFO_TOGGLE', false)
- } else {
- context.commit('FILE_INFO_TOGGLE', true)
- }
- } else {
- context.commit('FILE_INFO_TOGGLE', visibility)
- }
- },
- getLanguageTranslations: ({ commit, state }, lang) => {
- return new Promise((resolve, reject) => {
- axios.get(`/translations/${lang}`).then((response) => {
- i18n.setLocaleMessage(lang, response.data)
- i18n.locale = lang
+ // Update user settings
+ Vue.prototype.$updateText('/user/settings', 'emoji_type', newType)
+ },
+ fileInfoToggle: (context, visibility = undefined) => {
+ if (!visibility) {
+ if (context.state.isVisibleSidebar) {
+ context.commit('FILE_INFO_TOGGLE', false)
+ } else {
+ context.commit('FILE_INFO_TOGGLE', true)
+ }
+ } else {
+ context.commit('FILE_INFO_TOGGLE', visibility)
+ }
+ },
+ getLanguageTranslations: ({commit, state}, lang) => {
+ return new Promise((resolve, reject) => {
+ axios.get(`/translations/${lang}`)
+ .then((response) => {
+ i18n.setLocaleMessage(lang, response.data)
+ i18n.locale = lang
- resolve(response)
- })
- })
- },
+ resolve(response)
+ })
+ .catch((error) => {
+ if (!error.response) {
+ location.reload()
+ }
+ })
+ })
+ },
}
const mutations = {
- LOAD_EMOJIS_LIST(state, data) {
- state.emojis = data
- },
- UPDATE_SORTING(state) {
- state.sorting.field = JSON.parse(localStorage.getItem('sorting')).field
- state.sorting.sort = JSON.parse(localStorage.getItem('sorting')).sort
- },
- INIT(state, data) {
- state.config = data.config
- },
- SET_SAAS(state, data) {
- state.config.isSaaS = data
- },
- FILE_INFO_TOGGLE(state, isVisible) {
- state.isVisibleSidebar = isVisible
+ LOAD_EMOJIS_LIST(state, data) {
+ state.emojis = data
+ },
+ UPDATE_SORTING(state) {
+ state.sorting.field = JSON.parse(localStorage.getItem('sorting')).field
+ state.sorting.sort = JSON.parse(localStorage.getItem('sorting')).sort
+ },
+ INIT(state, data) {
+ state.config = data.config
+ },
+ SET_SAAS(state, data) {
+ state.config.isSaaS = data
+ },
+ FILE_INFO_TOGGLE(state, isVisible) {
+ state.isVisibleSidebar = isVisible
- localStorage.setItem('file_info_visibility', isVisible)
- },
- SET_AUTHORIZED(state, value) {
- state.config.isAuthenticated = value
- },
- SET_INDEX_CONTENT(state, data) {
- state.index = data
- },
- CHANGE_PREVIEW(state, type) {
- state.itemViewType = type
- },
- TOGGLE_NAVIGATION_BARS(state) {
- state.isVisibleNavigationBars = !state.isVisibleNavigationBars
- },
- STORE_REQUESTED_PLAN(state, plan) {
- state.requestedPlan = plan
- },
- REPLACE_CONFIG_VALUE(state, { key, value }) {
- state.config[key] = value
- },
- SET_SOCIAL_LOGIN_CONFIGURED(state, service) {
- if (service === 'facebook') {
- state.config.allowedFacebookLogin = true
- state.config.isFacebookLoginConfigured = true
- }
+ localStorage.setItem('file_info_visibility', isVisible)
+ },
+ SET_AUTHORIZED(state, value) {
+ state.config.isAuthenticated = value
+ },
+ SET_INDEX_CONTENT(state, data) {
+ state.index = data
+ },
+ CHANGE_PREVIEW(state, type) {
+ state.itemViewType = type
+ },
+ TOGGLE_NAVIGATION_BARS(state) {
+ state.isVisibleNavigationBars = !state.isVisibleNavigationBars
+ },
+ STORE_REQUESTED_PLAN(state, plan) {
+ state.requestedPlan = plan
+ },
+ REPLACE_CONFIG_VALUE(state, {key, value}) {
+ state.config[key] = value
+ },
+ SET_SOCIAL_LOGIN_CONFIGURED(state, service) {
+ if (service === 'facebook') {
+ state.config.allowedFacebookLogin = true
+ state.config.isFacebookLoginConfigured = true
+ }
- if (service === 'google') {
- state.config.allowedGoogleLogin = true
- state.config.isGoogleLoginConfigured = true
- }
+ if (service === 'google') {
+ state.config.allowedGoogleLogin = true
+ state.config.isGoogleLoginConfigured = true
+ }
- if (service === 'github') {
- state.config.allowedGithubLogin = true
- state.config.isGithubLoginConfigured = true
- }
+ if (service === 'github') {
+ state.config.allowedGithubLogin = true
+ state.config.isGithubLoginConfigured = true
+ }
- if (service === 'recaptcha') {
- state.config.allowedRecaptcha = true
- state.config.isRecaptchaConfigured = true
- }
- },
- SET_STRIPE_CREDENTIALS(state, data) {
- state.config.stripe_public_key = data.key
- state.config.isStripe = true
- },
- SET_PAYSTACK_CREDENTIALS(state, data) {
- state.config.paystack_public_key = data.key
- state.config.isPaystack = true
- },
- SET_PAYPAL_CREDENTIALS(state, data) {
- state.config.paypal_client_id = data.key
- state.config.isPayPal = true
- },
- UPDATE_DARK_MODE_STATUS(state, val) {
- state.isDarkMode = val
- },
+ if (service === 'recaptcha') {
+ state.config.allowedRecaptcha = true
+ state.config.isRecaptchaConfigured = true
+ }
+ },
+ SET_STRIPE_CREDENTIALS(state, data) {
+ state.config.stripe_public_key = data.key
+ state.config.isStripe = true
+ },
+ SET_PAYSTACK_CREDENTIALS(state, data) {
+ state.config.paystack_public_key = data.key
+ state.config.isPaystack = true
+ },
+ SET_PAYPAL_CREDENTIALS(state, data) {
+ state.config.paypal_client_id = data.key
+ state.config.isPayPal = true
+ },
+ UPDATE_DARK_MODE_STATUS(state, val) {
+ state.isDarkMode = val
+ },
}
const getters = {
- isVisibleNavigationBars: (state) => state.isVisibleNavigationBars,
- isVisibleSidebar: (state) => state.isVisibleSidebar,
- itemViewType: (state) => state.itemViewType,
- requestedPlan: (state) => state.requestedPlan,
- api: (state) => state.config.api,
- config: (state) => state.config,
- emojis: (state) => state.emojis,
- index: (state) => state.index,
- isDarkMode: (state) => state.isDarkMode,
- sorting: (state) => {
- return {
- sorting: state.sorting,
- URI: '?sort=' + state.sorting.field + '&direction=' + state.sorting.sort,
- }
- },
+ isVisibleNavigationBars: (state) => state.isVisibleNavigationBars,
+ isVisibleSidebar: (state) => state.isVisibleSidebar,
+ itemViewType: (state) => state.itemViewType,
+ requestedPlan: (state) => state.requestedPlan,
+ api: (state) => state.config.api,
+ config: (state) => state.config,
+ emojis: (state) => state.emojis,
+ index: (state) => state.index,
+ isDarkMode: (state) => state.isDarkMode,
+ sorting: (state) => {
+ return {
+ sorting: state.sorting,
+ URI: '?sort=' + state.sorting.field + '&direction=' + state.sorting.sort,
+ }
+ },
}
export default {
- state: defaultState,
- getters,
- actions,
- mutations,
+ state: defaultState,
+ getters,
+ actions,
+ mutations,
}
diff --git a/resources/js/views/FileView/Components/PanelNavigationFiles.vue b/resources/js/views/FileView/Components/PanelNavigationFiles.vue
index 2827f737..dcabbb8a 100644
--- a/resources/js/views/FileView/Components/PanelNavigationFiles.vue
+++ b/resources/js/views/FileView/Components/PanelNavigationFiles.vue
@@ -23,7 +23,7 @@
-
+
{{ $t("There isn't any folder.") }}
@@ -39,7 +39,7 @@
class="border-2 border-dashed border-transparent"
>
-
+
{{ $t('sidebar.favourites_empty') }}
diff --git a/resources/js/views/SetupWizard.vue b/resources/js/views/SetupWizard.vue
index 1a9e74cd..3c51dd73 100644
--- a/resources/js/views/SetupWizard.vue
+++ b/resources/js/views/SetupWizard.vue
@@ -8,7 +8,8 @@
mounted() {
let status = this.$root.$data.config.installation
- //if (status && status === 'setup-done') this.$router.push({ name: 'SignIn' })
+ if (status && status === 'installation-done')
+ this.$router.push({ name: 'SignIn' })
},
}
diff --git a/resources/js/views/SetupWizard/AdminAccount.vue b/resources/js/views/SetupWizard/AdminAccount.vue
index 23eb75a1..9cc23b27 100644
--- a/resources/js/views/SetupWizard/AdminAccount.vue
+++ b/resources/js/views/SetupWizard/AdminAccount.vue
@@ -119,41 +119,19 @@ export default {
if (this.admin.avatar) formData.append('avatar', this.admin.avatar)
axios
- .post('/api/setup/admin-setup', formData, {
+ .post('/admin-setup', formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
.then((response) => {
- // End loading
- this.isLoading = false
- // Set login state
- this.$store.commit('SET_AUTHORIZED', true)
-
- if (localStorage.getItem('license') === 'Extended') {
- this.$store.commit('SET_SAAS', true)
- }
-
- // Go to files page
- this.$router.push({ name: 'Dashboard' })
-
- // Remove license from localStorage
- localStorage.removeItem('purchase_code')
- localStorage.removeItem('license')
+ // Go to sign page
+ window.location = '/sign-in'
})
.catch((error) => {
- if (error.response.status == 401) {
- if (error.response.data.error === 'invalid_client') {
- events.$emit('alert:open', {
- emoji: '🤔',
- title: this.$t('popup_passport_error.title'),
- message: this.$t('popup_passport_error.message'),
- })
- }
- }
- if (error.response.status == 500) {
+ if (error.response.status === 500) {
events.$emit('alert:open', {
emoji: '🤔',
title: this.$t('popup_signup_error.title'),
@@ -161,7 +139,7 @@ export default {
})
}
- if (error.response.status == 422) {
+ if (error.response.status === 422) {
if (error.response.data.errors['email']) {
this.$refs.adminAccount.setErrors({
Email: error.response.data.errors['email'],
@@ -175,13 +153,21 @@ export default {
}
}
- // End loading
- this.isLoading = false
- })
+ }).finally(() => this.isLoading = false)
},
},
created() {
this.$scrollTop()
+
+ if (this.$root.$data.config.isSetupWizardDebug) {
+ this.admin = {
+ name: 'Jane Doe',
+ email: 'howdy@hi5ve.digital',
+ avatar: undefined,
+ password: 'vuefilemanager',
+ password_confirmation: 'vuefilemanager',
+ }
+ }
},
}
diff --git a/resources/js/views/SetupWizard/AppSetup.vue b/resources/js/views/SetupWizard/AppSetup.vue
index e18b05dc..72253497 100644
--- a/resources/js/views/SetupWizard/AppSetup.vue
+++ b/resources/js/views/SetupWizard/AppSetup.vue
@@ -106,12 +106,12 @@
-
+
Subscription
-
+
@@ -165,6 +165,7 @@ export default {
data() {
return {
isLoading: false,
+ isExtended: undefined,
app: {
color: '#00BC7E',
subscriptionType: undefined,
@@ -254,6 +255,20 @@ export default {
},
created() {
this.$scrollTop()
+
+ this.isExtended = localStorage.getItem('license') === 'Extended'
+
+ if (this.$root.$data.config.isSetupWizardDebug) {
+ this.app.subscriptionType = 'metered'
+ this.app.title = 'VueFileManager'
+ this.app.description = 'Your private cloud storage software build on Laravel & Vue.js.'
+ this.app.contactMail = 'howdy@hi5ve.digital'
+ this.app.googleAnalytics = 'UA-123456789'
+ this.app.defaultStorage = '5'
+ this.app.userRegistration = 1
+ this.app.storageLimitation = 1
+ this.app.userVerification = 0
+ }
},
}
diff --git a/resources/js/views/SetupWizard/Database.vue b/resources/js/views/SetupWizard/Database.vue
index b4bdd91b..d1881d22 100644
--- a/resources/js/views/SetupWizard/Database.vue
+++ b/resources/js/views/SetupWizard/Database.vue
@@ -139,6 +139,7 @@ export default {
async databaseCredentialsSubmit() {
if (this.$root.$data.config.isSetupWizardDemo) {
this.$router.push({name: 'EnvironmentSetup'})
+ return
}
// Validate fields
@@ -158,7 +159,7 @@ export default {
this.isLoading = false
// Redirect to next step
- this.$router.push({ name: 'InstallationDisclaimer' })
+ this.$router.push({ name: 'EnvironmentSetup' })
})
.catch((error) => {
if ((error.response.status = 500)) {
@@ -173,6 +174,17 @@ export default {
},
created() {
this.$scrollTop()
+
+ if (this.$root.$data.config.isSetupWizardDebug) {
+ this.databaseCredentials = {
+ connection: 'mysql',
+ host: '127.0.0.1',
+ port: '3306',
+ name: 'vuefilemanager-v2',
+ username: 'root',
+ password: 'secret',
+ }
+ }
},
}
diff --git a/resources/js/views/SetupWizard/EnvironmentSetup.vue b/resources/js/views/SetupWizard/EnvironmentSetup.vue
index 0df091d0..4b328bfa 100644
--- a/resources/js/views/SetupWizard/EnvironmentSetup.vue
+++ b/resources/js/views/SetupWizard/EnvironmentSetup.vue
@@ -13,7 +13,7 @@
-
+
@@ -33,7 +33,7 @@
-
+
@@ -56,7 +56,7 @@
-
+
@@ -87,7 +87,7 @@
-
+
@@ -147,8 +147,18 @@
+