add license check to dev mode for flows

This commit is contained in:
Ruben Fiszel
2024-02-02 18:14:46 +01:00
parent 017d9b8670
commit ca9d07b535
+9 -2
View File
@@ -11,10 +11,11 @@
OpenAPI,
Preview,
type OpenFlow,
type FlowModule
type FlowModule,
SettingsService
} from '$lib/gen'
import { inferArgs } from '$lib/infer'
import { userStore, workspaceStore } from '$lib/stores'
import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores'
import { emptySchema, getModifierKey, sendUserToast } from '$lib/utils'
import { Pane, Splitpanes } from 'svelte-splitpanes'
import { onDestroy, onMount, setContext } from 'svelte'
@@ -126,7 +127,13 @@
}
}
async function setEnterpriseLicense() {
if (!$enterpriseLicense) {
$enterpriseLicense = await SettingsService.getLicenseId()
}
}
onMount(() => {
setEnterpriseLicense()
window.addEventListener('message', el, false)
document.addEventListener('keydown', (e) => {
const obj = {