mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-08-02 13:26:07 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ba36efcd2 | |||
| fd497ef105 | |||
| 9c4a7bf94c | |||
| 91f8adc138 | |||
| 69fa2373cb | |||
| 8b37fc4772 | |||
| 81e4ed9591 | |||
| 9cda89ec04 | |||
| fc180f030f | |||
| a827b6028d | |||
| 4517bf7342 | |||
| b21287262e | |||
| c1b47a2119 |
@@ -5,6 +5,16 @@ ChangeLog
|
|||||||
|
|
||||||
This document describes breaking changes only.
|
This document describes breaking changes only.
|
||||||
|
|
||||||
|
8.0.0
|
||||||
|
-----
|
||||||
|
|
||||||
|
### Migration
|
||||||
|
|
||||||
|
起動する前に、`node cli/migration/8.0.0`してください。
|
||||||
|
|
||||||
|
Please run `node cli/migration/8.0.0` before launch.
|
||||||
|
|
||||||
|
|
||||||
7.0.0
|
7.0.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "8.4.0",
|
"version": "8.7.0",
|
||||||
"clientVersion": "1.0.8831",
|
"clientVersion": "1.0.8840",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
Vue.filter('bytes', (v, digits = 0) => {
|
Vue.filter('bytes', (v, digits = 0) => {
|
||||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
|
||||||
if (v == 0) return '0Byte';
|
if (v == 0) return '0';
|
||||||
|
const isMinus = v < 0;
|
||||||
|
if (isMinus) v = -v;
|
||||||
const i = Math.floor(Math.log(v) / Math.log(1024));
|
const i = Math.floor(Math.log(v) / Math.log(1024));
|
||||||
return (v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, '') + sizes[i];
|
return (isMinus ? '-' : '') + (v / Math.pow(1024, i)).toFixed(digits).replace(/\.0+$/, '') + sizes[i];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,6 +30,11 @@ export default Vue.extend({
|
|||||||
type: 'time',
|
type: 'time',
|
||||||
distribution: 'series'
|
distribution: 'series'
|
||||||
}]
|
}]
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
intersect: false,
|
||||||
|
mode: 'x',
|
||||||
|
position: 'nearest'
|
||||||
}
|
}
|
||||||
}, this.opts || {}));
|
}, this.opts || {}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,13 +44,9 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XChart
|
XChart
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
chart: {
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
chart: null,
|
||||||
chartType: 'local-notes',
|
chartType: 'local-notes',
|
||||||
span: 'hour'
|
span: 'hour'
|
||||||
};
|
};
|
||||||
@@ -85,6 +81,11 @@ export default Vue.extend({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
(this as any).api('chart').then(chart => {
|
||||||
|
this.chart = chart;
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
notesChart(local: boolean): any {
|
notesChart(local: boolean): any {
|
||||||
const data = this.stats.slice().reverse().map(x => ({
|
const data = this.stats.slice().reverse().map(x => ({
|
||||||
@@ -101,12 +102,14 @@ export default Vue.extend({
|
|||||||
fill: false,
|
fill: false,
|
||||||
borderColor: '#555',
|
borderColor: '#555',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
|
borderDash: [4, 4],
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
lineTension: 0,
|
lineTension: 0,
|
||||||
data: data.map(x => ({ t: x.date, y: x.all }))
|
data: data.map(x => ({ t: x.date, y: x.all }))
|
||||||
}, {
|
}, {
|
||||||
label: 'Normal',
|
label: 'Normal',
|
||||||
fill: false,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(65, 221, 222, 0.1)',
|
||||||
borderColor: '#41ddde',
|
borderColor: '#41ddde',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -114,7 +117,8 @@ export default Vue.extend({
|
|||||||
data: data.map(x => ({ t: x.date, y: x.normal }))
|
data: data.map(x => ({ t: x.date, y: x.normal }))
|
||||||
}, {
|
}, {
|
||||||
label: 'Replies',
|
label: 'Replies',
|
||||||
fill: false,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(247, 121, 108, 0.1)',
|
||||||
borderColor: '#f7796c',
|
borderColor: '#f7796c',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -122,7 +126,8 @@ export default Vue.extend({
|
|||||||
data: data.map(x => ({ t: x.date, y: x.reply }))
|
data: data.map(x => ({ t: x.date, y: x.reply }))
|
||||||
}, {
|
}, {
|
||||||
label: 'Renotes',
|
label: 'Renotes',
|
||||||
fill: false,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(161, 222, 65, 0.1)',
|
||||||
borderColor: '#a1de41',
|
borderColor: '#a1de41',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -142,6 +147,7 @@ export default Vue.extend({
|
|||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Notes' : 'Remote Notes',
|
label: local ? 'Local Notes' : 'Remote Notes',
|
||||||
fill: true,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(246, 88, 79, 0.1)',
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -163,6 +169,7 @@ export default Vue.extend({
|
|||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Users' : 'Remote Users',
|
label: local ? 'Local Users' : 'Remote Users',
|
||||||
fill: true,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(246, 88, 79, 0.1)',
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -184,6 +191,7 @@ export default Vue.extend({
|
|||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Drive Usage' : 'Remote Drive Usage',
|
label: local ? 'Local Drive Usage' : 'Remote Drive Usage',
|
||||||
fill: true,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(246, 88, 79, 0.1)',
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -194,11 +202,18 @@ export default Vue.extend({
|
|||||||
scales: {
|
scales: {
|
||||||
yAxes: [{
|
yAxes: [{
|
||||||
ticks: {
|
ticks: {
|
||||||
callback: (value) => {
|
callback: value => {
|
||||||
return Vue.filter('bytes')(value);
|
return Vue.filter('bytes')(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
},
|
||||||
|
tooltips: {
|
||||||
|
callbacks: {
|
||||||
|
label: tooltipItem => {
|
||||||
|
return Vue.filter('bytes')(tooltipItem.yLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
@@ -214,7 +229,8 @@ export default Vue.extend({
|
|||||||
return [{
|
return [{
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: local ? 'Local Drive Files' : 'Remote Drive Files',
|
label: local ? 'Local Drive Files' : 'Remote Drive Files',
|
||||||
fill: false,
|
fill: true,
|
||||||
|
backgroundColor: 'rgba(246, 88, 79, 0.1)',
|
||||||
borderColor: '#f6584f',
|
borderColor: '#f6584f',
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointBackgroundColor: '#fff',
|
pointBackgroundColor: '#fff',
|
||||||
@@ -231,6 +247,9 @@ export default Vue.extend({
|
|||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.gkgckalzgidaygcxnugepioremxvxvpt
|
.gkgckalzgidaygcxnugepioremxvxvpt
|
||||||
|
*
|
||||||
|
user-select none
|
||||||
|
|
||||||
> header
|
> header
|
||||||
display flex
|
display flex
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<main>
|
<main>
|
||||||
<div v-show="page == 'dashboard'">
|
<div v-show="page == 'dashboard'">
|
||||||
<x-dashboard/>
|
<x-dashboard/>
|
||||||
<x-chart :chart="chart"/>
|
<x-chart/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="page == 'users'">
|
<div v-if="page == 'users'">
|
||||||
<x-suspend-user/>
|
<x-suspend-user/>
|
||||||
@@ -49,11 +49,6 @@ export default Vue.extend({
|
|||||||
chart: null
|
chart: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
(this as any).api('admin/chart').then(chart => {
|
|
||||||
this.chart = chart;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
nav(page: string) {
|
nav(page: string) {
|
||||||
this.page = page;
|
this.page = page;
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import Stats, { IStats } from '../../../../models/stats';
|
import Stats, { IStats } from '../../../models/stats';
|
||||||
|
|
||||||
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true,
|
|
||||||
requireAdmin: true
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default (params: any) => new Promise(async (res, rej) => {
|
export default (params: any) => new Promise(async (res, rej) => {
|
||||||
@@ -40,7 +40,7 @@ async function save(path: string, name: string, type: string, hash: string, size
|
|||||||
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${name}.thumbnail.jpg`;
|
const thumbnailKey = `${config.drive.prefix}/${uuid.v4()}/${name}.thumbnail.jpg`;
|
||||||
|
|
||||||
const baseUrl = config.drive.baseUrl
|
const baseUrl = config.drive.baseUrl
|
||||||
|| `${ config.drive.config.secure ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? ':' + config.drive.config.port : '' }/${ config.drive.bucket }`;
|
|| `${ config.drive.config.useSSL ? 'https' : 'http' }://${ config.drive.config.endPoint }${ config.drive.config.port ? ':' + config.drive.config.port : '' }/${ config.drive.bucket }`;
|
||||||
|
|
||||||
await minio.putObject(config.drive.bucket, key, fs.createReadStream(path), size, {
|
await minio.putObject(config.drive.bucket, key, fs.createReadStream(path), size, {
|
||||||
'Content-Type': type,
|
'Content-Type': type,
|
||||||
|
|||||||
Reference in New Issue
Block a user