Просмотр исходного кода

Added revision comparison to page accessories so that it can be modalized when there is "compare" in the query.

Ryu Sato 5 лет назад
Родитель
Сommit
915d060ff4

+ 1 - 0
resource/locales/en_US/translation.json

@@ -122,6 +122,7 @@
   "Only me": "Only me",
   "Only inside the group": "Only inside the group",
   "page_list": "Page List",
+  "revision_compare": "Revision Compare",
   "page_list_and_search_results": "Page list / Search results",
   "scope_of_page_disclosure": "Scope of page disclosure",
   "set_point": "Set point",

+ 1 - 0
resource/locales/ja_JP/translation.json

@@ -122,6 +122,7 @@
   "Only me": "自分のみ",
   "Only inside the group": "特定グループのみ",
   "page_list": "ページリスト",
+  "revision_compare": "リビジョン比較",
   "page_list_and_search_results": "ページリスト・検索結果",
   "scope_of_page_disclosure": "ページの公開範囲",
   "set_point": "設定値",

+ 1 - 0
resource/locales/zh_CN/translation.json

@@ -131,6 +131,7 @@
 	"Only me": "只有我",
   "Only inside the group": "仅组内",
   "page_list": "Page List",
+  "revision_compare": "修订比较",
 	"page_list_and_search_results": "页面列表/搜索结果",
 	"scope_of_page_disclosure": "页面公开范围",
 	"set_point": "设定值",

+ 14 - 2
src/client/js/components/PageAccessoriesModal.jsx

@@ -18,6 +18,7 @@ import PageAttachment from './PageAttachment';
 import PageTimeline from './PageTimeline';
 import PageList from './PageList';
 import PageHistory from './PageHistory';
+import RevisionCompare from './RevisionCompare';
 import ShareLink from './ShareLink/ShareLink';
 import { CustomNavTab } from './CustomNavigation/CustomNav';
 import ExpandOrContractButton from './ExpandOrContractButton';
@@ -50,15 +51,21 @@ const PageAccessoriesModal = (props) => {
         index: 2,
         isLinkEnabled: v => !isGuestUser && !isSharedUser,
       },
+      revisionCompare: {
+        Icon: HistoryIcon,
+        i18n: t('revision_compare'),
+        index: 3,
+        isLinkEnabled: v => !isGuestUser && !isSharedUser,
+      },
       attachment: {
         Icon: AttachmentIcon,
         i18n: t('attachment_data'),
-        index: 3,
+        index: 4,
       },
       shareLink: {
         Icon: ShareLinkIcon,
         i18n: t('share_links.share_link_management'),
-        index: 4,
+        index: 5,
         isLinkEnabled: v => !isGuestUser && !isSharedUser,
       },
     };
@@ -124,6 +131,11 @@ const PageAccessoriesModal = (props) => {
                 {activeComponents.has('pageHistory') && <PageHistory /> }
               </TabPane>
             )}
+            {!isGuestUser && (
+              <TabPane tabId="revisionCompare">
+                {activeComponents.has('revisionCompare') && <RevisionCompare /> }
+              </TabPane>
+            )}
             <TabPane tabId="attachment">
               {activeComponents.has('attachment') && <PageAttachment />}
             </TabPane>

+ 6 - 0
src/client/js/components/PageAccessoriesModalControl.jsx

@@ -40,6 +40,12 @@ const PageAccessoriesModalControl = (props) => {
         disabled: isGuestUser || isSharedUser,
         i18n: t('History'),
       },
+      {
+        name: 'revisionCompare',
+        Icon: <HistoryIcon />,
+        disabled: isGuestUser || isSharedUser,
+        i18n: t('revision_compare'),
+      },
       {
         name: 'attachment',
         Icon: <AttachmentIcon />,