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

Merge branch 'feat/article-area-renovation' into imprv/article-area-gw4051

白石誠 5 лет назад
Родитель
Сommit
365f5a588d

+ 3 - 3
resource/locales/zh_CN/translation.json

@@ -157,8 +157,8 @@
 		"invalid_syntax": "%s的语法无效。"
 		"invalid_syntax": "%s的语法无效。"
   },
   },
   "not_found_page": {
   "not_found_page": {
-    "Create Page": "Create Page",
-    "page_not_exist_alert": "This page does not exist. Please create a new page."
+    "Create Page": "创建页面",
+    "page_not_exist_alert": "该页面不存在,请创建一个新页面"
   },
   },
 	"installer": {
 	"installer": {
 		"setup": "安装",
 		"setup": "安装",
@@ -429,7 +429,7 @@
 		"not_initialized": "HackmdEditor component has not initialized",
 		"not_initialized": "HackmdEditor component has not initialized",
 		"someone_editing": "Someone editing this page on HackMD",
 		"someone_editing": "Someone editing this page on HackMD",
     "this_page_has_draft": "This page has a draft on HackMD",
     "this_page_has_draft": "This page has a draft on HackMD",
-    "need_to_associate_with_growi_to_use_hackmd_refer_to_this": "To use HackMD for simultaneous multi-person editing, need to associate HackMD with GROWI.Please refer to <a href='https://docs.growi.org/en/admin-guide/admin-cookbook/integrate-with-hackmd.html'>here</a>."
+    "need_to_associate_with_growi_to_use_hackmd_refer_to_this": "若要使用HackMD的多人同时编辑功能,请先关联HackMD和GROWI。详情请参考<a href='https://docs.growi.org/cn/admin-guide/admin-cookbook/integrate-with-hackmd.html'>这里</a>。"
   },
   },
   "slack_notification": {
   "slack_notification": {
     "popover_title": "Slack Notification",
     "popover_title": "Slack Notification",

+ 16 - 12
src/client/js/components/Navbar/GrowiSubNavigation.jsx

@@ -51,13 +51,15 @@ const PagePathNav = ({ pageId, pagePath, isPageForbidden }) => {
   return (
   return (
     <div className="grw-page-path-nav">
     <div className="grw-page-path-nav">
       {formerLink}
       {formerLink}
-      <span className="d-flex align-items-center flex-wrap">
+      <span className="d-flex align-items-center">
         <h1 className="m-0">{latterLink}</h1>
         <h1 className="m-0">{latterLink}</h1>
-        <RevisionPathControls
-          pageId={pageId}
-          pagePath={pagePath}
-          isPageForbidden={isPageForbidden}
-        />
+        <div className="mx-2">
+          <RevisionPathControls
+            pageId={pageId}
+            pagePath={pagePath}
+            isPageForbidden={isPageForbidden}
+          />
+        </div>
       </span>
       </span>
     </div>
     </div>
   );
   );
@@ -72,10 +74,12 @@ const UserPagePathNav = ({ pageId, pagePath }) => {
     <div className="grw-page-path-nav">
     <div className="grw-page-path-nav">
       <span className="d-flex align-items-center flex-wrap">
       <span className="d-flex align-items-center flex-wrap">
         <h4 className="grw-user-page-path">{latterLink}</h4>
         <h4 className="grw-user-page-path">{latterLink}</h4>
-        <RevisionPathControls
-          pageId={pageId}
-          pagePath={pagePath}
-        />
+        <div className="mx-2">
+          <RevisionPathControls
+            pageId={pageId}
+            pagePath={pagePath}
+          />
+        </div>
       </span>
       </span>
     </div>
     </div>
   );
   );
@@ -162,14 +166,14 @@ const GrowiSubNavigation = (props) => {
     <div className={`grw-subnav d-flex align-items-center justify-content-between ${isCompactMode ? 'grw-subnav-compact d-print-none' : ''}`}>
     <div className={`grw-subnav d-flex align-items-center justify-content-between ${isCompactMode ? 'grw-subnav-compact d-print-none' : ''}`}>
 
 
       {/* Left side */}
       {/* Left side */}
-      <div className="d-flex">
+      <div className="d-flex grw-subnav-left-side">
         { isDrawerMode && (
         { isDrawerMode && (
           <div className="d-none d-md-flex align-items-center border-right mr-3 pr-3">
           <div className="d-none d-md-flex align-items-center border-right mr-3 pr-3">
             <DrawerToggler />
             <DrawerToggler />
           </div>
           </div>
         ) }
         ) }
 
 
-        <div>
+        <div className="grw-path-nav-container">
           { !isCompactMode && !isPageNotFound && !isPageForbidden && !isUserPage && (
           { !isCompactMode && !isPageNotFound && !isPageForbidden && !isUserPage && (
             <div className="mb-2">
             <div className="mb-2">
               <TagLabels />
               <TagLabels />

+ 21 - 16
src/client/styles/scss/_on-edit.scss

@@ -29,22 +29,6 @@ body.on-edit {
     }
     }
   }
   }
 
 
-  .grw-page-path-nav,
-  .grw-page-path-nav h1 {
-    width: calc(100vw - 300px);
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-
-    @include media-breakpoint-up(md) {
-      width: calc(100vw - 350px);
-    }
-
-    @include media-breakpoint-up(lg) {
-      width: calc(100vw - 560px);
-    }
-  }
-
   .page-wrapper {
   .page-wrapper {
     position: relative;
     position: relative;
     top: $grw-navbar-border-width;
     top: $grw-navbar-border-width;
@@ -174,6 +158,27 @@ body.on-edit {
   /*********************
   /*********************
    * Navigation styles
    * Navigation styles
    */
    */
+  // ellipsis .grw-page-path-hierarchical-link
+  .grw-subnav-left-side {
+    overflow: hidden;
+    .grw-path-nav-container {
+      overflow: hidden;
+      .grw-page-path-nav {
+        white-space: nowrap;
+
+        .grw-page-path-hierarchical-link {
+          width: 100%;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+
+        h1 {
+          overflow: hidden;
+        }
+      }
+    }
+  }
+
   .nav:hover {
   .nav:hover {
     .btn-copy,
     .btn-copy,
     .btn-edit,
     .btn-edit,

+ 1 - 1
src/lib/components/PagePathHierarchicalLink.jsx

@@ -46,7 +46,7 @@ const PagePathHierarchicalLink = (props) => {
   const RootElm = ({ children }) => {
   const RootElm = ({ children }) => {
     return props.isInnerElem
     return props.isInnerElem
       ? <>{children}</>
       ? <>{children}</>
-      : <span className="grw-page-path-hierarchical-link text-break">{children}</span>;
+      : <span className="grw-page-path-hierarchical-link d-inline-block text-break">{children}</span>;
   };
   };
 
 
   return (
   return (

+ 1 - 22
src/server/views/widget/not_creatable_content.html

@@ -10,27 +10,6 @@
 <div id="content-main" class="content-main page-list"
 <div id="content-main" class="content-main page-list"
   data-path="{{ encodeURI(path) }}"
   data-path="{{ encodeURI(path) }}"
   data-current-user="{% if user %}{{ user._id.toString() }}{% endif %}"
   data-current-user="{% if user %}{{ user._id.toString() }}{% endif %}"
-  >
+  ></div>
 
 
-  <ul class="nav nav-tabs d-print-none" role="tablist">
-    <li class="nav-item grw-nav-main-left-tab active" role="presentation">
-      <a class="nav-link active" role="tab" href="#revision-body" data-toggle="tab">
-        <i class="icon-notebook"></i> List
-      </a>
-    </li>
-  </ul>
-
-  <div class="tab-content">
-    {# list view #}
-    <div class="pt-2 active tab-pane page-list-container" id="revision-body">
-      {% if pages.length == 0 %}
-        <div class="mt-2">
-          There are no pages under <strong>{{ path | preventXss }}</strong>.
-        </div>
-      {% endif  %}
-
-      {% include '../widget/page_list.html' with { pages: pages, pager: pager, viewConfig: viewConfig } %}
-    </div>
-
-  </div>
 </div>
 </div>