FIX: Edit button shouldn't be visible for seeded queries (#174)

This commit is contained in:
Gerhard Schlager 2022-05-17 18:05:05 +02:00 committed by GitHub
parent 01f52dc5c5
commit 65a112c8d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -65,6 +65,10 @@ export default Ember.Controller.extend({
? this.set("showRecentQueries", false)
: this.set("showRecentQueries", true);
if (id < 0) {
this.set("editDisabled", true);
}
return item || NoQuery;
},

View File

@ -136,9 +136,7 @@
{{#if everEditing}}
{{d-button action=(action "discard") icon="undo" label="explorer.undo" disabled=saveDisabled}}
{{/if}}
{{#unless editDisabled}}
{{d-button action=(action "destroy") class="btn-danger" icon="trash-alt" label="explorer.delete"}}
{{/unless}}
{{d-button action=(action "destroy") class="btn-danger" icon="trash-alt" label="explorer.delete"}}
{{/if}}
</div>