File tree Expand file tree Collapse file tree
create-diagram-dialog/components
edit-diagram-dialog/components
select-diagram-dialog/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ const CreateDiagramDialog = () => {
2626 useEffect ( ( ) => {
2727 const handleMessage = async ( e : MessageEvent ) => {
2828 const action = e . data . action ;
29+ const type = e . data . type ;
30+
2931 if ( action === 'save' ) {
3032 const data = e . data . data ;
3133 const metadata = new URLSearchParams ( {
@@ -54,6 +56,8 @@ const CreateDiagramDialog = () => {
5456 console . error ( 'Error preparing diagram insertion' , error ) ;
5557 showAlertDialog ( 'Error preparing diagram, please try again' ) ;
5658 }
59+ } else if ( type === 'mermaid-chart-google-docs-back' && action === 'navigateBack' ) {
60+ handleDialogClose ( ) ;
5761 }
5862 } ;
5963
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ const EditDiagramDialog = () => {
4545 useEffect ( ( ) => {
4646 const handleMessage = async ( e : MessageEvent ) => {
4747 const action = e . data . action ;
48+ const type = e . data . type ;
49+
4850 console . log ( 'action' , action ) ;
4951 if ( action === 'save' ) {
5052 const data = e . data . data ;
@@ -73,6 +75,8 @@ const EditDiagramDialog = () => {
7375 console . error ( 'Error preparing diagram update' , error ) ;
7476 showAlertDialog ( 'Error preparing diagram update, please try again' ) ;
7577 }
78+ } else if ( type === 'mermaid-chart-google-docs-back' && action === 'navigateBack' ) {
79+ handleDialogClose ( ) ;
7680 }
7781 } ;
7882
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const SelectDiagramDialog = () => {
2626 return ;
2727 }
2828 const url = buildUrl (
29- '/app/plugins/select?pluginSource=googledocs' ,
29+ '/app/plugins/confluence/ select?pluginSource=googledocs' ,
3030 authState . token
3131 ) ;
3232 setDiagramsUrl ( url ) ;
@@ -35,6 +35,8 @@ const SelectDiagramDialog = () => {
3535 useEffect ( ( ) => {
3636 const handleMessage = async ( e : MessageEvent ) => {
3737 const action = e . data . action ;
38+ const type = e . data . type ;
39+
3840 if ( action === 'save' ) {
3941 const data = e . data . data ;
4042 const metadata = new URLSearchParams ( {
@@ -63,6 +65,9 @@ const SelectDiagramDialog = () => {
6365 showAlertDialog ( 'Error preparing diagram, please try again' ) ;
6466 console . error ( 'Error preparing diagram insertion' , error ) ;
6567 }
68+ } else if ( type === 'mermaid-chart-google-docs-back' && action === 'navigateBack' ) {
69+ // Handle back navigation from the iframe - close the dialog
70+ handleDialogClose ( ) ;
6671 }
6772 } ;
6873
You can’t perform that action at this time.
0 commit comments