Improve performance by fixing multiple instances of redundant client app initialisations
This commit is contained in:
parent
575636ed3d
commit
6e0e89bbf7
|
@ -667,16 +667,14 @@ export const getFrontendStore = () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Select the parent if cutting
|
// Select the parent if cutting
|
||||||
if (cut) {
|
if (cut && selectParent) {
|
||||||
const screen = get(selectedScreen)
|
const screen = get(selectedScreen)
|
||||||
const parent = findComponentParent(screen?.props, component._id)
|
const parent = findComponentParent(screen?.props, component._id)
|
||||||
if (parent) {
|
if (parent) {
|
||||||
if (selectParent) {
|
store.update(state => {
|
||||||
store.update(state => {
|
state.selectedComponentId = parent._id
|
||||||
state.selectedComponentId = parent._id
|
return state
|
||||||
return state
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -86,7 +86,11 @@
|
||||||
: [],
|
: [],
|
||||||
isBudibaseEvent: true,
|
isBudibaseEvent: true,
|
||||||
usedPlugins: $store.usedPlugins,
|
usedPlugins: $store.usedPlugins,
|
||||||
location: window.location,
|
location: {
|
||||||
|
protocol: window.location.protocol,
|
||||||
|
hostname: window.location.hostname,
|
||||||
|
port: window.location.port,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh the preview when required
|
// Refresh the preview when required
|
||||||
|
@ -189,7 +193,7 @@
|
||||||
|
|
||||||
// Cut and paste the component to the new destination
|
// Cut and paste the component to the new destination
|
||||||
if (source && destination) {
|
if (source && destination) {
|
||||||
store.actions.components.copy(source, true)
|
store.actions.components.copy(source, true, false)
|
||||||
await store.actions.components.paste(destination, data.mode)
|
await store.actions.components.paste(destination, data.mode)
|
||||||
}
|
}
|
||||||
} else if (type === "click-nav") {
|
} else if (type === "click-nav") {
|
||||||
|
|
Loading…
Reference in New Issue