From fa3299840f505c2e03eedfe420e57365030547d3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 24 Aug 2018 07:02:27 +0900 Subject: [PATCH 1/3] Refactor --- src/client/app/desktop/views/pages/admin/admin.chart.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/desktop/views/pages/admin/admin.chart.vue b/src/client/app/desktop/views/pages/admin/admin.chart.vue index 4e0050e8b..8db54174f 100644 --- a/src/client/app/desktop/views/pages/admin/admin.chart.vue +++ b/src/client/app/desktop/views/pages/admin/admin.chart.vue @@ -173,7 +173,7 @@ export default Vue.extend({ driveChart(local: boolean, total: boolean): any { const data = this.stats.slice().reverse().map(x => ({ date: new Date(x.date), - count: local ? + size: local ? total ? x.drive.local.totalSize : x.drive.local.diffSize : total ? x.drive.remote.totalSize : x.drive.remote.diffSize })); @@ -186,7 +186,7 @@ export default Vue.extend({ borderWidth: 2, pointBackgroundColor: '#fff', lineTension: 0, - data: data.map(x => ({ t: x.date, y: x.count })) + data: data.map(x => ({ t: x.date, y: x.size })) }] }, { scales: { From 92cf205c6669abde283ae13491cd1a07da32a98a Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 24 Aug 2018 07:02:52 +0900 Subject: [PATCH 2/3] Fix bug --- package.json | 1 + src/client/app/desktop/views/pages/admin/admin.chart.chart.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 99a672e63..e362adbfe 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ "loader-utils": "1.1.0", "lodash.assign": "4.2.0", "mecab-async": "0.1.2", + "merge-options": "1.0.1", "minio": "7.0.0", "mkdirp": "0.5.1", "mocha": "5.2.0", diff --git a/src/client/app/desktop/views/pages/admin/admin.chart.chart.ts b/src/client/app/desktop/views/pages/admin/admin.chart.chart.ts index d79b0ba19..c09dc6dd8 100644 --- a/src/client/app/desktop/views/pages/admin/admin.chart.chart.ts +++ b/src/client/app/desktop/views/pages/admin/admin.chart.chart.ts @@ -1,5 +1,6 @@ import Vue from 'vue'; import { Line } from 'vue-chartjs'; +import * as mergeOptions from 'merge-options'; export default Vue.extend({ extends: Line, @@ -21,7 +22,7 @@ export default Vue.extend({ }, methods: { render() { - this.renderChart(this.data, Object.assign({ + this.renderChart(this.data, mergeOptions({ responsive: false, scales: { xAxes: [{ From 027140eccc679c32362b5061a84d9f77a863262d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 24 Aug 2018 07:03:25 +0900 Subject: [PATCH 3/3] 8.3.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e362adbfe..d3bfc27cf 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "misskey", "author": "syuilo ", - "version": "8.3.0", - "clientVersion": "1.0.8825", + "version": "8.3.1", + "clientVersion": "1.0.8828", "codename": "nighthike", "main": "./built/index.js", "private": true,