From 95769aacdc401a693bceff8ca6fbfc811fcce196 Mon Sep 17 00:00:00 2001 From: er-pai-r <18335219360@163.com> Date: Wed, 22 Nov 2023 13:34:51 +0800 Subject: [PATCH] feat: update seafile-js version --- frontend/package-lock.json | 14 +++++++------- frontend/package.json | 2 +- .../src/pages/sdoc/sdoc-file-history/side-panel.js | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 459b74396c..e208b84f56 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -41,7 +41,7 @@ "react-select": "5.7.0", "react-transition-group": "4.4.5", "reactstrap": "8.9.0", - "seafile-js": "0.2.217", + "seafile-js": "0.2.218", "socket.io-client": "^2.2.0", "svg-sprite-loader": "^6.0.11", "svgo-loader": "^3.0.1", @@ -22233,9 +22233,9 @@ } }, "node_modules/seafile-js": { - "version": "0.2.217", - "resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.217.tgz", - "integrity": "sha512-lsXtLZFmLa+8hdI2MTE59hypF2Rd8fHiaG3qZHJ/NTCLdlBplgn8hsHML0SfH04iuC6xsjLQLd6YJCt4fut2ww==", + "version": "0.2.218", + "resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.218.tgz", + "integrity": "sha512-+3EFZIKxYUUU6+iImXFkc0k5wyRrPSdR9bQmB9NNTm1TTjFen5tmldt9nhZ1y/+7fyWjUS+k7JRBudF5YsOLOg==", "dependencies": { "axios": "^1.6.0", "form-data": "4.0.0" @@ -43133,9 +43133,9 @@ } }, "seafile-js": { - "version": "0.2.217", - "resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.217.tgz", - "integrity": "sha512-lsXtLZFmLa+8hdI2MTE59hypF2Rd8fHiaG3qZHJ/NTCLdlBplgn8hsHML0SfH04iuC6xsjLQLd6YJCt4fut2ww==", + "version": "0.2.218", + "resolved": "https://registry.npmjs.org/seafile-js/-/seafile-js-0.2.218.tgz", + "integrity": "sha512-+3EFZIKxYUUU6+iImXFkc0k5wyRrPSdR9bQmB9NNTm1TTjFen5tmldt9nhZ1y/+7fyWjUS+k7JRBudF5YsOLOg==", "requires": { "axios": "^1.6.0", "form-data": "4.0.0" diff --git a/frontend/package.json b/frontend/package.json index 05bbf99adc..cbb4df2f65 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -36,7 +36,7 @@ "react-select": "5.7.0", "react-transition-group": "4.4.5", "reactstrap": "8.9.0", - "seafile-js": "0.2.217", + "seafile-js": "0.2.218", "socket.io-client": "^2.2.0", "svg-sprite-loader": "^6.0.11", "svgo-loader": "^3.0.1", diff --git a/frontend/src/pages/sdoc/sdoc-file-history/side-panel.js b/frontend/src/pages/sdoc/sdoc-file-history/side-panel.js index e139ecac26..a318b2a622 100644 --- a/frontend/src/pages/sdoc/sdoc-file-history/side-panel.js +++ b/frontend/src/pages/sdoc/sdoc-file-history/side-panel.js @@ -62,15 +62,16 @@ class SidePanel extends Component { const newHistoryGroups = oldHistoryGroups.slice(0); histories.forEach(history => { const { date } = history; - const month = moment(date).format('YYYY-MM'); + const momentDate = moment(date); + const month = momentDate.format('YYYY-MM'); const monthItem = newHistoryGroups.find(item => item.month === month); if (monthItem) { - monthItem.children.push({ day: moment(date).format('YYYY-MM-DD'), showDaily: false, children: [ history ] }); + monthItem.children.push({ day: momentDate.format('YYYY-MM-DD'), showDaily: false, children: [ history ] }); } else { newHistoryGroups.push({ month, children: [ - { day: moment(date).format('YYYY-MM-DD'), showDaily: false, children: [ history ] } + { day: momentDate.format('YYYY-MM-DD'), showDaily: false, children: [ history ] } ] }); }