mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
store refactoring
This commit is contained in:
2
resources/js/helpers/SubscriptionHelpers.js
vendored
2
resources/js/helpers/SubscriptionHelpers.js
vendored
@@ -1,5 +1,3 @@
|
|||||||
import store from '../store/index'
|
|
||||||
|
|
||||||
const ValidatorHelpers = {
|
const ValidatorHelpers = {
|
||||||
install(Vue) {
|
install(Vue) {
|
||||||
Vue.prototype.$generatePaystackReference = function () {
|
Vue.prototype.$generatePaystackReference = function () {
|
||||||
|
|||||||
1
resources/js/main.js
vendored
1
resources/js/main.js
vendored
@@ -21,6 +21,7 @@ Vue.use(functionHelpers)
|
|||||||
Vue.use(AlertHelpers)
|
Vue.use(AlertHelpers)
|
||||||
Vue.use(itemHelpers)
|
Vue.use(itemHelpers)
|
||||||
|
|
||||||
|
// ReCaptcha configuration
|
||||||
if (config.allowedRecaptcha) {
|
if (config.allowedRecaptcha) {
|
||||||
Vue.use(VueReCaptcha, {
|
Vue.use(VueReCaptcha, {
|
||||||
siteKey: config.recaptcha_client_id,
|
siteKey: config.recaptcha_client_id,
|
||||||
|
|||||||
8
resources/js/store/modules/app.js
vendored
8
resources/js/store/modules/app.js
vendored
@@ -12,7 +12,6 @@ const defaultState = {
|
|||||||
itemViewType: localStorage.getItem('preview_type') || 'list',
|
itemViewType: localStorage.getItem('preview_type') || 'list',
|
||||||
config: undefined,
|
config: undefined,
|
||||||
index: undefined,
|
index: undefined,
|
||||||
requestedPlan: undefined,
|
|
||||||
emojis: undefined,
|
emojis: undefined,
|
||||||
sorting: {
|
sorting: {
|
||||||
sort: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).sort : 'DESC',
|
sort: localStorage.getItem('sorting') ? JSON.parse(localStorage.getItem('sorting')).sort : 'DESC',
|
||||||
@@ -107,9 +106,6 @@ const mutations = {
|
|||||||
INIT(state, data) {
|
INIT(state, data) {
|
||||||
state.config = data.config
|
state.config = data.config
|
||||||
},
|
},
|
||||||
SET_SAAS(state, data) {
|
|
||||||
state.config.isSaaS = data
|
|
||||||
},
|
|
||||||
FILE_INFO_TOGGLE(state, isVisible) {
|
FILE_INFO_TOGGLE(state, isVisible) {
|
||||||
state.isVisibleSidebar = isVisible
|
state.isVisibleSidebar = isVisible
|
||||||
|
|
||||||
@@ -127,9 +123,6 @@ const mutations = {
|
|||||||
TOGGLE_NAVIGATION_BARS(state) {
|
TOGGLE_NAVIGATION_BARS(state) {
|
||||||
state.isVisibleNavigationBars = !state.isVisibleNavigationBars
|
state.isVisibleNavigationBars = !state.isVisibleNavigationBars
|
||||||
},
|
},
|
||||||
STORE_REQUESTED_PLAN(state, plan) {
|
|
||||||
state.requestedPlan = plan
|
|
||||||
},
|
|
||||||
REPLACE_CONFIG_VALUE(state, { key, value }) {
|
REPLACE_CONFIG_VALUE(state, { key, value }) {
|
||||||
state.config[key] = value
|
state.config[key] = value
|
||||||
},
|
},
|
||||||
@@ -189,7 +182,6 @@ const getters = {
|
|||||||
notificationCount: (state) => state.notificationCount,
|
notificationCount: (state) => state.notificationCount,
|
||||||
isVisibleSidebar: (state) => state.isVisibleSidebar,
|
isVisibleSidebar: (state) => state.isVisibleSidebar,
|
||||||
itemViewType: (state) => state.itemViewType,
|
itemViewType: (state) => state.itemViewType,
|
||||||
requestedPlan: (state) => state.requestedPlan,
|
|
||||||
api: (state) => state.config.api,
|
api: (state) => state.config.api,
|
||||||
config: (state) => state.config,
|
config: (state) => state.config,
|
||||||
emojis: (state) => state.emojis,
|
emojis: (state) => state.emojis,
|
||||||
|
|||||||
3
resources/js/store/modules/sharing.js
vendored
3
resources/js/store/modules/sharing.js
vendored
@@ -102,9 +102,6 @@ const mutations = {
|
|||||||
SET_SHARED_DETAIL(state, data) {
|
SET_SHARED_DETAIL(state, data) {
|
||||||
state.sharedDetail = data
|
state.sharedDetail = data
|
||||||
},
|
},
|
||||||
STORE_SHARED_FILE(state, data) {
|
|
||||||
state.sharedFile = data
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
const getters = {
|
const getters = {
|
||||||
permissionOptions: (state) => state.permissionOptions,
|
permissionOptions: (state) => state.permissionOptions,
|
||||||
|
|||||||
3
resources/js/store/modules/userAuth.js
vendored
3
resources/js/store/modules/userAuth.js
vendored
@@ -178,9 +178,6 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
PUSH_NEW_NOTIFICATION(state, notification) {
|
|
||||||
state.user.data.relationships.unreadNotifications.data.push(notification)
|
|
||||||
},
|
|
||||||
FLUSH_NOTIFICATIONS(state) {
|
FLUSH_NOTIFICATIONS(state) {
|
||||||
state.user.data.relationships.readNotifications.data = []
|
state.user.data.relationships.readNotifications.data = []
|
||||||
state.user.data.relationships.unreadNotifications.data = []
|
state.user.data.relationships.unreadNotifications.data = []
|
||||||
|
|||||||
Reference in New Issue
Block a user