Minor cleanup

no issue

- remove `async` from non-async actions
- tidy up template indentation/spacing
This commit is contained in:
Kevin Ansfield 2021-02-17 16:00:12 +00:00
parent 16324fd2a4
commit 2c95cae248
2 changed files with 19 additions and 21 deletions

View File

@ -3,28 +3,26 @@
<h4>Branding</h4>
<div class="gh-branding-settings-actions">
<button
class="gh-btn mr3"
{{action "closeModal"}}
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
{{on "mousedown" (optional this.noop)}}
data-test-button="cancel-custom-view-form"
>
<span>Cancel</span>
</button>
class="gh-btn mr3"
{{action "closeModal"}}
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
{{on "mousedown" (optional this.noop)}}
data-test-button="cancel-custom-view-form"
>
<span>Cancel</span>
</button>
<GhTaskButton
@buttonText="Save and close"
@successText="Saved"
@task={{this.saveTask}}
@idleClass="gh-btn-primary"
@class="gh-btn gh-btn-icon"
data-test-button="save-members-modal-setting"
/>
@buttonText="Save and close"
@successText="Saved"
@task={{this.saveTask}}
@idleClass="gh-btn-primary"
@class="gh-btn gh-btn-icon"
data-test-button="save-members-modal-setting"
/>
</div>
</div>
<div class="gh-branding-settings">
<section class="gh-branding-settings-options">
<div class="gh-stack">

View File

@ -85,7 +85,7 @@ export default ModalComponent.extend({
this.save.perform();
},
async removeImage(image) {
removeImage(image) {
// setting `null` here will error as the server treats it as "null"
this.settings.set(image, '');
this.refreshPreview();
@ -112,7 +112,7 @@ export default ModalComponent.extend({
* @param {UploadResult[]} results - Array of UploadResult objects
* @return {string} The URL that was set on `this.settings.property`
*/
async imageUploaded(property, results) {
imageUploaded(property, results) {
if (results[0]) {
let result = this.settings.set(property, results[0].url);
this.refreshPreview();