Fix OpnForm production
This commit is contained in:
parent
0334f7c883
commit
a912a10145
|
|
@ -29,7 +29,6 @@
|
||||||
"fuse.js": "^6.4.6",
|
"fuse.js": "^6.4.6",
|
||||||
"js-sha256": "^0.10.0",
|
"js-sha256": "^0.10.0",
|
||||||
"libphonenumber-js": "^1.10.44",
|
"libphonenumber-js": "^1.10.44",
|
||||||
"lzutf8": "^0.6.3",
|
|
||||||
"object-to-formdata": "^4.5.1",
|
"object-to-formdata": "^4.5.1",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"prismjs": "^1.24.1",
|
"prismjs": "^1.24.1",
|
||||||
|
|
@ -9560,14 +9559,6 @@
|
||||||
"yallist": "^3.0.2"
|
"yallist": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lzutf8": {
|
|
||||||
"version": "0.6.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/lzutf8/-/lzutf8-0.6.3.tgz",
|
|
||||||
"integrity": "sha512-CAkF9HKrM+XpB0f3DepQ2to2iUEo0zrbh+XgBqgNBc1+k8HMM3u/YSfHI3Dr4GmoTIez2Pr/If1XFl3rU26AwA==",
|
|
||||||
"dependencies": {
|
|
||||||
"readable-stream": "^4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/magic-string": {
|
"node_modules/magic-string": {
|
||||||
"version": "0.30.8",
|
"version": "0.30.8",
|
||||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz",
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz",
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
"fuse.js": "^6.4.6",
|
"fuse.js": "^6.4.6",
|
||||||
"js-sha256": "^0.10.0",
|
"js-sha256": "^0.10.0",
|
||||||
"libphonenumber-js": "^1.10.44",
|
"libphonenumber-js": "^1.10.44",
|
||||||
"lzutf8": "^0.6.3",
|
|
||||||
"object-to-formdata": "^4.5.1",
|
"object-to-formdata": "^4.5.1",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"prismjs": "^1.24.1",
|
"prismjs": "^1.24.1",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import {computed, reactive} from 'vue'
|
import {computed, reactive} from 'vue'
|
||||||
import {compress, decompress} from 'lzutf8'
|
|
||||||
import debounce from 'debounce'
|
import debounce from 'debounce'
|
||||||
import {hash} from "~/lib/utils.js"
|
import {hash} from "~/lib/utils.js"
|
||||||
|
|
||||||
|
|
@ -13,19 +12,13 @@ function mergeOptions(options) {
|
||||||
max: 30,
|
max: 30,
|
||||||
persistent: false,
|
persistent: false,
|
||||||
persistentStrategy: {
|
persistentStrategy: {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
get: function (store, type) {
|
get: function (store, type) {
|
||||||
if (typeof localStorage !== 'undefined') {
|
// Todo
|
||||||
const key = `pinia-history-${store.$id}-${type}`
|
|
||||||
const value = localStorage.getItem(key)
|
|
||||||
return value ? decompress(value, {inputEncoding: 'Base64'}).split(',') : undefined
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
set: function (store, type, value) {
|
set: function (store, type, value) {
|
||||||
if (typeof localStorage !== 'undefined') {
|
// Todo
|
||||||
const key = `pinia-history-${store.$id}-${type}`
|
|
||||||
const string = compress(value.join(','), {outputEncoding: 'Base64'})
|
|
||||||
localStorage.setItem(key, string)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
remove: function (store, type) {
|
remove: function (store, type) {
|
||||||
if (typeof localStorage !== 'undefined') {
|
if (typeof localStorage !== 'undefined') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue