Skip to content

Commit

Permalink
Add CSP extension and update closeModal usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Aug 14, 2023
1 parent ce9d595 commit f17645e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions javascripts/discourse/controllers/audio-upload.js.es6
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,5 @@ export default Controller.extend(ModalFunctionality, {

}
},

closeModal() {
if (this.state === 'idle') {
this.get("modal").send("closeModal");
}
}
}
});
2 changes: 1 addition & 1 deletion javascripts/discourse/templates/modal/audio-upload.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
{{/d-modal-body}}

<div class="modal-footer">
{{d-button action="uploadFile" class='btn-primary' icon=uploadIcon label='upload' disabled=disallowUpload}}
{{d-button action=(action "uploadFile") class='btn-primary' icon=uploadIcon label='upload' disabled=disallowUpload}}
{{d-modal-cancel close=(action "closeModal")}}
</div>
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "latest"
},
"component": true,
"modifiers": {
"csp_extensions": ["script-src: https://cdn.jsdelivr.net/npm/microm@0.2.4/dist/microm.min.js"]
}
}

0 comments on commit f17645e

Please sign in to comment.