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", false)
: this.set("showRecentQueries", true); : this.set("showRecentQueries", true);
if (id < 0) {
this.set("editDisabled", true);
}
return item || NoQuery; return item || NoQuery;
}, },

View File

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