mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-26 00:01:37 +00:00
fix: fix custom components
This commit is contained in:
@@ -150,6 +150,8 @@
|
||||
}
|
||||
|
||||
let clientName = ''
|
||||
|
||||
let licenseKeyChanged = false
|
||||
</script>
|
||||
|
||||
<div class="pb-8">
|
||||
@@ -387,6 +389,9 @@
|
||||
<textarea
|
||||
rows="2"
|
||||
placeholder={setting.placeholder}
|
||||
on:keydown={() => {
|
||||
licenseKeyChanged = true
|
||||
}}
|
||||
bind:value={values[setting.key]}
|
||||
/>
|
||||
<Button
|
||||
@@ -407,6 +412,12 @@
|
||||
>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if licenseKeyChanged}
|
||||
<div class="text-yellow-600"
|
||||
>Refresh page after setting license key and saving to unlock all
|
||||
features</div
|
||||
>
|
||||
{/if}
|
||||
{:else if setting.fieldType == 'email'}
|
||||
<input
|
||||
type="email"
|
||||
|
||||
@@ -61,17 +61,21 @@
|
||||
if (customComponent?.additionalLibs?.reactVersion) {
|
||||
let reactVersion = customComponent.additionalLibs.reactVersion
|
||||
//@ts-ignore
|
||||
await import(`https://unpkg.com/react@${reactVersion}/umd/react.development.js`)
|
||||
await import(
|
||||
/* @vite-ignore */
|
||||
`https://unpkg.com/react@${reactVersion}/umd/react.production.min.js`
|
||||
)
|
||||
|
||||
//@ts-ignore
|
||||
await import(`https://unpkg.com/react-dom@${reactVersion}/umd/react-dom.development.js`)
|
||||
await import(
|
||||
/* @vite-ignore */
|
||||
`https://unpkg.com/react-dom@${reactVersion}/umd/react-dom.production.min.js`
|
||||
)
|
||||
}
|
||||
//@ts-ignore
|
||||
/* @vite-ignore */
|
||||
await import(
|
||||
`http://localhost:3000/api/w/${$workspaceStore ?? 'NO_W'}/resources_u/custom_component/${
|
||||
customComponent.name
|
||||
}`
|
||||
/* @vite-ignore */
|
||||
`/api/w/${$workspaceStore ?? 'NO_W'}/resources_u/custom_component/${customComponent.name}`
|
||||
)
|
||||
loaded = true
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user