windmill-components 1.309.5 → 1.309.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,6 @@ import ToggleButtonGroup from './common/toggleButton-v2/ToggleButtonGroup.svelte
|
|
|
13
13
|
import ToggleButton from './common/toggleButton-v2/ToggleButton.svelte';
|
|
14
14
|
import ErrorHandlerToggleButton from './details/ErrorHandlerToggleButton.svelte';
|
|
15
15
|
import { Bug, Calendar, CheckCircle, Code, DiffIcon, Pen, Plus, Rocket, Save, Settings, X } from 'lucide-svelte';
|
|
16
|
-
import UnsavedConfirmationModal from './common/confirmationModal/UnsavedConfirmationModal.svelte';
|
|
17
16
|
import { sendUserToast } from '../toast';
|
|
18
17
|
import { isCloudHosted } from '../cloud';
|
|
19
18
|
import Awareness from './Awareness.svelte';
|
|
@@ -40,6 +39,7 @@ export let showMeta = false;
|
|
|
40
39
|
export let diffDrawer = undefined;
|
|
41
40
|
export let savedScript = undefined;
|
|
42
41
|
export let searchParams = new URLSearchParams();
|
|
42
|
+
export let disableHistoryChange = false;
|
|
43
43
|
let metadataOpen = showMeta ||
|
|
44
44
|
(initialPath == '' &&
|
|
45
45
|
searchParams.get('state') == undefined &&
|
|
@@ -111,7 +111,7 @@ $: {
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
$: window.history.replaceState(null, '', '#' + encodeState(script));
|
|
114
|
+
$: !disableHistoryChange && window.history.replaceState(null, '', '#' + encodeState(script));
|
|
115
115
|
if (script.content == '') {
|
|
116
116
|
initContent(script.language, script.kind, template);
|
|
117
117
|
}
|
|
@@ -224,7 +224,9 @@ async function editScript(stay) {
|
|
|
224
224
|
await createSchedule(script.path);
|
|
225
225
|
}
|
|
226
226
|
savedScript = cloneDeep(script);
|
|
227
|
-
|
|
227
|
+
if (!disableHistoryChange) {
|
|
228
|
+
history.replaceState(history.state, '', `/scripts/edit/${script.path}`);
|
|
229
|
+
}
|
|
228
230
|
if (stay) {
|
|
229
231
|
script.parent_hash = newHash;
|
|
230
232
|
}
|
|
@@ -378,7 +380,7 @@ let selectedTab = 'metadata';
|
|
|
378
380
|
</script>
|
|
379
381
|
|
|
380
382
|
<svelte:window on:keydown={onKeyDown} />
|
|
381
|
-
<
|
|
383
|
+
<slot />
|
|
382
384
|
|
|
383
385
|
{#if !$userStore?.operator}
|
|
384
386
|
<Drawer placement="right" bind:open={metadataOpen} size="800px">
|
|
@@ -12,6 +12,7 @@ declare const __propDef: {
|
|
|
12
12
|
diffDrawer?: DiffDrawer | undefined;
|
|
13
13
|
savedScript?: NewScriptWithDraft | undefined;
|
|
14
14
|
searchParams?: URLSearchParams | undefined;
|
|
15
|
+
disableHistoryChange?: boolean | undefined;
|
|
15
16
|
setCode?: ((code: string) => void) | undefined;
|
|
16
17
|
};
|
|
17
18
|
events: {
|
|
@@ -22,7 +23,9 @@ declare const __propDef: {
|
|
|
22
23
|
} & {
|
|
23
24
|
[evt: string]: CustomEvent<any>;
|
|
24
25
|
};
|
|
25
|
-
slots: {
|
|
26
|
+
slots: {
|
|
27
|
+
default: {};
|
|
28
|
+
};
|
|
26
29
|
};
|
|
27
30
|
export type ScriptBuilderProps = typeof __propDef.props;
|
|
28
31
|
export type ScriptBuilderEvents = typeof __propDef.events;
|