diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/StylePanel.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/StylePanel.svelte
index b94b631a8a..3e7b034804 100644
--- a/frontend/src/lib/components/apps/editor/settingsPanel/StylePanel.svelte
+++ b/frontend/src/lib/components/apps/editor/settingsPanel/StylePanel.svelte
@@ -113,164 +113,167 @@
})
-{#if component}
-
- {#if !cssEditorOpen}
-
{
- $cssEditorOpen = true
- }}
- >
-
- Open CSS editor{$enterpriseLicense === undefined ? ' (EE only)' : ''}
-
- You can also use the App CSS Editor to customise the CSS of all components.
-
-
-
- {:else}
-
- {/if}
-
- {#if $enterpriseLicense !== undefined}
+{#if component}
+ {#key component?.id}
+
+ {#if !cssEditorOpen}
{
- migrationModal?.open()
+ $cssEditorOpen = true
}}
>
- Convert to global CSS
+
+ Open CSS editor{$enterpriseLicense === undefined ? ' (EE only)' : ''}
+
+ You can also use the App CSS Editor to customise the CSS of all components.
+
+
+ {:else}
+
{/if}
-
-
-
-
-
- ID
-
- {component?.id}
-
-
-
- You can customise the CSS and the classes of this component instance. Theses
- customisations will only be applied to this component.
-
-
-
-
-
- Global: {type ? ccomponents[type].name : ''}
-
-
- You can customise the CSS and the classes of all components of this type. Theses
- customisations will be applied to all components of this type.
-
-
-
-
-
- {#if component && component.customCss !== undefined}
- {#each Object.keys(ccomponents[component.type].customCss ?? {}) as name}
-
- app.set($app)}
- shouldDisplayRight={hasStyleValue(component.customCss[name])}
- on:right={() => {
- copyLocalToGlobal(name, component?.customCss?.[name])
- tab = 'global'
- }}
- overridding={hasStyleValue($app.css?.[component.type]?.[name]) &&
- hasStyleValue(component.customCss[name])}
- />
-
- {/each}
+
+ {#if $enterpriseLicense !== undefined}
+
{
+ migrationModal?.open()
+ }}
+ >
+ Convert to global CSS
+
{/if}
-
-
- {#if type}
- {#each customCssByComponentType ?? [] as { id, forceStyle, forceClass }}
-
- {#if $app.css && type && $app.css[type] && component?.customCss}
- {
- copyGlobalToLocal(
- id,
- component?.type ? $app?.css?.[component?.type]?.[id] : undefined
- )
- tab = 'local'
+
+
+
+
+
+
+ ID
+
+ {component?.id}
+
+
+
+ You can customise the CSS and the classes of this component instance. Theses
+ customisations will only be applied to this component.
+
+
+
+
+
+ Global: {type ? ccomponents[type].name : ''}
+
+
+ You can customise the CSS and the classes of all components of this type. Theses
+ customisations will be applied to all components of this type.
+
+
+
+
+
+ {#if component && component.customCss !== undefined}
+ {#each Object.keys(ccomponents[component.type].customCss ?? {}) as name}
+
+ app.set($app)}
+ shouldDisplayRight={hasStyleValue(component.customCss[name])}
+ on:right={() => {
+ copyLocalToGlobal(name, component?.customCss?.[name])
+ tab = 'global'
}}
- overriden={hasStyleValue(component.customCss[id])}
- wmClass={getSelector(id)}
+ overridding={hasStyleValue($app.css?.[component.type]?.[name]) &&
+ hasStyleValue(component.customCss[name])}
/>
- {/if}
-
- {/each}
- {/if}
-
-
-
+
+ {/each}
+ {/if}
+
+
+ {#if type}
+ {#each customCssByComponentType ?? [] as { id, forceStyle, forceClass }}
+
+ {#if $app.css && type && $app.css[type] && component?.customCss}
+ {
+ copyGlobalToLocal(
+ id,
+ component?.type ? $app?.css?.[component?.type]?.[id] : undefined
+ )
+ tab = 'local'
+ }}
+ overriden={hasStyleValue(component.customCss[id])}
+ wmClass={getSelector(id)}
+ />
+ {/if}
+
+ {/each}
+ {/if}
+
+
+
- {
- if (overrideGlobalCSS) {
- overrideGlobalCSS()
+ {
+ if (overrideGlobalCSS) {
+ overrideGlobalCSS()
+ overrideGlobalCSS = undefined
+ }
+
+ sendUserToast('Global CSS overridden')
+ }}
+ on:canceled={() => {
overrideGlobalCSS = undefined
- }
+ }}
+ >
+
+ The global CSS for this component already exists. Do you want to override it?
+
+
- sendUserToast('Global CSS overridden')
- }}
- on:canceled={() => {
- overrideGlobalCSS = undefined
- }}
- >
-
- The global CSS for this component already exists. Do you want to override it?
-
-
+ {
+ if (overrideLocalCSS) {
+ overrideLocalCSS()
+ overrideLocalCSS = undefined
+ }
- {
- if (overrideLocalCSS) {
- overrideLocalCSS()
+ sendUserToast('Local CSS overridden')
+ }}
+ on:canceled={() => {
overrideLocalCSS = undefined
- }
-
- sendUserToast('Local CSS overridden')
- }}
- on:canceled={() => {
- overrideLocalCSS = undefined
- }}
- >
-
- The local CSS for this component already exists. Do you want to override it?
-
-
-
+ }}
+ >
+
+ The local CSS for this component already exists. Do you want to override it?
+
+
+
+ {/key}
{:else}
Select a component to style it in this panel
{/if}