Version History (#768)
* Stash. Super rough progress * Stash * 'h' how toggles history panel Add documents.restore endpoint * Add tests for documents.restore endpoint * Document restore endpoint * Tiding, RevisionMenu, remove scroll dep * Add history menu item * Paginate loading * Fixed: Error boundary styling Select first revision faster * Diff summary, styling * Add history loading placeholder Fix move modal not opening * Fixes: Refreshing page on specific revision * documentation for document.revision * Better handle versions with no text changes (will no longer be created)
This commit is contained in:
@ -38,6 +38,12 @@ export function documentMoveUrl(doc: Document): string {
|
||||
return `${doc.url}/move`;
|
||||
}
|
||||
|
||||
export function documentHistoryUrl(doc: Document, revisionId?: string): string {
|
||||
let base = `${doc.url}/history`;
|
||||
if (revisionId) base += `/${revisionId}`;
|
||||
return base;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace full url's document part with the new one in case
|
||||
* the document slug has been updated
|
||||
@ -69,4 +75,3 @@ export const matchDocumentSlug =
|
||||
':documentSlug([0-9a-zA-Z-_~]*-[a-zA-z0-9]{10,15})';
|
||||
|
||||
export const matchDocumentEdit = `/doc/${matchDocumentSlug}/edit`;
|
||||
export const matchDocumentMove = `/doc/${matchDocumentSlug}/move`;
|
||||
|
Reference in New Issue
Block a user