mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
chore: remove vuex
unused dependency Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
parent
8832985dad
commit
dd5eae1c62
7 changed files with 2 additions and 87 deletions
12
package-lock.json
generated
12
package-lock.json
generated
|
|
@ -41,8 +41,7 @@
|
|||
"vue-drag-resize": "^1.5.4",
|
||||
"vue-material-design-icons": "^5.3.1",
|
||||
"vue-router": "^3.6.5",
|
||||
"vuelidate": "^0.7.7",
|
||||
"vuex": "^3.6.2"
|
||||
"vuelidate": "^0.7.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.0",
|
||||
|
|
@ -17146,15 +17145,6 @@
|
|||
"npm": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vuex": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
|
||||
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"vue": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz",
|
||||
|
|
|
|||
|
|
@ -52,8 +52,7 @@
|
|||
"vue-drag-resize": "^1.5.4",
|
||||
"vue-material-design-icons": "^5.3.1",
|
||||
"vue-router": "^3.6.5",
|
||||
"vuelidate": "^0.7.7",
|
||||
"vuex": "^3.6.2"
|
||||
"vuelidate": "^0.7.7"
|
||||
},
|
||||
"browserslist": [
|
||||
"extends @nextcloud/browserslist-config"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import App from './App.vue'
|
|||
|
||||
import './plugins/vuelidate.js'
|
||||
import router from './router/router.js'
|
||||
import store from './store/index.js'
|
||||
|
||||
import './assets/styles/main.scss'
|
||||
|
||||
|
|
@ -46,7 +45,6 @@ const pinia = createPinia()
|
|||
export default new Vue({
|
||||
el: '#content',
|
||||
router,
|
||||
store,
|
||||
pinia,
|
||||
render: h => h(App),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import App from './App.vue'
|
|||
|
||||
import './plugins/vuelidate.js'
|
||||
import router from './router/router.js'
|
||||
import store from './store/index.js'
|
||||
|
||||
import './assets/styles/main.scss'
|
||||
import 'vue-advanced-cropper/dist/style.css'
|
||||
|
|
@ -48,7 +47,6 @@ export default new Vue({
|
|||
el: '#content',
|
||||
name: 'LibresignApp',
|
||||
router,
|
||||
store,
|
||||
pinia,
|
||||
render: h => h(App),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2021 LibreCode coop and LibreCode contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import Vue, { set } from 'vue'
|
||||
import Vuex, { Store } from 'vuex'
|
||||
|
||||
import files from './modules/files.js'
|
||||
import settings from './modules/settings.js'
|
||||
import sidebar from './modules/sidebar.js'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Store({
|
||||
|
||||
state: {
|
||||
errors: [],
|
||||
pdfData: {},
|
||||
},
|
||||
|
||||
mutations: {
|
||||
setError: (state, errorMessage) => {
|
||||
state.errors = errorMessage
|
||||
},
|
||||
setPdfData(state, pdfData) {
|
||||
if (pdfData.pdf.url) {
|
||||
set(state.pdfData, 'url', pdfData.pdf.url)
|
||||
} else {
|
||||
set(state.pdfData, 'base64', `data:application/pdf;base64,${pdfData.pdf.base64}`)
|
||||
}
|
||||
set(state.pdfData, 'description', pdfData.description)
|
||||
set(state.pdfData, 'filename', pdfData.filename)
|
||||
},
|
||||
setHasPfx(state, haspfx) {
|
||||
set(state.settings, 'hasSignatureFile', haspfx)
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
SET_ERROR: ({ commit }, errorMessage) => {
|
||||
commit('setError', errorMessage)
|
||||
},
|
||||
RESET_ERROR: ({ commit }) => {
|
||||
commit('setError', [])
|
||||
},
|
||||
},
|
||||
|
||||
getters: {
|
||||
getErrors: state => {
|
||||
return state.errors
|
||||
},
|
||||
getHasPfx(state) {
|
||||
return state.settings.hasSignatureFile
|
||||
},
|
||||
getPdfData(state) {
|
||||
return state.pdfData
|
||||
},
|
||||
},
|
||||
|
||||
modules: {
|
||||
settings,
|
||||
sidebar,
|
||||
files,
|
||||
},
|
||||
})
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import { createPinia, PiniaVuePlugin } from 'pinia'
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { translate, translatePlural } from '@nextcloud/l10n'
|
||||
|
|
@ -19,7 +18,6 @@ import './style/icons.scss'
|
|||
|
||||
Vue.prototype.t = translate
|
||||
Vue.prototype.n = translatePlural
|
||||
Vue.use(Vuex)
|
||||
|
||||
if (!window.OCA.Libresign) {
|
||||
window.OCA.Libresign = {}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import { generateFilePath } from '@nextcloud/router'
|
|||
import Validation from './views/Validation.vue'
|
||||
|
||||
import router from './router/router.js'
|
||||
import store from './store/index.js'
|
||||
|
||||
// CSP config for webpack dynamic chunk loading
|
||||
// eslint-disable-next-line
|
||||
|
|
@ -35,6 +34,5 @@ export default new Vue({
|
|||
// eslint-disable-next-line vue/match-component-file-name
|
||||
name: 'Validation',
|
||||
router,
|
||||
store,
|
||||
render: (h) => h(Validation),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue