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

Merge pull request #2801 from weseek/fix-bug-for-undhisplayed-pagination-in-pageAttachment.jsx

fix bug for pagination undhisplayed
Yuki Takei 5 лет назад
Родитель
Сommit
7151f3cf2c

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

@@ -47,7 +47,7 @@
   "Timeline View": "Timeline",
   "History": "History",
   "attachment_data": "Attachment Data",
-  "No attachments yet.": "No attachments yet.",
+  "No_attachments_yet": "No attachments yet.",
   "Presentation Mode": "Presentation",
   "Not available for guest": "Not available for guest",
   "Create Archive Page": "Create Archive Page",

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

@@ -48,7 +48,7 @@
   "Timeline View": "タイムライン",
   "History": "更新履歴",
   "attachment_data": "添付データ",
-  "No attachments yet.": "No attachments yet.",
+  "No_attachments_yet": "No attachments yet.",
   "Presentation Mode": "プレゼンテーション",
   "Not available for guest": "ゲストユーザーは利用できません",
   "Create Archive Page": "アーカイブページの作成",

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

@@ -49,7 +49,7 @@
 	"Timeline View": "时间线",
   "History": "历史",
   "attachment_data": "Attachment Data",
-  "No attachments yet": "暂无附件",
+  "No_attachments_yet": "暂无附件",
 	"Presentation Mode": "演示文稿",
   "Not available for guest": "Not available for guest",
   "Create Archive Page": "创建归档页",

+ 4 - 1
src/client/js/components/PageAttachment.jsx

@@ -63,6 +63,9 @@ class PageAttachment extends React.Component {
 
   async componentDidMount() {
     await this.handlePage(1);
+    this.setState({
+      activePage: 1,
+    });
   }
 
   checkIfFileInUse(attachment) {
@@ -114,7 +117,7 @@ class PageAttachment extends React.Component {
 
     const { t } = this.props;
     if (this.state.attachments.length === 0) {
-      return t('No attachments yet.');
+      return t('No_attachments_yet');
 
     }