Skip to content

Commit

Permalink
Remove secure ls
Browse files Browse the repository at this point in the history
  • Loading branch information
elirehema committed Sep 11, 2024
1 parent 20572b6 commit cf08dff
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 56 deletions.
77 changes: 35 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"apexcharts": "^3.36.3",
"cookie-universal-nuxt": "^2.2.1",
"core-js": "^3.23.5",
"encrypt-storage": "2.13.3",
"fibers": "^5.0.1",
"fs-extra": "^10.1.0",
"nuxt": "^2.17.3",
"vue": "^2.7.10",
"nuxt-material-design-icons": "^1.0.4",
"secure-ls": "^1.2.6",
"sweetalert": "^2.1.2",
"vue-apexcharts": "^1.6.2",
"vue-i18n": "^8.26.5",
Expand Down
28 changes: 15 additions & 13 deletions plugins/vuepersistence.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import createPersistedState from "vuex-persistedstate";
import SecureLS from "secure-ls";
const ls = new SecureLS({ isCompression: false });
import createPersistedState from 'vuex-persistedstate'
// import SecureLS from 'secure-ls'
// const ls = new SecureLS({ isCompression: false })
import { EncryptStorage } from 'encrypt-storage'

export const encryptStorage = new EncryptStorage('U2FsdGVkX1/2KEwOH+w4QaIcyq5521ZXB5pqw', {
doNotEncryptValues: false
})
export default ({ store }) => {
window.onNuxtReady(() => {
createPersistedState({
paths: [
"authentication", "inventory", "profile", "diagnoses",
"templates", "users", "patients", "documents", "statistics", "theme", "smsconfiguration", "statisitics",
"consultations", "departments", "medicalservices", "laboratory", 'bills', 'radiology', 'reports', 'accounting',
'servicetypes', 'pharmarcy', 'configuration', 'notifications',],
'authentication', 'reports'
],
storage: {
getItem: key => ls.get(key),
setItem: (key, value) => ls.set(key, value),
removeItem: key => ls.remove(key)
getItem: key => encryptStorage.getItem1f511_key,
setItem: (key, value) => encryptStorage.setItem(key, value),
removeItem: key => encryptStorage.removeItem1f511_key
}
})(store);
});
};
})(store)
})
}

0 comments on commit cf08dff

Please sign in to comment.