Merge pull request #2472 from syuilo/develop

8.11.0
This commit is contained in:
syuilo 2018-08-25 15:34:33 +09:00 committed by GitHub
commit 79f4d886d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 116 additions and 97 deletions

View File

@ -934,8 +934,8 @@ desktop/views/pages/admin/admin.dashboard.vue:
dashboard: "ダッシュボード" dashboard: "ダッシュボード"
all-users: "全てのユーザー" all-users: "全てのユーザー"
original-users: "このインスタンスのユーザー" original-users: "このインスタンスのユーザー"
all-notes: "全てのノート" all-notes: "全ての投稿"
original-notes: "このインスタンスのノート" original-notes: "このインスタンスの投稿"
invite: "招待" invite: "招待"
desktop/views/pages/admin/admin.suspend-user.vue: desktop/views/pages/admin/admin.suspend-user.vue:
@ -971,8 +971,8 @@ desktop/views/pages/deck/deck.note.vue:
desktop/views/pages/stats/stats.vue: desktop/views/pages/stats/stats.vue:
all-users: "全てのユーザー" all-users: "全てのユーザー"
original-users: "このインスタンスのユーザー" original-users: "このインスタンスのユーザー"
all-notes: "全てのノート" all-notes: "全ての投稿"
original-notes: "このインスタンスのノート" original-notes: "このインスタンスの投稿"
desktop/views/pages/welcome.vue: desktop/views/pages/welcome.vue:
about: "詳しく..." about: "詳しく..."

View File

@ -1,8 +1,8 @@
{ {
"name": "misskey", "name": "misskey",
"author": "syuilo <i@syuilo.com>", "author": "syuilo <i@syuilo.com>",
"version": "8.10.0", "version": "8.11.0",
"clientVersion": "1.0.8972", "clientVersion": "1.0.8979",
"codename": "nighthike", "codename": "nighthike",
"main": "./built/index.js", "main": "./built/index.js",
"private": true, "private": true,
@ -60,7 +60,7 @@
"@types/mocha": "5.2.3", "@types/mocha": "5.2.3",
"@types/mongodb": "3.1.4", "@types/mongodb": "3.1.4",
"@types/ms": "0.7.30", "@types/ms": "0.7.30",
"@types/node": "10.9.1", "@types/node": "10.9.2",
"@types/portscanner": "2.1.0", "@types/portscanner": "2.1.0",
"@types/pug": "2.0.4", "@types/pug": "2.0.4",
"@types/qrcode": "1.2.0", "@types/qrcode": "1.2.0",

View File

@ -34,10 +34,25 @@
import Vue from 'vue'; import Vue from 'vue';
import XChart from './charts.chart.ts'; import XChart from './charts.chart.ts';
const colors = {
local: 'rgb(246, 88, 79)',
remote: 'rgb(65, 221, 222)',
localPlus: 'rgb(52, 178, 118)',
remotePlus: 'rgb(158, 255, 209)',
localMinus: 'rgb(255, 97, 74)',
remoteMinus: 'rgb(255, 149, 134)'
};
const rgba = (color: string): string => {
return color.replace('rgb', 'rgba').replace(')', ', 0.1)');
};
export default Vue.extend({ export default Vue.extend({
components: { components: {
XChart XChart
}, },
data() { data() {
return { return {
chart: null, chart: null,
@ -45,6 +60,7 @@ export default Vue.extend({
span: 'hour' span: 'hour'
}; };
}, },
computed: { computed: {
data(): any { data(): any {
if (this.chart == null) return null; if (this.chart == null) return null;
@ -61,6 +77,7 @@ export default Vue.extend({
case 'drive-files-total': return this.driveFilesTotalChart(); case 'drive-files-total': return this.driveFilesTotalChart();
} }
}, },
stats(): any[] { stats(): any[] {
return ( return (
this.span == 'day' ? this.chart.perDay : this.span == 'day' ? this.chart.perDay :
@ -69,11 +86,13 @@ export default Vue.extend({
); );
} }
}, },
created() { created() {
(this as any).api('chart').then(chart => { (this as any).api('chart').then(chart => {
this.chart = chart; this.chart = chart;
}); });
}, },
methods: { methods: {
notesChart(type: string): any { notesChart(type: string): any {
const data = this.stats.slice().reverse().map(x => ({ const data = this.stats.slice().reverse().map(x => ({
@ -160,24 +179,24 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount + x.localCount })) data: data.map(x => ({ t: x.date, y: x.remoteCount + x.localCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}, { }, {
label: 'Local', label: 'Local',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.local),
borderColor: '#f6584f', borderColor: colors.local,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localCount })) data: data.map(x => ({ t: x.date, y: x.localCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: rgba(colors.remote),
borderColor: colors.remote,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}] }]
}, { }, {
scales: { scales: {
@ -217,24 +236,24 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount + x.localCount })) data: data.map(x => ({ t: x.date, y: x.remoteCount + x.localCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}, { }, {
label: 'Local', label: 'Local',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.local),
borderColor: '#f6584f', borderColor: colors.local,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localCount })) data: data.map(x => ({ t: x.date, y: x.localCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: rgba(colors.remote),
borderColor: colors.remote,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}] }]
}, { }, {
scales: { scales: {
@ -276,29 +295,11 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localInc + x.localDec + x.remoteInc + x.remoteDec })) data: data.map(x => ({ t: x.date, y: x.localInc + x.localDec + x.remoteInc + x.remoteDec }))
}, {
label: 'Remote +',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteInc }))
}, {
label: 'Remote -',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteDec }))
}, { }, {
label: 'Local +', label: 'Local +',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.localPlus),
borderColor: '#f6584f', borderColor: colors.localPlus,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
@ -306,12 +307,30 @@ export default Vue.extend({
}, { }, {
label: 'Local -', label: 'Local -',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.localMinus),
borderColor: '#f6584f', borderColor: colors.localMinus,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localDec })) data: data.map(x => ({ t: x.date, y: x.localDec }))
}, {
label: 'Remote +',
fill: true,
backgroundColor: rgba(colors.remotePlus),
borderColor: colors.remotePlus,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteInc }))
}, {
label: 'Remote -',
fill: true,
backgroundColor: rgba(colors.remoteMinus),
borderColor: colors.remoteMinus,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteDec }))
}] }]
}, { }, {
scales: { scales: {
@ -351,24 +370,24 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteSize + x.localSize })) data: data.map(x => ({ t: x.date, y: x.remoteSize + x.localSize }))
}, {
label: 'Remote',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteSize }))
}, { }, {
label: 'Local', label: 'Local',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.local),
borderColor: '#f6584f', borderColor: colors.local,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localSize })) data: data.map(x => ({ t: x.date, y: x.localSize }))
}, {
label: 'Remote',
fill: true,
backgroundColor: rgba(colors.remote),
borderColor: colors.remote,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteSize }))
}] }]
}, { }, {
scales: { scales: {
@ -410,29 +429,11 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localInc + x.localDec + x.remoteInc + x.remoteDec })) data: data.map(x => ({ t: x.date, y: x.localInc + x.localDec + x.remoteInc + x.remoteDec }))
}, {
label: 'Remote +',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteInc }))
}, {
label: 'Remote -',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteDec }))
}, { }, {
label: 'Local +', label: 'Local +',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.localPlus),
borderColor: '#f6584f', borderColor: colors.localPlus,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
@ -440,12 +441,30 @@ export default Vue.extend({
}, { }, {
label: 'Local -', label: 'Local -',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.localMinus),
borderColor: '#f6584f', borderColor: colors.localMinus,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localDec })) data: data.map(x => ({ t: x.date, y: x.localDec }))
}, {
label: 'Remote +',
fill: true,
backgroundColor: rgba(colors.remotePlus),
borderColor: colors.remotePlus,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteInc }))
}, {
label: 'Remote -',
fill: true,
backgroundColor: rgba(colors.remoteMinus),
borderColor: colors.remoteMinus,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteDec }))
}] }]
}, { }, {
scales: { scales: {
@ -485,24 +504,24 @@ export default Vue.extend({
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localCount + x.remoteCount })) data: data.map(x => ({ t: x.date, y: x.localCount + x.remoteCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: 'rgba(65, 221, 222, 0.1)',
borderColor: '#41ddde',
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}, { }, {
label: 'Local', label: 'Local',
fill: true, fill: true,
backgroundColor: 'rgba(246, 88, 79, 0.1)', backgroundColor: rgba(colors.local),
borderColor: '#f6584f', borderColor: colors.local,
borderWidth: 2, borderWidth: 2,
pointBackgroundColor: '#fff', pointBackgroundColor: '#fff',
lineTension: 0, lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.localCount })) data: data.map(x => ({ t: x.date, y: x.localCount }))
}, {
label: 'Remote',
fill: true,
backgroundColor: rgba(colors.remote),
borderColor: colors.remote,
borderWidth: 2,
pointBackgroundColor: '#fff',
lineTension: 0,
data: data.map(x => ({ t: x.date, y: x.remoteCount }))
}] }]
}, { }, {
scales: { scales: {

View File

@ -38,7 +38,7 @@ export default Vue.extend({
.tcrwdhwpuxrwmcttxjcsehgpagpstqey .tcrwdhwpuxrwmcttxjcsehgpagpstqey
width 100% width 100%
padding 16px 32px padding 16px
> .stats > .stats
display flex display flex

View File

@ -11,7 +11,7 @@
<a class="avatar"> <a class="avatar">
<img :src="user.avatarUrl" alt="avatar"/> <img :src="user.avatarUrl" alt="avatar"/>
</a> </a>
<mk-mute-button v-if="$store.state.i.id != user.id" :user="user"/> <mk-mute-button v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/>
<mk-follow-button v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/> <mk-follow-button v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/>
</div> </div>
<div class="title"> <div class="title">