File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/components/file_system_interface Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,27 @@ export default {
110
110
// console.log('saved ', fileName, 'to local forage')
111
111
// console.log('result is', result)
112
112
// })
113
+
113
114
// console.log('PROJECT SAVED AS A JSON OBJECT!')
115
+ this .notifySlack ()
114
116
}
117
+ },
118
+ // creates a popup dialog box, where if you click on yes, it will send a message to our test Slack workspace
119
+ // still must refactor to dynamically work with user's Slack
120
+ notifySlack () {
121
+ remote .dialog .showMessageBox ({
122
+ message: ' Save successful. Would you like to notify your team on Slack?' ,
123
+ buttons: [' No' , ' Yes' ]
124
+ },
125
+ response => {
126
+ if (response === 1 ) {
127
+ fetch (' https://hooks.slack.com/services/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' , {
128
+ method: ' POST' ,
129
+ body: JSON .stringify ({ ' text' : ' A team member saved an OverVue project file!' }),
130
+ headers: { ' Content-Type' : ' application/json' }
131
+ })
132
+ }
133
+ })
115
134
}
116
135
},
117
136
// on components creation these key presses will trigger save project
You can’t perform that action at this time.
0 commit comments