Merge branch 'develop' of https://github.com/syuilo/misskey into develop

This commit is contained in:
syuilo 2019-07-21 21:59:51 +09:00
commit 6fbf1cfc28
5 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
# Visual Studio Code # Visual Studio Code
/.vscode /.vscode
!/.vscode/extensions.json
# Intelij-IDEA # Intelij-IDEA
/.idea /.idea

View file

@ -2,10 +2,10 @@
"recommendations": [ "recommendations": [
"ducksoupdev.vue2", "ducksoupdev.vue2",
"editorconfig.editorconfig", "editorconfig.editorconfig",
"eg2.tslint",
"eg2.vscode-npm-script", "eg2.vscode-npm-script",
"hollowtree.vue-snippets", "hollowtree.vue-snippets",
"ms-vscode.typescript-javascript-grammar", "ms-vscode.typescript-javascript-grammar",
"ms-vscode.vscode-typescript-tslint-plugin",
"octref.vetur", "octref.vetur",
"sysoev.language-stylus" "sysoev.language-stylus"
] ]

View file

@ -5,7 +5,7 @@
:x="record.x" :y="record.date.weekday" :x="record.x" :y="record.date.weekday"
rx="1" ry="1" rx="1" ry="1"
fill="transparent"> fill="transparent">
<title>{{ record.date.year }}/{{ record.date.month }}/{{ record.date.day }}</title> <title>{{ record.date.year }}/{{ record.date.month + 1 }}/{{ record.date.day }}</title>
</rect> </rect>
<rect v-for="record in data" class="day" <rect v-for="record in data" class="day"
:width="record.v" :height="record.v" :width="record.v" :height="record.v"
@ -39,17 +39,17 @@ export default Vue.extend({
const month = now.getMonth(); const month = now.getMonth();
const day = now.getDate(); const day = now.getDate();
let x = 0; let x = 20;
this.data.slice().reverse().forEach((d, i) => { this.data.slice().forEach((d, i) => {
d.x = x; d.x = x;
const date = new Date(year, month, day - i); const date = new Date(year, month, day - i);
d.date = { d.date = {
year: date.getFullYear(), year: date.getFullYear(),
month: date.getMonth(), month: date.getMonth(),
day: date.getDate() day: date.getDate(),
weekday: date.getDay()
}; };
d.date.weekday = (new Date(d.date.year, d.date.month - 1, d.date.day)).getDay();
d.v = peak == 0 ? 0 : d.total / (peak / 2); d.v = peak == 0 ? 0 : d.total / (peak / 2);
if (d.v > 1) d.v = 1; if (d.v > 1) d.v = 1;
@ -58,7 +58,7 @@ export default Vue.extend({
const cl = 15 + ((1 - d.v) * 80); const cl = 15 + ((1 - d.v) * 80);
d.color = `hsl(${ch}, ${cs}%, ${cl}%)`; d.color = `hsl(${ch}, ${cs}%, ${cl}%)`;
if (d.date.weekday == 6) x++; if (d.date.weekday == 0) x--;
}); });
} }
}); });

View file

@ -46,7 +46,7 @@ export default Vue.extend({
props: ['data'], props: ['data'],
data() { data() {
return { return {
viewBoxX: 140, viewBoxX: 147,
viewBoxY: 60, viewBoxY: 60,
zoom: 1, zoom: 1,
pos: 0, pos: 0,

View file

@ -48,7 +48,7 @@ export default Vue.extend({
this.$root.api('charts/user/notes', { this.$root.api('charts/user/notes', {
userId: this.user.id, userId: this.user.id,
span: 'day', span: 'day',
limit: 7 * 20 limit: 7 * 21
}).then(activity => { }).then(activity => {
this.activity = activity.diffs.normal.map((_, i) => ({ this.activity = activity.diffs.normal.map((_, i) => ({
total: activity.diffs.normal[i] + activity.diffs.reply[i] + activity.diffs.renote[i], total: activity.diffs.normal[i] + activity.diffs.reply[i] + activity.diffs.renote[i],