add media library

* rebase editorial workflow pull requests when behind

* fix async/await transpilation

* add media library pagination

* switch media library to grid layout

* ensure that only cms branches can be force updated
This commit is contained in:
Shawn Erquhart
2017-08-14 09:00:47 -04:00
parent 2a4af64a71
commit 6b45a46a39
43 changed files with 1662 additions and 362 deletions

View File

@ -148,6 +148,10 @@ class Backend {
);
}
getMedia() {
return this.implementation.getMedia();
}
entryWithFormat(collectionOrEntity) {
return (entry) => {
const format = resolveFormat(collectionOrEntity, entry);
@ -244,6 +248,13 @@ class Backend {
});
}
persistMedia(file) {
const options = {
commitMessage: `Upload ${file.path}`,
};
return this.implementation.persistMedia(file, options);
}
deleteEntry(config, collection, slug) {
const path = selectEntryPath(collection, slug);
@ -255,6 +266,11 @@ class Backend {
return this.implementation.deleteFile(path, commitMessage);
}
deleteMedia(path) {
const commitMessage = `Delete ${path}`;
return this.implementation.deleteFile(path, commitMessage);
}
persistUnpublishedEntry(config, collection, entryDraft, MediaFiles) {
return this.persistEntry(config, collection, entryDraft, MediaFiles, { unpublished: true });
}