1
0
Fork 0
mirror of synced 2024-10-03 10:36:59 +13:00

Rename visual actions from 'peek' to just 'open' screen in modal

This commit is contained in:
Andrew Kingston 2021-08-02 15:50:59 +01:00
parent bb0e76d92a
commit 33431a5edc
5 changed files with 9 additions and 9 deletions

View file

@ -19,7 +19,7 @@
{bindings} {bindings}
/> />
<div /> <div />
<Checkbox text="Peek screen in modal" bind:value={parameters.peek} /> <Checkbox text="Open screen in modal" bind:value={parameters.peek} />
</div> </div>
<style> <style>

View file

@ -6,7 +6,7 @@ import TriggerAutomation from "./TriggerAutomation.svelte"
import ValidateForm from "./ValidateForm.svelte" import ValidateForm from "./ValidateForm.svelte"
import LogOut from "./LogOut.svelte" import LogOut from "./LogOut.svelte"
import ClearForm from "./ClearForm.svelte" import ClearForm from "./ClearForm.svelte"
import CloseScreenPeekModal from "./CloseScreenPeekModal.svelte" import CloseScreenModal from "./CloseScreenModal.svelte"
// Defines which actions are available to configure in the front end. // Defines which actions are available to configure in the front end.
// Unfortunately the "name" property is used as the identifier so please don't // Unfortunately the "name" property is used as the identifier so please don't
@ -49,7 +49,7 @@ export default [
component: ClearForm, component: ClearForm,
}, },
{ {
name: "Close Screen-Peek Modal", name: "Close Screen Modal",
component: CloseScreenPeekModal, component: CloseScreenModal,
}, },
] ]

View file

@ -24,7 +24,7 @@
) )
// Listen for a close event to close the screen peek // Listen for a close event to close the screen peek
iframe.contentWindow.addEventListener( iframe.contentWindow.addEventListener(
"close-screen-peek", "close-screen-modal",
peekStore.actions.hidePeek peekStore.actions.hidePeek
) )
// Proxy notifications back to the parent window instead of iframe // Proxy notifications back to the parent window instead of iframe
@ -38,7 +38,7 @@
invalidateDataSource invalidateDataSource
) )
iframe.contentWindow.removeEventListener( iframe.contentWindow.removeEventListener(
"close-screen-peek", "close-screen-modal",
peekStore.actions.hidePeek peekStore.actions.hidePeek
) )
iframe.contentWindow.removeEventListener("notification", proxyNotification) iframe.contentWindow.removeEventListener("notification", proxyNotification)

View file

@ -99,10 +99,10 @@ const clearFormHandler = async (action, context) => {
) )
} }
const closeScreenPeekModalHandler = () => { const closeScreenModalHandler = () => {
// Emit this as a window event, so parent screens which are iframing us in // Emit this as a window event, so parent screens which are iframing us in
// can close the modal // can close the modal
window.dispatchEvent(new Event("close-screen-peek")) window.dispatchEvent(new Event("close-screen-modal"))
} }
const handlerMap = { const handlerMap = {
@ -115,7 +115,7 @@ const handlerMap = {
["Refresh Datasource"]: refreshDatasourceHandler, ["Refresh Datasource"]: refreshDatasourceHandler,
["Log Out"]: logoutHandler, ["Log Out"]: logoutHandler,
["Clear Form"]: clearFormHandler, ["Clear Form"]: clearFormHandler,
["Close Screen-Peek Modal"]: closeScreenPeekModalHandler, ["Close Screen Modal"]: closeScreenModalHandler,
} }
const confirmTextMap = { const confirmTextMap = {