0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Sorted snippets alphabetically in card menus

no issue

- more logical ordering
This commit is contained in:
Kevin Ansfield 2021-05-26 20:29:41 +01:00
parent 28d9a4e6c4
commit f45f250a1d

View file

@ -144,8 +144,10 @@ export default Controller.extend({
return this.store.peekAll('snippet');
}),
snippets: computed('_snippets.@each.isNew', function () {
return this._snippets.reject(snippet => snippet.get('isNew'));
snippets: computed('_snippets.@each.{name,isNew}', function () {
return this._snippets
.reject(snippet => snippet.get('isNew'))
.sort((a, b) => a.name.localeCompare(b.name));
}),
canManageSnippets: computed('session.user.{isOwnerOrAdmin,isEditor}', function () {