-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb400ca
commit 086ab1d
Showing
19 changed files
with
53 additions
and
765 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,6 @@ | ||
import Injector from 'lib/Injector'; | ||
import AnchorSelectorField from 'components/AnchorSelectorField/AnchorSelectorField'; | ||
import readOnePageQuery from 'state/history/readOnePageQuery'; | ||
import rollbackPageMutation from 'state/history/rollbackPageMutation'; | ||
|
||
export default () => { | ||
Injector.component.register('AnchorSelectorField', AnchorSelectorField); | ||
|
||
Injector.transform( | ||
'pages-history', | ||
(updater) => { | ||
// Add CMS page history GraphQL query to the HistoryViewer | ||
updater.component('HistoryViewer.pages-controller-cms-content', readOnePageQuery, 'PageHistoryViewer'); | ||
} | ||
); | ||
|
||
Injector.transform( | ||
'pages-history-revert', | ||
(updater) => { | ||
// Add CMS page revert GraphQL mutation to the HistoryViewerToolbar | ||
updater.component( | ||
'HistoryViewerToolbar.VersionedAdmin.HistoryViewer.SiteTree.HistoryViewerVersionDetail', | ||
// This was using `copyToStage` incorrectly which also provides from and to stage | ||
// arguments. The "rollback" mutation correctly handles relations and is a more consumable | ||
// API endpoint. | ||
rollbackPageMutation, | ||
'PageRevertMutation' | ||
); | ||
} | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.