forked from windmill-labs/windmill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): App bar as components (windmill-labs#4103)
* feat(frontend): wip * feat(frontend): add migration to the new top bar * feat(frontend): fix topbar styling * feat(frontend): fix migration code * feat(frontend): fix migration code * feat(frontend): fix migration code * feat(frontend): wip * feat(frontend): done * feat(frontend): done * feat(frontend): remove migration * feat(frontend): fix top bar styling * feat(frontend): fix sync issues * feat(frontend): improve style * feat(frontend): Redesign Recompute all * feat(frontend): change icon + make the default title font bigger * feat(frontend): Remove unecesary clearInterval * feat(frontend): Fix dropdown menu button style
- Loading branch information
1 parent
eb6557a
commit fb89eed
Showing
18 changed files
with
576 additions
and
141 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
frontend/src/lib/components/apps/components/display/AppRecomputeAll.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<script lang="ts"> | ||
import { getContext } from 'svelte' | ||
import { initConfig, initOutput } from '../../editor/appUtils' | ||
import { | ||
type AppViewerContext, | ||
type ComponentCustomCSS, | ||
type RichConfigurations | ||
} from '../../types' | ||
import { initCss } from '../../utils' | ||
import { components } from '../../editor/component' | ||
import InitializeComponent from '../helpers/InitializeComponent.svelte' | ||
import ResolveConfig from '../helpers/ResolveConfig.svelte' | ||
import ResolveStyle from '../helpers/ResolveStyle.svelte' | ||
import RecomputeAllWrapper from '../../editor/RecomputeAllWrapper.svelte' | ||
import AlignWrapper from '../helpers/AlignWrapper.svelte' | ||
export let id: string | ||
export let initializing: boolean | undefined = false | ||
export let customCss: ComponentCustomCSS<'jobiddisplaycomponent'> | undefined = undefined | ||
export let configuration: RichConfigurations | ||
export let render: boolean | ||
export let horizontalAlignment: 'left' | 'center' | 'right' | undefined = undefined | ||
const { app, worldStore, policy } = getContext<AppViewerContext>('AppViewerContext') | ||
let resolvedConfig = initConfig( | ||
components['recomputeallcomponent'].initialData.configuration, | ||
configuration | ||
) | ||
initOutput($worldStore, id, { | ||
loading: undefined | ||
}) | ||
initializing = false | ||
let css = initCss($app.css?.recomputeallcomponent, customCss) | ||
</script> | ||
|
||
{#each Object.keys(components['recomputeallcomponent'].initialData.configuration) as key (key)} | ||
<ResolveConfig | ||
{id} | ||
{key} | ||
bind:resolvedConfig={resolvedConfig[key]} | ||
configuration={configuration[key]} | ||
/> | ||
{/each} | ||
|
||
{#each Object.keys(css ?? {}) as key (key)} | ||
<ResolveStyle | ||
{id} | ||
{customCss} | ||
{key} | ||
bind:css={css[key]} | ||
componentStyle={$app.css?.recomputeallcomponent} | ||
/> | ||
{/each} | ||
|
||
<InitializeComponent {id} /> | ||
|
||
<AlignWrapper {horizontalAlignment}> | ||
{#if render && policy} | ||
<RecomputeAllWrapper | ||
containerClass={css?.container?.class} | ||
containerStyle={css?.container?.style} | ||
/> | ||
{/if} | ||
</AlignWrapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.