feat: Show diff when navigating revision history (#4069)
* tidy * Add title to HTML export * fix: Add compatability for documents without collab state * Add HTML download option to UI * docs * fix nodes that required document to render * Refactor to allow for styling of HTML export * div>article for easier programatic content extraction * Allow DocumentHelper to be used with Revisions * Add revisions.diff endpoint, first version * Allow arbitrary revisions to be compared * test * HTML driven revision viewer * fix: Dark mode styles for document diffs * Add revision restore button to header * test * Support RTL languages in revision history viewer * fix: RTL support Remove unneccessary API requests * Prefetch revision data * Animate history sidebar * fix: Cannot toggle history from timestamp fix: Animation on each revision click * Clarify currently editing history item
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,10 @@
|
||||
"Changelog": "Changelog",
|
||||
"Keyboard shortcuts": "Keyboard shortcuts",
|
||||
"Log out": "Log out",
|
||||
"Restore revision": "Restore revision",
|
||||
"Document restored": "Document restored",
|
||||
"Copy link": "Copy link",
|
||||
"Link copied": "Link copied",
|
||||
"Dark": "Dark",
|
||||
"Light": "Light",
|
||||
"System": "System",
|
||||
@@ -65,6 +69,7 @@
|
||||
"Collection": "Collection",
|
||||
"Debug": "Debug",
|
||||
"Document": "Document",
|
||||
"Revision": "Revision",
|
||||
"Navigation": "Navigation",
|
||||
"People": "People",
|
||||
"Recent searches": "Recent searches",
|
||||
@@ -138,8 +143,8 @@
|
||||
"our engineers have been notified": "our engineers have been notified",
|
||||
"Report a Bug": "Report a Bug",
|
||||
"Show Detail": "Show Detail",
|
||||
"Latest version": "Latest version",
|
||||
"{{userName}} edited": "{{userName}} edited",
|
||||
"Live editing": "Live editing",
|
||||
"{{userName}} archived": "{{userName}} archived",
|
||||
"{{userName}} restored": "{{userName}} restored",
|
||||
"{{userName}} deleted": "{{userName}} deleted",
|
||||
@@ -287,7 +292,6 @@
|
||||
"Manual sort": "Manual sort",
|
||||
"Edit": "Edit",
|
||||
"Permissions": "Permissions",
|
||||
"Document restored": "Document restored",
|
||||
"Document unpublished": "Document unpublished",
|
||||
"Document options": "Document options",
|
||||
"Restore": "Restore",
|
||||
@@ -304,10 +308,7 @@
|
||||
"New child document": "New child document",
|
||||
"New document in <em>{{ collectionName }}</em>": "New document in <em>{{ collectionName }}</em>",
|
||||
"New template": "New template",
|
||||
"Link copied": "Link copied",
|
||||
"Revision options": "Revision options",
|
||||
"Restore version": "Restore version",
|
||||
"Copy link": "Copy link",
|
||||
"Share link revoked": "Share link revoked",
|
||||
"Share link copied": "Share link copied",
|
||||
"Share options": "Share options",
|
||||
@@ -415,6 +416,7 @@
|
||||
"Save Draft": "Save Draft",
|
||||
"Done Editing": "Done Editing",
|
||||
"New from template": "New from template",
|
||||
"Restore version": "Restore version",
|
||||
"Publish": "Publish",
|
||||
"Publishing": "Publishing",
|
||||
"Sorry, it looks like you don’t have permission to access the document": "Sorry, it looks like you don’t have permission to access the document",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
15
shared/utils/rtl.ts
Normal file
15
shared/utils/rtl.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
const ltrChars =
|
||||
"A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF";
|
||||
const rtlChars = "\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC";
|
||||
// eslint-disable-next-line no-misleading-character-class
|
||||
const rtlDirCheck = new RegExp("^[^" + ltrChars + "]*[" + rtlChars + "]");
|
||||
|
||||
/**
|
||||
* Returns true if the text is likely written in an RTL language.
|
||||
*
|
||||
* @param text The text to check
|
||||
* @returns True if the text is RTL
|
||||
*/
|
||||
export function isRTL(text: string) {
|
||||
return rtlDirCheck.test(text);
|
||||
}
|
||||
Reference in New Issue
Block a user