fix for app viewer

This commit is contained in:
Ruben Fiszel
2023-03-10 20:26:49 +01:00
parent 7ec85d42e4
commit ca4b9cc1ec
4 changed files with 19 additions and 3 deletions
@@ -234,6 +234,14 @@
name,
requestBody: { username: member_name }
})
await GranularAclService.removeGranularAcls({
workspace: $workspaceStore ?? '',
path: name,
kind: 'group_',
requestBody: {
owner: 'u/' + member_name
}
})
loadGroup()
}}>remove</button
>
@@ -212,7 +212,7 @@
<ComponentNavigation />
<div on:pointerdown|stopPropagation class={width}>
<GridEditor {history} {policy} />
<GridEditor {policy} />
</div>
<div id="app-editor-top-level-drawer" />
@@ -4,6 +4,7 @@
import { buildWorld, type World } from '../rx'
import type {
App,
AppEditorContext,
AppViewerContext,
ConnectingInput,
EditorBreakpoint,
@@ -64,6 +65,12 @@
parentWidth: writable(0)
})
setContext<AppEditorContext>('AppEditorContext', {
history: undefined,
componentControl: writable({}),
pickVariableCallback: writable(undefined)
})
let mounted = false
onMount(() => {
@@ -1,5 +1,5 @@
<script lang="ts">
import { getContext, afterUpdate } from 'svelte'
import { getContext, afterUpdate, setContext } from 'svelte'
import type { App, AppEditorContext, AppViewerContext, GridItem } from '../types'
import Grid from '@windmill-labs/svelte-grid'
import { classNames } from '$lib/utils'
@@ -15,7 +15,6 @@
import { expandGriditem, findGridItem } from './appUtils'
export let policy: Policy
export let history: History<App> | undefined = undefined
const {
selectedComponent,
@@ -30,6 +29,8 @@
breakpoint
} = getContext<AppViewerContext>('AppViewerContext')
const { history } = getContext<AppEditorContext>('AppEditorContext')
// The drag is disabled when the user is connecting an input
// or when the user is previewing the app
// or when the focused grid is a subgrid