mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 16:01:42 +00:00
fix: improve unsaved confirmation modal on flow draft
This commit is contained in:
@@ -40,10 +40,8 @@
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-plugin-svelte": "^2.33.1",
|
||||
"ol": "^7.4.0",
|
||||
"openapi-typescript-codegen": "^0.25.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"pdfjs-dist": "^3.8.162",
|
||||
"postcss": "^8.4.24",
|
||||
"postcss-load-config": "^4.0.1",
|
||||
"prettier": "^2.8.8",
|
||||
@@ -116,6 +114,8 @@
|
||||
"highlight.js": "^11.8.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lucide-svelte": "^0.293.0",
|
||||
"ol": "^7.4.0",
|
||||
"pdfjs-dist": "^3.8.162",
|
||||
"monaco-editor": "npm:@codingame/monaco-editor-treemended@>=1.83.5 <1.84.0",
|
||||
"monaco-graphql": "^1.5.1",
|
||||
"monaco-languageclient": "~7.0.1",
|
||||
|
||||
+5
-2
@@ -24,8 +24,11 @@
|
||||
newNavigationState.cancel()
|
||||
await tick() // make sure saved value is updated when clicking on save draft or deploy
|
||||
if (savedValue && modifiedValue) {
|
||||
const draftOrDeployed = cleanValueProperties(savedValue.draft || savedValue)
|
||||
const current = cleanValueProperties(modifiedValue)
|
||||
const draftOrDeployed = cleanValueProperties({
|
||||
...((savedValue.draft || savedValue) ?? {}),
|
||||
path: undefined
|
||||
})
|
||||
const current = cleanValueProperties({ ...(modifiedValue ?? {}), path: undefined })
|
||||
if (orderedJsonStringify(draftOrDeployed) === orderedJsonStringify(current)) {
|
||||
bypassBeforeNavigate = true
|
||||
goto(goingTo)
|
||||
|
||||
@@ -153,8 +153,5 @@
|
||||
{selectedId}
|
||||
{loading}
|
||||
>
|
||||
<UnsavedConfirmationModal
|
||||
savedValue={{ ...savedFlow, path: undefined }}
|
||||
modifiedValue={$flowStore}
|
||||
/></FlowBuilder
|
||||
<UnsavedConfirmationModal savedValue={savedFlow} modifiedValue={$flowStore} /></FlowBuilder
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user