remove backendUiStore
This commit is contained in:
parent
9445b1efdc
commit
5deceb7928
|
@ -1,5 +1,4 @@
|
|||
import { getFrontendStore } from "./store/frontend"
|
||||
import { getBackendUiStore } from "./store/backend"
|
||||
import { getAutomationStore } from "./store/automation"
|
||||
import { getHostingStore } from "./store/hosting"
|
||||
import { getThemeStore } from "./store/theme"
|
||||
|
@ -9,7 +8,6 @@ import { FrontendTypes, LAYOUT_NAMES } from "../constants"
|
|||
import { findComponent } from "./storeUtils"
|
||||
|
||||
export const store = getFrontendStore()
|
||||
export const backendUiStore = getBackendUiStore()
|
||||
export const automationStore = getAutomationStore()
|
||||
export const themeStore = getThemeStore()
|
||||
export const hostingStore = getHostingStore()
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import { writable } from "svelte/store"
|
||||
|
||||
const INITIAL_BACKEND_UI_STATE = {}
|
||||
|
||||
export const getBackendUiStore = () => {
|
||||
const store = writable({ ...INITIAL_BACKEND_UI_STATE })
|
||||
|
||||
store.actions = {
|
||||
reset: () => store.set({ ...INITIAL_BACKEND_UI_STATE }),
|
||||
}
|
||||
|
||||
return store
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { backendUiStore, store, allScreens } from "builderStore"
|
||||
import { store, allScreens } from "builderStore"
|
||||
import { tables } from 'builderStore/store/backend/'
|
||||
import { notifier } from "builderStore/store/notifications"
|
||||
import { DropdownMenu, Button, Input } from "@budibase/bbui"
|
||||
|
@ -52,14 +52,9 @@
|
|||
|
||||
function checkValid(evt) {
|
||||
const tableName = evt.target.value
|
||||
if (
|
||||
originalName !== tableName &&
|
||||
$backendUiStore.models?.some(model => model.name === tableName)
|
||||
) {
|
||||
error = `Table with name ${tableName} already exists. Please choose another name.`
|
||||
return
|
||||
}
|
||||
error = ""
|
||||
error = originalName !== tableName
|
||||
? `Table with name ${tableName} already exists. Please choose another name.`
|
||||
: ""
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
import {
|
||||
store,
|
||||
automationStore,
|
||||
backendUiStore,
|
||||
hostingStore,
|
||||
} from "builderStore"
|
||||
import { string, object } from "yup"
|
||||
|
@ -152,7 +151,7 @@
|
|||
)
|
||||
const pkg = await applicationPkg.json()
|
||||
if (applicationPkg.ok) {
|
||||
backendUiStore.actions.reset()
|
||||
// backendUiStore.actions.reset()
|
||||
await store.actions.initialise(pkg)
|
||||
await automationStore.actions.fetch()
|
||||
} else {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
const pkg = await res.json()
|
||||
|
||||
if (res.ok) {
|
||||
backendUiStore.actions.reset()
|
||||
// backendUiStore.actions.reset()
|
||||
await store.actions.initialise(pkg)
|
||||
await automationStore.actions.fetch()
|
||||
await roles.fetch()
|
||||
|
|
Loading…
Reference in New Issue