Merge branch 'main' into refactor/ui
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import clone from "lodash/clone"
|
||||
import assign from "lodash/assign"
|
||||
import eq from "lodash/eq"
|
||||
import isEmpty from "lodash/isEmpty"
|
||||
import {
|
||||
settingsStore,
|
||||
bulkApplySettings,
|
||||
@@ -27,39 +27,46 @@ import { replaceEnvironments, environments$ } from "./environments"
|
||||
|
||||
function checkAndMigrateOldSettings() {
|
||||
const vuexData = JSON.parse(window.localStorage.getItem("vuex") || "{}")
|
||||
if (eq(vuexData, {})) return
|
||||
if (isEmpty(vuexData)) return
|
||||
|
||||
if (vuexData.postwoman && vuexData.postwoman.settings) {
|
||||
const settingsData = clone(defaultSettings)
|
||||
assign(settingsData, vuexData.postwoman.settings)
|
||||
const { postwoman } = vuexData
|
||||
|
||||
if (!isEmpty(postwoman?.settings)) {
|
||||
const settingsData = assign(clone(defaultSettings), postwoman.settings)
|
||||
|
||||
window.localStorage.setItem("settings", JSON.stringify(settingsData))
|
||||
|
||||
delete vuexData.postwoman.settings
|
||||
delete postwoman.settings
|
||||
window.localStorage.setItem("vuex", JSON.stringify(vuexData))
|
||||
}
|
||||
|
||||
if (vuexData.postwoman && vuexData.postwoman.collections) {
|
||||
const restColls = vuexData.postwoman.collections
|
||||
window.localStorage.setItem("collections", JSON.stringify(restColls))
|
||||
if (postwoman?.collections) {
|
||||
window.localStorage.setItem(
|
||||
"collections",
|
||||
JSON.stringify(postwoman.collections)
|
||||
)
|
||||
|
||||
delete vuexData.postwoman.collections
|
||||
delete postwoman.collections
|
||||
window.localStorage.setItem("vuex", JSON.stringify(vuexData))
|
||||
}
|
||||
|
||||
if (vuexData.postwoman && vuexData.postwoman.collectionsGraphql) {
|
||||
const gqlColls = vuexData.postwoman.collectionsGraphql
|
||||
window.localStorage.setItem("collectionsGraphql", JSON.stringify(gqlColls))
|
||||
if (postwoman?.collectionsGraphql) {
|
||||
window.localStorage.setItem(
|
||||
"collectionsGraphql",
|
||||
JSON.stringify(postwoman.collectionsGraphql)
|
||||
)
|
||||
|
||||
delete vuexData.postwoman.collectionsGraphql
|
||||
delete postwoman.collectionsGraphql
|
||||
window.localStorage.setItem("vuex", JSON.stringify(vuexData))
|
||||
}
|
||||
|
||||
if (vuexData.postwoman && vuexData.postwoman.environments) {
|
||||
const envs = vuexData.postwoman.environments
|
||||
window.localStorage.setItem("environments", JSON.stringify(envs))
|
||||
if (postwoman?.environments) {
|
||||
window.localStorage.setItem(
|
||||
"environments",
|
||||
JSON.stringify(postwoman.environments)
|
||||
)
|
||||
|
||||
delete vuexData.postwoman.environments
|
||||
delete postwoman.environments
|
||||
window.localStorage.setItem("vuex", JSON.stringify(vuexData))
|
||||
}
|
||||
|
||||
|
||||
30660
package-lock.json
generated
30660
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
"core-js": "^3.16.1",
|
||||
"esprima": "^4.0.1",
|
||||
"firebase": "^8.9.1",
|
||||
"graphql": "^15.5.0",
|
||||
"graphql": "^15.5.1",
|
||||
"graphql-language-service-interface": "^2.8.4",
|
||||
"json-loader": "^0.5.7",
|
||||
"lodash": "^4.17.21",
|
||||
@@ -63,7 +63,7 @@
|
||||
"@babel/preset-env": "^7.15.0",
|
||||
"@commitlint/cli": "^13.1.0",
|
||||
"@commitlint/config-conventional": "^13.1.0",
|
||||
"@nuxt/types": "^2.15.7",
|
||||
"@nuxt/types": "^2.15.8",
|
||||
"@nuxt/typescript-build": "^2.1.0",
|
||||
"@nuxtjs/color-mode": "^2.1.1",
|
||||
"@nuxtjs/dotenv": "^1.4.1",
|
||||
@@ -84,12 +84,12 @@
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-nuxt": ">=2.0.0",
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"eslint-plugin-vue": "^7.15.1",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"husky": "^7.0.1",
|
||||
"jest": "^27.0.6",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"lint-staged": "^11.1.2",
|
||||
"nuxt-windicss": "^1.2.2",
|
||||
"nuxt-windicss": "^1.2.3",
|
||||
"prettier": "^2.3.2",
|
||||
"pretty-quick": "^3.1.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
|
||||
Reference in New Issue
Block a user