-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Associate history entries with AddSourceModal state (#4591)
- Loading branch information
1 parent
49d8de3
commit cc69e13
Showing
4 changed files
with
116 additions
and
113 deletions.
There are no files selected for viewing
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
18 changes: 10 additions & 8 deletions
18
web-common/src/features/sources/modal/add-source-visibility.ts
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { writable } from "svelte/store"; | ||
|
||
export const addSourceModal = (() => { | ||
const { subscribe, set, update } = writable(false); | ||
|
||
return { | ||
subscribe, | ||
open: () => set(true), | ||
close: () => set(false), | ||
toggle: () => update((state) => !state), | ||
open: () => { | ||
const state = { step: 1, connector: null, requestConnector: false }; | ||
window.history.pushState(state, "", ""); | ||
dispatchEvent(new PopStateEvent("popstate", { state: state })); | ||
}, | ||
close: () => { | ||
const state = { step: 0, connector: null, requestConnector: false }; | ||
window.history.pushState(state, "", ""); | ||
dispatchEvent(new PopStateEvent("popstate", { state: state })); | ||
}, | ||
}; | ||
})(); |
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
cc69e13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://661970b42d677e1208760084--rill-ui-dev.netlify.app