Merge branch 'frontend-core-ts-2' of github.com:Budibase/budibase into ts-portal-admin-store
This commit is contained in:
commit
ce3a479590
|
@ -2,13 +2,13 @@ import { writable } from "svelte/store"
|
||||||
|
|
||||||
type GotoFuncType = (path: string) => void
|
type GotoFuncType = (path: string) => void
|
||||||
|
|
||||||
interface Store {
|
interface PortalNavigationStore {
|
||||||
initialisated: boolean
|
initialisated: boolean
|
||||||
goto: GotoFuncType
|
goto: GotoFuncType
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createNavigationStore() {
|
export function createNavigationStore() {
|
||||||
const store = writable<Store>({
|
const store = writable<PortalNavigationStore>({
|
||||||
initialisated: false,
|
initialisated: false,
|
||||||
goto: undefined as any,
|
goto: undefined as any,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
import { writable } from "svelte/store"
|
import { writable } from "svelte/store"
|
||||||
import { PluginSource } from "constants/index"
|
import { PluginSource } from "constants/index"
|
||||||
|
import { Plugin } from "@budibase/types"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
|
||||||
interface Plugin {
|
|
||||||
_id: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createPluginsStore() {
|
export function createPluginsStore() {
|
||||||
const { subscribe, set, update } = writable<Plugin[]>([])
|
const { subscribe, set, update } = writable<Plugin[]>([])
|
||||||
|
|
||||||
async function load() {
|
async function load() {
|
||||||
const plugins = await API.getPlugins()
|
const plugins = (await API.getPlugins()) as Plugin[]
|
||||||
set(plugins)
|
set(plugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue