summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-21 09:52:59 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-21 09:52:59 +0900
commitea512a14b58911d281d0cad1db1aec8447d8a5f1 (patch)
treeea05fd218e986bf7c5c9f1ba9a98eeb34b6c0f56 /src/web
parentMerge remote-tracking branch 'refs/remotes/origin/master' into no-tag-ls (diff)
downloadmisskey-ea512a14b58911d281d0cad1db1aec8447d8a5f1.tar.gz
misskey-ea512a14b58911d281d0cad1db1aec8447d8a5f1.tar.bz2
misskey-ea512a14b58911d281d0cad1db1aec8447d8a5f1.zip
wip
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/tags/post-status-graph.tag75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/web/app/desktop/tags/post-status-graph.tag b/src/web/app/desktop/tags/post-status-graph.tag
deleted file mode 100644
index 5f6a667eb7..0000000000
--- a/src/web/app/desktop/tags/post-status-graph.tag
+++ /dev/null
@@ -1,75 +0,0 @@
-<mk-post-status-graph>
- <canvas ref="canv" width={ opts.width } height={ opts.height }></canvas>
- <style>
- :scope
- display block
-
- > canvas
- margin 0 auto
-
- </style>
- <script>
- this.mixin('api');
- this.mixin('is-promise');
-
- this.post = null
- this.post-promise = if @is-promise this.opts.post then this.opts.post else Promise.resolve this.opts.post
-
- this.on('mount', () => {
- post <~ this.post-promise.then
- this.post = post
- this.update();
-
- this.api('aggregation/posts/like', {
- post_id: this.post.id
- limit: 30days
- }).then((likes) => {
- likes = likes.reverse!
-
- this.api('aggregation/posts/repost', {
- post_id: this.post.id
- limit: 30days
- }).then((repost) => {
- repost = repost.reverse!
-
- this.api('aggregation/posts/reply', {
- post_id: this.post.id
- limit: 30days
- }).then((replies) => {
- replies = replies.reverse!
-
- new Chart this.refs.canv, do
- type: 'bar'
- data:
- labels: likes.map (x, i) => if i % 3 == 2 then x.date.day + '日' else ''
- datasets: [
- {
- label: 'いいね'
- type: 'line'
- data: likes.map (x) => x.count
- line-tension: 0
- border-width: 2
- fill: true
- background-color: 'rgba(247, 121, 108, 0.2)'
- point-background-color: '#fff'
- point-radius: 4
- point-border-width: 2
- border-color: '#F7796C'
- },
- {
- label: '返信'
- type: 'bar'
- data: replies.map (x) => x.count
- background-color: '#555'
- },
- {
- label: 'Repost'
- type: 'bar'
- data: repost.map (x) => x.count
- background-color: '#a2d61e'
- }
- ]
- options:
- responsive: false
- </script>
-</mk-post-status-graph>